The Samba-Bugzilla – Attachment 3883 Details for
Bug 4308
Excel save operation corrupts file ACLs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
look1 (text/plain), 1.86 KB, created by
Jeremy Allison
on 2009-01-22 12:42:37 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-01-22 12:42:37 UTC
Size:
1.86 KB
patch
obsolete
>diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c >index 33cba6a..23bf40f 100644 >--- a/source/smbd/posix_acls.c >+++ b/source/smbd/posix_acls.c >@@ -3338,7 +3338,6 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) > mode_t orig_mode = (mode_t)0; > uid_t orig_uid; > gid_t orig_gid; >- BOOL need_chown = False; > > DEBUG(10,("set_nt_acl: called for file %s\n", fsp->fsp_name )); > >@@ -3377,16 +3376,6 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) > */ > > if (((user != (uid_t)-1) && (orig_uid != user)) || (( grp != (gid_t)-1) && (orig_gid != grp))) { >- need_chown = True; >- } >- >- /* >- * Chown before setting ACL only if we don't change the user, or >- * if we change to the current user, but not if we want to give away >- * the file. >- */ >- >- if (need_chown && (user == (uid_t)-1 || user == current_user.ut.uid)) { > > DEBUG(3,("set_nt_acl: chown %s. uid = %u, gid = %u.\n", > fsp->fsp_name, (unsigned int)user, (unsigned int)grp )); >@@ -3423,9 +3412,6 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) > orig_mode = sbuf.st_mode; > orig_uid = sbuf.st_uid; > orig_gid = sbuf.st_gid; >- >- /* We did it, don't try again */ >- need_chown = False; > } > > create_file_sids(&sbuf, &file_owner_sid, &file_grp_sid); >@@ -3577,19 +3563,6 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd) > free_canon_ace_list(dir_ace_list); > } > >- /* Any chown pending? */ >- if (need_chown) { >- >- DEBUG(3,("set_nt_acl: chown %s. uid = %u, gid = %u.\n", >- fsp->fsp_name, (unsigned int)user, (unsigned int)grp )); >- >- if(try_chown( fsp->conn, fsp->fsp_name, user, grp) == -1) { >- DEBUG(3,("set_nt_acl: chown %s, %u, %u failed. Error = %s.\n", >- fsp->fsp_name, (unsigned int)user, (unsigned int)grp, strerror(errno) )); >- return False; >- } >- } >- > return True; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4308
:
2780
|
2814
|
2818
|
2957
|
3733
|
3750
|
3751
|
3882
| 3883 |
3884
|
3885
|
3886
|
3887