summaryrefslogtreecommitdiff
path: root/source3/client/umount.cifs.c
diff options
context:
space:
mode:
authorSteve French <sfrench@samba.org>2005-04-28 22:28:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:44 -0500
commit3a11fdc3877c5cac861d5f680ae7b8bfa0e9d4c0 (patch)
tree757a116b14920b1d2db14db8c6203fa20b8aa39f /source3/client/umount.cifs.c
parentae816fe9f95b78d2c7d99304dd1c7e4c2820d1b9 (diff)
downloadsamba-3a11fdc3877c5cac861d5f680ae7b8bfa0e9d4c0.tar.gz
samba-3a11fdc3877c5cac861d5f680ae7b8bfa0e9d4c0.tar.bz2
samba-3a11fdc3877c5cac861d5f680ae7b8bfa0e9d4c0.zip
r6514: Allow domain= to be specified in credentials file. Fix umount.cifs help, allow root to unmount someone
else's mount (This used to be commit ed27740397817c1f1b14ba187139c877dbf22168)
Diffstat (limited to 'source3/client/umount.cifs.c')
-rw-r--r--source3/client/umount.cifs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/client/umount.cifs.c b/source3/client/umount.cifs.c
index 02ed2caba4..88a9776b04 100644
--- a/source3/client/umount.cifs.c
+++ b/source3/client/umount.cifs.c
@@ -37,7 +37,7 @@
#include <fstab.h>
#define UNMOUNT_CIFS_VERSION_MAJOR "0"
-#define UNMOUNT_CIFS_VERSION_MINOR "3"
+#define UNMOUNT_CIFS_VERSION_MINOR "4"
#ifndef UNMOUNT_CIFS_VENDOR_SUFFIX
#define UNMOUNT_CIFS_VENDOR_SUFFIX ""
@@ -93,6 +93,7 @@ static void umount_cifs_usage(void)
printf("\n\tman 8 umount.cifs\n");
printf("\nTo display the version number of the cifs umount utility:");
printf("\n\t%s -V\n",thisprogram);
+ printf("\nNote that invoking the umount utility on cifs mounts, can execute /sbin/umount.cifs (if it is present and -i is not specified to umount).\n");
}
static int umount_check_perm(char * dir)
@@ -100,8 +101,11 @@ static int umount_check_perm(char * dir)
int fileid;
int rc;
- /* presumably can not chdir into the target as we do on mount */
+ /* allow root to unmount, no matter what */
+ if(getuid() == 0)
+ return 0;
+ /* presumably can not chdir into the target as we do on mount */
fileid = open(dir, O_RDONLY | O_DIRECTORY | O_NOFOLLOW, 0);
if(fileid == -1) {
if(verboseflg)