[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Nov 13 03:11:03 UTC 2018


The branch, master has been updated
       via  716715496c4 smbd: Use wire_perms_to_unix in unix_perms_from_wire
      from  751c0cc7c44 winbindd: Fix crash when taking profiles

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 716715496c4744ffe2565f0c1c99335ea1f53867
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Nov 9 07:55:40 2018 +0100

    smbd: Use wire_perms_to_unix in unix_perms_from_wire
    
    Same code, less lines
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Nov 13 04:10:54 CET 2018 on sn-devel-144

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/trans2.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 0003c3682e3..6ec319ce870 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1530,24 +1530,7 @@ static NTSTATUS unix_perms_from_wire( connection_struct *conn,
 		}
 	}
 
-	ret |= ((perms & UNIX_X_OTH ) ? S_IXOTH : 0);
-	ret |= ((perms & UNIX_W_OTH ) ? S_IWOTH : 0);
-	ret |= ((perms & UNIX_R_OTH ) ? S_IROTH : 0);
-	ret |= ((perms & UNIX_X_GRP ) ? S_IXGRP : 0);
-	ret |= ((perms & UNIX_W_GRP ) ? S_IWGRP : 0);
-	ret |= ((perms & UNIX_R_GRP ) ? S_IRGRP : 0);
-	ret |= ((perms & UNIX_X_USR ) ? S_IXUSR : 0);
-	ret |= ((perms & UNIX_W_USR ) ? S_IWUSR : 0);
-	ret |= ((perms & UNIX_R_USR ) ? S_IRUSR : 0);
-#ifdef S_ISVTX
-	ret |= ((perms & UNIX_STICKY ) ? S_ISVTX : 0);
-#endif
-#ifdef S_ISGID
-	ret |= ((perms & UNIX_SET_GID ) ? S_ISGID : 0);
-#endif
-#ifdef S_ISUID
-	ret |= ((perms & UNIX_SET_UID ) ? S_ISUID : 0);
-#endif
+	ret = wire_perms_to_unix(perms);
 
 	if (ptype == PERM_NEW_FILE) {
 		/*


-- 
Samba Shared Repository



More information about the samba-cvs mailing list