Goal: the CIFS_IOC_CHECKMOUNT ioctl check assumed that errors would return a value > 0, when in fact the return value on failure is -1. Correct this assumption, which was allowing any user to unmount shares mounted by other users. Index: samba-3.0.25b/source/client/umount.cifs.c =================================================================== --- samba-3.0.25b.orig/source/client/umount.cifs.c 2007-07-12 00:30:57.000000000 -0700 +++ samba-3.0.25b/source/client/umount.cifs.c 2007-07-12 15:44:00.000000000 -0700 @@ -131,7 +131,7 @@ printf("user unmounting via %s is an optional feature of",thisprogram); printf(" the cifs filesystem driver (cifs.ko)"); printf("\n\tand requires cifs.ko version 1.32 or later\n"); - } else if (rc > 0) + } else if (rc != 0) printf("user unmount of %s failed with %d %s\n",dir,errno,strerror(errno)); close(fileid);