On Thu, 16 Mar 2006 21:08:29 +0000
Mike Williams <[EMAIL PROTECTED]> wrote:

> It's the user option.
> user lets any normal user mount it, but no-one else unmount it.
> users does the same, but lets a normal user other than the one which
> mounted it, to unmount it.
> 
> man mount
> for more info.

The problem is that I cannot even *mount* it as a regular user.

[EMAIL PROTECTED] $ mount /mnt/kaleb/
mount error: permission denied or not superuser and mount.cifs not
installed SUID

mount.cifs is SUID:

[EMAIL PROTECTED] $ ls -l /usr/bin/mount.cifs
-rws--x--x  1 root root 21232 Mar 10 12:14 /usr/bin/mount.cifs


Running strace on the mount command like so:
strace mount /mnt/kaleb/ &> trace.txt

Gives me this at the end of the output:

readlink("/mnt", 0xbf95d3e0, 4096)      = -1 EINVAL (Invalid argument)
readlink("/mnt/kaleb", 0xbf95d3e0, 4096) = -1 EINVAL (Invalid argument)
umask(077)                              = 02
open("/etc/fstab", O_RDONLY|O_LARGEFILE) = 3
umask(02)                               = 077
fstat64(3, {st_mode=S_IFREG|0644, st_size=454, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7dee000 read(3, "/dev/hda1\t/\t\t\treiserfs\tnotail,no"...,
131072) = 454 read(3, "", 131072)                     = 0
close(3)                                = 0
munmap(0xb7dee000, 131072)              = 0
stat64("/sbin/mount.cifs", {st_mode=S_IFREG|S_ISUID|0755,
st_size=21232, ...}) = 0 clone(mount error: permission denied or not
superuser and mount.cifs not installed SUID child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7e0e708) = 23707 --- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 255}], 0, NULL) = 23707
exit_group(255)                         = ?


The interesting part is where stat64 is called on /sbin/mount.cifs.
/sbin/mount.cifs is a symlink to ../usr/bin/mount.cifs.  Maybe mount
thinks that /sbin/mount.cifs is not SUID even though where it points to
is SUID?

Jim
-- 
gentoo-user@gentoo.org mailing list

Reply via email to