1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source3/client
Jeff Layton 161db3e8e8 mount.cifs: fix several problems when mounting subdirectories of shares (try 2)
This patch is the second patch to attempt to fix up some of the problems
with mounting subdirectories of shares. The earlier patch didn't handle
this correctly when POSIX extensions were enabled. This one does.

This is a bit of a confusing area since the different components of
a service string have different rules:

1) hostname: no '/' (slash) or '\' (backslash) is allowed to be
	     embedded within the string

2) sharename: same rules as hostname

3) prefixpath: '\' *is* allowed to be embedded in a path component,
	       iff POSIX extensions are enabled. Otherwise, neither
	       character is allowed.

The idea here is to allow either character to act as a delimiter when we
know that the character can't be anything but a delimiter (namely
everywhere up to the start of the prefixpath). The patch will convert
any '\' unconditionally to '/' in the UNC portion of the string.

However, inside the prefixpath, we can't make assumptions about what
constitutes a delimiter because POSIX allows for embedded '\'
characters. So there we don't attempt to do any conversion, and pass the
prefixpath to the kernel as is. Once the kernel determines whether POSIX
extensions are enabled, it can then convert the path if needed and it's
able to do so. A patch to handle this has already been committed to the
cifs-2.6 git tree.

This patch also fixes an annoyance. When you mount a subdir of a share,
mount.cifs munges the device string so that you can't tell what the
prefixpath is. So if I mount:

	//server/share/p1/p2/p3

..then /proc/mounts and mtab will show only:

	//server/share

Finally, it also tries to apply some consistent rules to the uppercasing
of strings.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(This used to be commit e03d1dfdb8)
2008-03-31 16:05:20 -04:00
..
cifs_spnego.h * helper source for handling cifs kernel module upcall for kerberos 2007-12-05 14:33:29 -05:00
cifs.spnego.c Adds support for cifs.resolver upcall. 2008-01-16 09:51:06 -05:00
client.c More ssize_t->SMB_OFF_T 2008-03-28 15:32:02 +01:00
clitar.c Fix Coverity ID 564 2008-03-15 22:30:25 +01:00
dnsbrowse.c Fix a "no prototype" warning 2007-12-19 20:48:45 +01:00
mount.cifs.c mount.cifs: fix several problems when mounting subdirectories of shares (try 2) 2008-03-31 16:05:20 -04:00
smbspool.c Eliminate global variable in_client and a plethora of extern declarations. 2008-03-06 10:41:42 -05:00
tree.c Fix sample gtk code. Does this compile ? 2007-12-04 18:24:19 -08:00
umount.cifs.c Fix bug #4784. Patch from Steve Langasek <vorlon@debian.org>. 2007-12-12 18:45:13 -08:00