diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/posix_acls.c | 24 | ||||
-rw-r--r-- | source3/smbd/uid.c | 1 |
2 files changed, 12 insertions, 13 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index f2ed2778f2..3ea442f818 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -2458,9 +2458,9 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau DEBUG(5,("set_canon_ace_list: acl group control on and current user in file %s primary group.\n", fsp->fsp_name )); - become_root_uid_only(); + become_root(); sret = SMB_VFS_SYS_ACL_SET_FILE(conn, fsp->fsp_name, the_acl_type, the_acl); - unbecome_root_uid_only(); + unbecome_root(); if (sret == 0) { ret = True; } @@ -2489,9 +2489,9 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau DEBUG(5,("set_canon_ace_list: acl group control on and current user in file %s primary group.\n", fsp->fsp_name )); - become_root_uid_only(); + become_root(); sret = SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, the_acl); - unbecome_root_uid_only(); + unbecome_root(); if (sret == 0) { ret = True; } @@ -3018,10 +3018,10 @@ static int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_ /* Case (3) */ ( has_restore_priv ) ) { - become_root_uid_only(); + become_root(); /* Keep the current file gid the same - take ownership doesn't imply group change. */ ret = SMB_VFS_CHOWN(conn, fname, uid, (gid_t)-1); - unbecome_root_uid_only(); + unbecome_root(); return ret; } } @@ -3045,10 +3045,10 @@ static int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_ */ uid = current_user.ut.uid; - become_root_uid_only(); + become_root(); /* Keep the current file gid the same. */ ret = SMB_VFS_FCHOWN(fsp, fsp->fh->fd, uid, (gid_t)-1); - unbecome_root_uid_only(); + unbecome_root(); close_file_fchmod(fsp); @@ -3226,9 +3226,9 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) "current user in file %s primary group. Override delete_def_acl\n", fsp->fsp_name )); - become_root_uid_only(); + become_root(); sret = SMB_VFS_SYS_ACL_DELETE_DEF_FILE(conn, fsp->fsp_name); - unbecome_root_uid_only(); + unbecome_root(); } if (sret == -1) { @@ -3273,9 +3273,9 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) "current user in file %s primary group. Override chmod\n", fsp->fsp_name )); - become_root_uid_only(); + become_root(); sret = SMB_VFS_CHMOD(conn,fsp->fsp_name, posix_perms); - unbecome_root_uid_only(); + unbecome_root(); } if (sret == -1) { diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 89d082e1ac..8588580322 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -420,4 +420,3 @@ BOOL unbecome_user(void) pop_conn_ctx(); return True; } - |