The Samba-Bugzilla – Attachment 4471 Details for
Bug 4675
umount.cifs creates /etc/mtab as a file even when it is a symlink
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix updating of /etc/mtab
umount.cifs.symlink.1.patch (text/plain), 888 bytes, created by
shirishpargaonkar@gmail.com
on 2009-07-26 15:07:13 UTC
(
hide
)
Description:
patch to fix updating of /etc/mtab
Filename:
MIME Type:
Creator:
shirishpargaonkar@gmail.com
Created:
2009-07-26 15:07:13 UTC
Size:
888 bytes
patch
obsolete
>diff --git a/source3/client/umount.cifs.c b/source3/client/umount.cifs.c >index 81925ed..a85e399 100644 >--- a/source3/client/umount.cifs.c >+++ b/source3/client/umount.cifs.c >@@ -146,9 +146,11 @@ static int remove_from_mtab(char * mount > FILE * org_fd; > FILE * new_fd; > struct mntent * mount_entry; >+ struct stat statbuf; > >- /* Do we need to check if it is a symlink to e.g. /proc/mounts >- in which case we probably do not want to update it? */ >+ /* If it is a symlink, e.g. to /proc/mounts, no need to update it. */ >+ if ((lstat(MOUNTED, &statbuf) == 0) && (S_ISLNK(statbuf.st_mode))) >+ return 0; > > /* Do we first need to check if it is writable? */ > >@@ -162,7 +164,6 @@ static int remove_from_mtab(char * mount > printf("attempting to remove from mtab\n"); > > org_fd = setmntent(MOUNTED, "r"); >- > if(org_fd == NULL) { > printf("Can not open %s\n",MOUNTED); > unlock_mtab();
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 4675
: 4471