The Samba-Bugzilla – Attachment 3115 Details for
Bug 5190
rsyncd can't unlink dir structure when only the group has write permission
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Force user-write on files before deltion.
chmod-del.patch (text/plain), 1.01 KB, created by
Wayne Davison
on 2008-01-19 11:45:52 UTC
(
hide
)
Description:
Force user-write on files before deltion.
Filename:
MIME Type:
Creator:
Wayne Davison
Created:
2008-01-19 11:45:52 UTC
Size:
1.01 KB
patch
obsolete
>--- a/generator.c >+++ b/generator.c >@@ -151,6 +151,9 @@ static enum delret delete_item(char *fbuf, int mode, char *replace, int flags) > fbuf, mode, flags); > } > >+ if (!am_root && !(mode & S_IWUSR)) >+ do_chmod(fbuf, mode |= S_IWUSR); /* at least try... */ >+ > if (S_ISDIR(mode) && !(flags & DEL_DIR_IS_EMPTY)) { > ignore_perishable = 1; > /* If DEL_RECURSE is not set, this just reports emptiness. */ >@@ -259,9 +262,12 @@ static enum delret delete_dir_contents(char *fname, int flags) > > strlcpy(p, fp->basename, remainder); > /* Save stack by recursing to ourself directly. */ >- if (S_ISDIR(fp->mode) >- && delete_dir_contents(fname, flags | DEL_RECURSE) != DR_SUCCESS) >- ret = DR_NOT_EMPTY; >+ if (S_ISDIR(fp->mode)) { >+ if (!am_root && !(fp->mode & S_IWUSR)) >+ do_chmod(fname, fp->mode |= S_IWUSR); /* at least try... */ >+ if (delete_dir_contents(fname, flags | DEL_RECURSE) != DR_SUCCESS) >+ ret = DR_NOT_EMPTY; >+ } > if (delete_item(fname, fp->mode, NULL, flags) != DR_SUCCESS) > ret = DR_NOT_EMPTY; > }
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 5190
: 3115