From 2e879cfacc23dd619055a7f5861dcab520951b2c Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 11 Dec 2003 19:47:52 +0000 Subject: mount.cifs failed to mount to directory owned by user when run setuid (This used to be commit 18c0315c3cb1a28fd870f8dd5d92f2e9117a29fc) --- source3/client/mount.cifs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/client') 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; } } -- cgit