summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-06-22 10:09:52 +0000
committerSimo Sorce <idra@samba.org>2003-06-22 10:09:52 +0000
commitf5974dfaae680d98b78d600cd1f1aaece332a085 (patch)
treebd24ad803125c21cdb82a27d051e0029cb21ad65 /source3/passdb
parent4830a878455fe0e525aa3bd2a59e55d1f30bddad (diff)
downloadsamba-f5974dfaae680d98b78d600cd1f1aaece332a085.tar.gz
samba-f5974dfaae680d98b78d600cd1f1aaece332a085.tar.bz2
samba-f5974dfaae680d98b78d600cd1f1aaece332a085.zip
Found out a good number of NT_STATUS_IS_ERR used the wrong way.
As abartlet rememberd me NT_STATUS_IS_ERR != !NT_STATUS_IS_OK This patch will cure the problem. Working on this one I found 16 functions where I think NT_STATUS_IS_ERR() is used correctly, but I'm not 100% sure, coders should check the use of NT_STATUS_IS_ERR() in samba is ok now. Simo. (This used to be commit c501e84d412563eb3f674f76038ec48c2b458687)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c2
-rw-r--r--source3/passdb/pdb_interface.c4
-rw-r--r--source3/passdb/pdb_ldap.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index e2e0758845..ac3875e181 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -190,7 +190,7 @@ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd)
*/
ret = pdb_set_sam_sids(sam_account, pwd);
- if (NT_STATUS_IS_ERR(ret)) return ret;
+ if (!NT_STATUS_IS_OK(ret)) return ret;
/* check if this is a user account or a machine account */
if (pwd->pw_name[strlen(pwd->pw_name)-1] != '$')
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 478cf6c06b..af913f3ff0 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -566,13 +566,13 @@ static struct pdb_context *pdb_get_static_context(BOOL reload)
if ((pdb_context) && (reload)) {
pdb_context->free_fn(&pdb_context);
- if (NT_STATUS_IS_ERR(make_pdb_context_list(&pdb_context, lp_passdb_backend()))) {
+ if (!NT_STATUS_IS_OK(make_pdb_context_list(&pdb_context, lp_passdb_backend()))) {
return NULL;
}
}
if (!pdb_context) {
- if (NT_STATUS_IS_ERR(make_pdb_context_list(&pdb_context, lp_passdb_backend()))) {
+ if (!NT_STATUS_IS_OK(make_pdb_context_list(&pdb_context, lp_passdb_backend()))) {
return NULL;
}
}
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 4cc1762a0d..fe575d4e3e 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -2744,7 +2744,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCO
}
ret = ldapsam_modify_entry(my_methods,newpwd,dn,mods,ldap_op, element_is_set_or_changed);
- if (NT_STATUS_IS_ERR(ret)) {
+ if (!NT_STATUS_IS_OK(ret)) {
DEBUG(0,("failed to modify/add user with uid = %s (dn = %s)\n",
pdb_get_username(newpwd),dn));
ldap_mods_free(mods, True);