diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-03-10 15:54:36 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-03-31 16:05:20 -0400 |
commit | 161db3e8e82857987382d204b2113abbbb1fcf4f (patch) | |
tree | 5afbd149e344b7b1815ecbc6e7a559b7fae35c2e /COPYING | |
parent | 8940fd09a67c79d73712e2dd4b197fffd613dd04 (diff) | |
download | samba-161db3e8e82857987382d204b2113abbbb1fcf4f.tar.gz samba-161db3e8e82857987382d204b2113abbbb1fcf4f.tar.bz2 samba-161db3e8e82857987382d204b2113abbbb1fcf4f.zip |
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 e03d1dfdb80333c071b600245eb749ef5664aa22)
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions