summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve French <sfrench@samba.org>2003-12-11 19:47:52 +0000
committerSteve French <sfrench@samba.org>2003-12-11 19:47:52 +0000
commit2e879cfacc23dd619055a7f5861dcab520951b2c (patch)
tree485f3415d33688387c9536c2aa3ffefff2fc0cc3
parent2719275ebfdfc0dfc460c9d29c51e8968039602e (diff)
downloadsamba-2e879cfacc23dd619055a7f5861dcab520951b2c.tar.gz
samba-2e879cfacc23dd619055a7f5861dcab520951b2c.tar.bz2
samba-2e879cfacc23dd619055a7f5861dcab520951b2c.zip
mount.cifs failed to mount to directory owned by user when run setuid
(This used to be commit 18c0315c3cb1a28fd870f8dd5d92f2e9117a29fc)
-rwxr-xr-xsource3/client/mount.cifs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index 43b20e9d50..71639d6f34 100755
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -490,10 +490,10 @@ int main(int argc, char ** argv)
}
if((getuid() != 0) && (geteuid() == 0)) {
- if((statbuf.st_uid == getuid()) && (S_IRWXU == statbuf.st_mode & S_IRWXU)) {
+ if((statbuf.st_uid == getuid()) && (S_IRWXU == (statbuf.st_mode & S_IRWXU))) {
printf("setuid mount allowed\n");
} else {
- printf("mount error: permission denied, not superuser and cifs.mount not installed SUID\n");
+ printf("mount error: permission denied or not superuser and cifs.mount not installed SUID\n");
return -1;
}
}