The Samba-Bugzilla – Attachment 3808 Details for
Bug 5743
recycle:touch_mtime or recycle:touch do not function
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
recycle:touch patch backported from SVN SAMBA_3_2_0 r23691 (GPLv2)
samba-3.0.28a-vfs_recycle-touch.patch (text/plain), 1.18 KB, created by
SATOH Fumiyasu
on 2008-12-12 05:53:13 UTC
(
hide
)
Description:
recycle:touch patch backported from SVN SAMBA_3_2_0 r23691 (GPLv2)
Filename:
MIME Type:
Creator:
SATOH Fumiyasu
Created:
2008-12-12 05:53:13 UTC
Size:
1.18 KB
patch
obsolete
>Call become_root() before SMB_VFS_NEXT_NTIMES() to touch >a removed file that is owned by another user. >Backport from SVN SAMBA_3_2_0 r23691 (GPLv2). > >diff -rup samba-3.0.28a/source/modules/vfs_recycle.c samba-3.0.28a.osstech/source/modules/vfs_recycle.c >--- samba-3.0.28a/source/modules/vfs_recycle.c 2008-03-09 00:33:35.000000000 +0900 >+++ samba-3.0.28a.osstech/source/modules/vfs_recycle.c 2008-04-18 02:41:26.000000000 +0900 >@@ -390,6 +390,7 @@ static void recycle_do_touch(vfs_handle_ > { > SMB_STRUCT_STAT st; > struct timespec ts[2]; >+ int ret, err; > > if (SMB_VFS_NEXT_STAT(handle, fname, &st) != 0) { > DEBUG(0,("recycle: stat for %s returned %s\n", fname, strerror(errno))); >@@ -398,8 +399,13 @@ static void recycle_do_touch(vfs_handle_ > ts[0] = timespec_current(); /* atime */ > ts[1] = touch_mtime ? ts[0] : get_mtimespec(&st); /* mtime */ > >- if (SMB_VFS_NEXT_NTIMES(handle, fname, ts) == -1 ) { >- DEBUG(0, ("recycle: touching %s failed, reason = %s\n", fname, strerror(errno))); >+ become_root(); >+ ret = SMB_VFS_NEXT_NTIMES(handle, fname, ts); >+ err = errno; >+ unbecome_root(); >+ if (ret == -1 ) { >+ DEBUG(0, ("recycle: touching %s failed, reason = %s\n", >+ fname, strerror(err))); > } > } >
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 5743
: 3808