the faulty line here : if((statbuf.st_uid == getuid())
patch attached On Tuesday 19 December, 2006 � 06:37:59AM +0100, Christian Perrier wrote: > Quoting juan ([EMAIL PROTECTED]): > > Package: smbfs > > Version: 3.0.23d-2+b1 > > Severity: normal > > > > > > mount.cifs //dozo/myshare /mnt/ -o guest > > mount error: permission denied or not superuser and mount.cifs not > > installed SUID > > > > $ ls -l /sbin/*cifs > > -rwsr-xr-x 1 root root 20440 Dec 4 19:09 /sbin/mount.cifs* > > -rwsr-xr-x 1 root root 8888 Dec 4 19:09 /sbin/umount.cifs* > > Well: > > [EMAIL PROTECTED]:~/tmp> mount.cifs //localhost/public ~/tmp/tmp-samba -o > bubulle > Password: > [EMAIL PROTECTED]:~/tmp> > > [EMAIL PROTECTED]:~> ls -l /sbin/*cifs > -rwsr-xr-x 1 root root 20440 2006-12-04 19:09 /sbin/mount.cifs > -rwsr-xr-x 1 root root 8888 2006-12-04 19:09 /sbin/umount.cifs > > > Probably something else than samba directly.... >
*** mount.cifs.c.orig Tue Dec 19 11:47:33 2006 --- mount.cifs.c Tue Dec 19 11:47:40 2006 *************** *** 815,821 **** } if((getuid() != 0) && (geteuid() == 0)) { ! if((statbuf.st_uid == getuid()) && (S_IRWXU == (statbuf.st_mode & S_IRWXU))) { #ifndef CIFS_ALLOW_USR_SUID /* Do not allow user mounts to control suid flag for mount unless explicitly built that way */ --- 815,821 ---- } if((getuid() != 0) && (geteuid() == 0)) { ! if((S_IRWXU == (statbuf.st_mode & S_IRWXU))) { #ifndef CIFS_ALLOW_USR_SUID /* Do not allow user mounts to control suid flag for mount unless explicitly built that way */