mount.cifs failed to mount to directory owned by user when run setuid
authorSteve French <sfrench@samba.org>
Thu, 11 Dec 2003 19:47:52 +0000 (19:47 +0000)
committerSteve French <sfrench@samba.org>
Thu, 11 Dec 2003 19:47:52 +0000 (19:47 +0000)
(This used to be commit 18c0315c3cb1a28fd870f8dd5d92f2e9117a29fc)

source3/client/mount.cifs.c

index 43b20e9d502cdbd00002065acfeb62a5c752ea1a..71639d6f34316d3385f435d28cacf5850cfa1e5c 100755 (executable)
@@ -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;
                }
        }