summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource3/client/mount.cifs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index 4ae653b25d..7a51ee4b9b 100755
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -749,7 +749,11 @@ int main(int argc, char ** argv)
if((getuid() != 0) && (geteuid() == 0)) {
if((statbuf.st_uid == getuid()) && (S_IRWXU == (statbuf.st_mode & S_IRWXU))) {
- printf("setuid mount allowed\n");
+#ifndef CIFS_ALLOW_USR_SUID
+ /* Do not allow user mounts to control suid flag
+ for mount unless explicitly built that way */
+ flags |= MS_NOSUID;
+#endif
} else {
printf("mount error: permission denied or not superuser and cifs.mount not installed SUID\n");
return -1;