diff options
author | Simo Sorce <idra@samba.org> | 2003-06-22 10:09:52 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2003-06-22 10:09:52 +0000 |
commit | f5974dfaae680d98b78d600cd1f1aaece332a085 (patch) | |
tree | bd24ad803125c21cdb82a27d051e0029cb21ad65 /source3/sam/idmap_util.c | |
parent | 4830a878455fe0e525aa3bd2a59e55d1f30bddad (diff) | |
download | samba-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/sam/idmap_util.c')
-rw-r--r-- | source3/sam/idmap_util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/sam/idmap_util.c b/source3/sam/idmap_util.c index 3f36e701f6..7d7e716397 100644 --- a/source3/sam/idmap_util.c +++ b/source3/sam/idmap_util.c @@ -150,7 +150,7 @@ NTSTATUS uid_to_sid(DOM_SID *sid, uid_t uid) } id.uid = uid; - if (NT_STATUS_IS_ERR(ret = idmap_get_sid_from_id(sid, id, flags))) { + if (!NT_STATUS_IS_OK(ret = idmap_get_sid_from_id(sid, id, flags))) { DEBUG(10, ("uid_to_sid: Failed to map uid = [%u]\n", (unsigned int)uid)); if (flags & ID_NOMAP) { sid_copy(sid, get_global_sam_sid()); @@ -186,7 +186,7 @@ NTSTATUS gid_to_sid(DOM_SID *sid, gid_t gid) } id.gid = gid; - if (NT_STATUS_IS_ERR(ret = idmap_get_sid_from_id(sid, id, flags))) { + if (!NT_STATUS_IS_OK(ret = idmap_get_sid_from_id(sid, id, flags))) { DEBUG(10, ("gid_to_sid: Failed to map gid = [%u]\n", (unsigned int)gid)); if (flags & ID_NOMAP) { sid_copy(sid, get_global_sam_sid()); @@ -341,7 +341,7 @@ BOOL idmap_init_wellknown_sids(void) id.uid = pass->pw_uid; sid_copy(&sid, get_global_sam_sid()); sid_append_rid(&sid, DOMAIN_USER_RID_GUEST); - if (NT_STATUS_IS_ERR(idmap_set_mapping(&sid, id, flags))) { + if (!NT_STATUS_IS_OK(idmap_set_mapping(&sid, id, flags))) { passwd_free(&pass); return False; } @@ -362,10 +362,10 @@ BOOL idmap_init_wellknown_sids(void) flags = ID_GROUPID | ID_NOMAP; sid_copy(&sid, get_global_sam_sid()); sid_append_rid(&sid, DOMAIN_GROUP_RID_GUESTS); - if (NT_STATUS_IS_ERR(idmap_get_id_from_sid(&id, &flags, &sid))) { + if (!NT_STATUS_IS_OK(idmap_get_id_from_sid(&id, &flags, &sid))) { flags = ID_GROUPID; id.gid = pass->pw_gid; - if (NT_STATUS_IS_ERR(idmap_set_mapping(&sid, id, flags))) { + if (!NT_STATUS_IS_OK(idmap_set_mapping(&sid, id, flags))) { passwd_free(&pass); return False; } |