diff options
author | Simo Sorce <idra@samba.org> | 2003-05-01 11:47:48 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2003-05-01 11:47:48 +0000 |
commit | 75cace04fdcb672cc6c3c3ec8403206f2b222c50 (patch) | |
tree | a0e30d36b57bb698cd4af43c769c6deee0ca232d /source3/smbd | |
parent | ed454fe3d677a27e19b904f5d0d3199b62c9a1b0 (diff) | |
download | samba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.tar.gz samba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.tar.bz2 samba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.zip |
*id_to_*id call reshape to return NTSTATUS errors
plus internal fixes
1st stage
(This used to be commit 6d036761e565bc93964bb3c939d5b7d78d5778a3)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/posix_acls.c | 8 | ||||
-rw-r--r-- | source3/smbd/uid.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 6e1e70ae96..6925b35246 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -468,7 +468,7 @@ static BOOL unpack_nt_owners(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *pgrp, if (security_info_sent & OWNER_SECURITY_INFORMATION) { sid_copy(&owner_sid, psd->owner_sid); - if (!sid_to_uid( &owner_sid, puser)) { + if (NT_STATUS_IS_ERR(sid_to_uid(&owner_sid, puser))) { #if ACL_FORCE_UNMAPPABLE /* this allows take ownership to work reasonably */ extern struct current_user current_user; @@ -488,7 +488,7 @@ static BOOL unpack_nt_owners(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *pgrp, if (security_info_sent & GROUP_SECURITY_INFORMATION) { sid_copy(&grp_sid, psd->grp_sid); - if (!sid_to_gid( &grp_sid, pgrp)) { + if (NT_STATUS_IS_ERR(sid_to_gid( &grp_sid, pgrp))) { #if ACL_FORCE_UNMAPPABLE /* this allows take group ownership to work reasonably */ extern struct current_user current_user; @@ -1001,10 +1001,10 @@ static BOOL create_canon_ace_lists(files_struct *fsp, if (nt4_compatible_acls()) psa->flags |= SEC_ACE_FLAG_INHERIT_ONLY; - } else if (sid_to_gid( ¤t_ace->trustee, ¤t_ace->unix_ug.gid)) { + } else if (NT_STATUS_IS_OK(sid_to_gid( ¤t_ace->trustee, ¤t_ace->unix_ug.gid))) { current_ace->owner_type = GID_ACE; current_ace->type = SMB_ACL_GROUP; - } else if (sid_to_uid( ¤t_ace->trustee, ¤t_ace->unix_ug.uid)) { + } else if (NT_STATUS_IS_OK(sid_to_uid( ¤t_ace->trustee, ¤t_ace->unix_ug.uid))) { current_ace->owner_type = UID_ACE; current_ace->type = SMB_ACL_USER; } else { diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 7fc49a35e2..c68d00025c 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -407,7 +407,7 @@ void add_supplementary_nt_login_groups(int *n_groups, gid_t **pp_groups, NT_USER for (i = 0; i < ptok->num_sids; i++) { gid_t new_grp; - if (sid_to_gid(&ptok->user_sids[i], &new_grp)) { + if (NT_STATUS_IS_OK(sid_to_gid(&ptok->user_sids[i], &new_grp))) { /* * Don't add the gid_t if it is already in the current group * list. Some UNIXen don't like the same group more than once. |