[Bug 336711] New: Cifs umount error with hidden share
https://bugzilla.novell.com/show_bug.cgi?id=336711 Summary: Cifs umount error with hidden share Product: openSUSE 10.3 Version: Final Platform: HP OS/Version: openSUSE 10.3 Status: NEW Severity: Normal Priority: P5 - None Component: Samba AssignedTo: samba-maintainers@SuSE.de ReportedBy: m.vanveen@franksolutions.nl QAContact: qa@suse.de Found By: Customer When mounting a directory on a hidden cifs share as a normal user, umounting produces the following error. umount: /mnt/some_dir mount disagrees with the fstab Root can umount the cifs share. When mounting the hidden share directly the user can umount the share. The following fstab entry results in the error, notice the server path: //192.168.1.10/hidden$/some_dir /mnt/some_dir cifs noauto,username=myuser,password=mypass,domain=ourdomain,rw,user The following fstab entry does not result in the error, again notice the server path: //192.168.1.10/hidden$ /mnt/some_dir cifs noauto,username=myuser,password=mypass,domain=ourdomain,rw,user -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711 David Mair <dmair@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|samba-maintainers@SuSE.de |kernel-maintainers@forge.provo.novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c2 Jeff Mahoney <jeffm@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeffm@novell.com Status|NEW |NEEDINFO Info Provider| |m.vanveen@franksolutions.nl --- Comment #2 from Jeff Mahoney <jeffm@novell.com> 2007-10-30 15:22:28 MST --- Can you provide the output of the umount command run with strace (strace <command>) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c3 Machiel van Veen <m.vanveen@franksolutions.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|m.vanveen@franksolutions.nl | --- Comment #3 from Machiel van Veen <m.vanveen@franksolutions.nl> 2007-10-31 02:09:49 MST --- Created an attachment (id=181368) --> (https://bugzilla.novell.com/attachment.cgi?id=181368) Strace cifs umount error -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c4 --- Comment #4 from Machiel van Veen <m.vanveen@franksolutions.nl> 2007-10-31 02:20:51 MST --- (From update of attachment 181368) execve("/bin/umount", ["umount", "/mnt/backup/"], [/* 57 vars */]) = 0 brk(0) = 0x8058000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=106615, ...}) = 0 mmap2(NULL, 106615, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7eea000 close(3) = 0 open("/lib/libvolume_id.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \26\0\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=35468, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ee9000 mmap2(NULL, 37008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7edf000 fadvise64(3, 0, 37008, POSIX_FADV_WILLNEED) = 0 mmap2(0xb7ee7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb7ee7000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@a\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1281488, ...}) = 0 mmap2(NULL, 1254896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7dac000 fadvise64(3, 0, 1254896, POSIX_FADV_WILLNEED) = 0 mmap2(0xb7ed9000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12c) = 0xb7ed9000 mmap2(0xb7edc000, 9712, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7edc000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7dab000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7dab6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 mprotect(0xb7ed9000, 4096, PROT_READ) = 0 munmap(0xb7eea000, 106615) = 0 brk(0) = 0x8058000 brk(0x8079000) = 0x8079000 open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/share/locale/locale.alias", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=2528, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f04000 read(3, "# Locale name alias data base.\n#"..., 4096) = 2528 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7f04000, 4096) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=373, ...}) = 0 mmap2(NULL, 373, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f04000 close(3) = 0 open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=25486, ...}) = 0 mmap2(NULL, 25486, PROT_READ, MAP_SHARED, 3, 0) = 0xb7efd000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_MEASUREMENT", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_MEASUREMENT", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=23, ...}) = 0 mmap2(NULL, 23, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7efc000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_TELEPHONE", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_TELEPHONE", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=59, ...}) = 0 mmap2(NULL, 59, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7efb000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_ADDRESS", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_ADDRESS", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=155, ...}) = 0 mmap2(NULL, 155, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7efa000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_NAME", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_NAME", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=77, ...}) = 0 mmap2(NULL, 77, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef9000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_PAPER", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_PAPER", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=34, ...}) = 0 mmap2(NULL, 34, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef8000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_MESSAGES", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 close(3) = 0 open("/usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=52, ...}) = 0 mmap2(NULL, 52, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef7000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_MONETARY", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_MONETARY", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=286, ...}) = 0 mmap2(NULL, 286, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef6000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_COLLATE", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_COLLATE", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=915314, ...}) = 0 mmap2(NULL, 915314, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ccb000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_TIME", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_TIME", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=2454, ...}) = 0 mmap2(NULL, 2454, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef5000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_NUMERIC", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_NUMERIC", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=54, ...}) = 0 mmap2(NULL, 54, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ef4000 close(3) = 0 open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=254020, ...}) = 0 mmap2(NULL, 254020, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7c8c000 close(3) = 0 umask(022) = 022 getuid32() = 1000 geteuid32() = 1000 readlink("/mnt", 0xbfad9f37, 4096) = -1 EINVAL (Invalid argument) readlink("/mnt/backup", 0xbfad9f37, 4096) = -1 EINVAL (Invalid argument) umask(077) = 022 open("/etc/mtab", O_RDONLY|O_LARGEFILE) = 3 umask(022) = 077 fstat64(3, {st_mode=S_IFREG|0644, st_size=359, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7c8b000 read(3, "/dev/sda3 / ext3 rw,acl,user_xat"..., 4096) = 359 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7c8b000, 4096) = 0 stat64("/sbin/umount.cifs", {st_mode=S_IFREG|S_ISUID|0755, st_size=14256, ...}) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7dab708) = 30456 wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 30456 --- SIGCHLD (Child exited) @ 0 (0) --- exit_group(0) = ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c5 --- Comment #5 from Machiel van Veen <m.vanveen@franksolutions.nl> 2007-10-31 02:22:03 MST --- After doing "strace umount /mnt/backup" I found the share was unmounted. I reproduced and could not without the strace command. So umount with strace seems to work without still the same issue. I'm not sure what to make of this but I've added the strace anyway. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c6 Jeff Mahoney <jeffm@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |m.vanveen@franksolutions.nl --- Comment #6 from Jeff Mahoney <jeffm@novell.com> 2007-10-31 09:47:42 MST --- So does the mount actually fail, or does it succeed but issue that message? Looking at the strace, it doesn't have permission to edit /etc/mtab, which is expected since it's not suid root. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c7 --- Comment #7 from Machiel van Veen <m.vanveen@franksolutions.nl> 2007-10-31 10:17:53 MST --- The first strace is when i umount the share and it fails because I did not notice the umount worked with strace before. I just saw it after I posted the output. The second is of a successful umount because for some unknown reason it works with strace in front of the umount command. I should note I had trouble mounting cifs shares as a user. I found out mount.cifs was not suid root so a user option in the fstab would not work. I changed that and it works except when I try to umount this specific type of share. I changed the permisions of /etc/mtab (u+s) now so this can't be a problem anymore. Since the issue has not been solved, I wonder, can anyone reproduce? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c8 --- Comment #8 from Jeff Mahoney <jeffm@novell.com> 2007-10-31 10:33:22 MST --- Have you tried making umount.cifs suid root as well? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c9 --- Comment #9 from Machiel van Veen <m.vanveen@franksolutions.nl> 2007-11-01 02:15:41 MST --- Yes, umount and umount.cifs are suid root. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c10 --- Comment #10 from Machiel van Veen <m.vanveen@franksolutions.nl> 2007-11-01 03:05:38 MST --- I have reproduced on a freshly installed 10.3 system, fully patched. I installed mount.cifs, chmod u+s for mount.cifs, umount.cifs. I set ownership of /mnt/backup to the user and set the fstab entry. //192.168.1.10/hidden$/some_dir /mnt/backup cifs noauto,username=myuser,password=mypass,domain=ourdomain,rw,user As the user mount "/mnt/backup" works but mtab reports: //192.168.1.10/hidden$ /mnt/backup cifs rw,mand,noexec,nosuid,nodev,user=myuser 0 0 Please note the faulty path of the share making umount and a user produce the error. Using "strace umount /mnt/backup" does not produce errors and the share is unmounted, root can also umount properly. A workaround, "alias umount="strace umount &> /dev/null". It's a hack and probably a bad one but it works for now. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c11 --- Comment #11 from Jeff Mahoney <jeffm@novell.com> 2007-11-01 08:30:14 MST --- As I woke up this morning, I remembered that strace will strip setuid privs from anything running under it. By using strace, it's the same as not chmod u+s {,u}mount.cifs -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=336711#c12 Machiel van Veen <m.vanveen@franksolutions.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED Info Provider|m.vanveen@franksolutions.nl | Resolution| |INVALID --- Comment #12 from Machiel van Veen <m.vanveen@franksolutions.nl> 2007-11-02 07:17:05 MST --- Alright, I have been looking in to it some more and found out it's documented. I got this from the readme from the source package, section "Allowing User Unmounts". "Also note that the customary way of allowing user mounts and unmounts is (instead of using mount.cifs and unmount.cifs as suid) to add a line to the file /etc/fstab for each //server/share you wish to mount, but this can become unwieldy when potential mount targets include many or unpredictable UNC names." So because the UNC name is read incorrect the user umount does not work. Umount.cifs does work according to the readme, that is correct I just tried it. I did not before because I thought umount.cifs would be handeling this for umount anyway. It seems there are many points of the process where the behavior of (u)mount(.cifs) can be altered. Since the lack of this feature is documented its not a bug. Still this lacking feature is really confusing for users and not clearly documented in the man pages but in a hard to get readme. It would be nice if the feature can be added. After all if a user can use mount its only logical for them to also use umount. Thanks for you feedback on this Jeff and I hope you can pass my feature request along. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com