The Samba-Bugzilla – Attachment 2815 Details for
Bug 4784
umount.cifs allows all users to unmount shares
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to correctly check the return value of ioctl()
cifs-umount-same-user.patch (text/plain), 870 bytes, created by
Steve Langasek
on 2007-07-12 18:42:53 UTC
(
hide
)
Description:
patch to correctly check the return value of ioctl()
Filename:
MIME Type:
Creator:
Steve Langasek
Created:
2007-07-12 18:42:53 UTC
Size:
870 bytes
patch
obsolete
>Goal: the CIFS_IOC_CHECKMOUNT ioctl check assumed that errors would return a >value > 0, when in fact the return value on failure is -1. Correct this >assumption, which was allowing any user to unmount shares mounted by other >users. > >Index: samba-3.0.25b/source/client/umount.cifs.c >=================================================================== >--- samba-3.0.25b.orig/source/client/umount.cifs.c 2007-07-12 00:30:57.000000000 -0700 >+++ samba-3.0.25b/source/client/umount.cifs.c 2007-07-12 15:44:00.000000000 -0700 >@@ -131,7 +131,7 @@ > printf("user unmounting via %s is an optional feature of",thisprogram); > printf(" the cifs filesystem driver (cifs.ko)"); > printf("\n\tand requires cifs.ko version 1.32 or later\n"); >- } else if (rc > 0) >+ } else if (rc != 0) > printf("user unmount of %s failed with %d %s\n",dir,errno,strerror(errno)); > close(fileid); >
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 4784
: 2815