diff options
author | Jeremy Allison <jra@samba.org> | 2000-08-24 19:48:31 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-08-24 19:48:31 +0000 |
commit | 42e8f4102d1ddcfcae600b27641bf80989a0b175 (patch) | |
tree | 5326b970072347804f42bb28f1dd3e780472e3ce | |
parent | f03879e0b3db1871d003bfb5713a88928f032260 (diff) | |
download | samba-42e8f4102d1ddcfcae600b27641bf80989a0b175.tar.gz samba-42e8f4102d1ddcfcae600b27641bf80989a0b175.tar.bz2 samba-42e8f4102d1ddcfcae600b27641bf80989a0b175.zip |
Modified to use sid_to_uid and sid_to_gid. Now ready for POSIX ACL
code....
Jeremy.
(This used to be commit 28586c1dee18d99e0e0999ab1a945a33ce33c371)
-rw-r--r-- | source3/smbd/unix_acls.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source3/smbd/unix_acls.c b/source3/smbd/unix_acls.c index 46c57af5de..7ab448e6a3 100644 --- a/source3/smbd/unix_acls.c +++ b/source3/smbd/unix_acls.c @@ -151,6 +151,7 @@ static BOOL unpack_nt_permissions(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *p SEC_ACL *dacl = psd->dacl; BOOL all_aces_are_inherit_only = (is_directory ? True : False); int i; + enum SID_NAME_USE sid_type; *pmode = 0; *puser = (uid_t)-1; @@ -184,20 +185,20 @@ static BOOL unpack_nt_permissions(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *p * This may be a group chown only set. */ - if(!validate_unix_sid( &owner_sid, &owner_rid, psd->owner_sid)) - DEBUG(3,("unpack_nt_permissions: unable to validate owner sid.\n")); - else if(security_info_sent & OWNER_SECURITY_INFORMATION) - *puser = pdb_user_rid_to_uid(owner_rid); + if (security_info_sent & OWNER_SECURITY_INFORMATION) { + if (!sid_to_uid( &owner_sid, puser, &sid_type)) + DEBUG(3,("unpack_nt_permissions: unable to validate owner sid.\n")); + } /* * Don't immediately fail if the group sid cannot be validated. * This may be an owner chown only set. */ - if(!validate_unix_sid( &grp_sid, &grp_rid, psd->grp_sid)) - DEBUG(3,("unpack_nt_permissions: unable to validate group sid.\n")); - else if(security_info_sent & GROUP_SECURITY_INFORMATION) - *pgrp = pdb_user_rid_to_gid(grp_rid); + if (security_info_sent & GROUP_SECURITY_INFORMATION) { + if (!sid_to_gid( &grp_sid, pgrp, &sid_type)) + DEBUG(3,("unpack_nt_permissions: unable to validate group sid.\n")); + } /* * If no DACL then this is a chown only security descriptor. |