summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve French <sfrench@samba.org>2007-04-26 17:23:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:42 -0500
commit3e2f29eefd6c50c4474b297912e8e08d1537b20b (patch)
tree821b23253c7b7fce991a9e1413922afe66e14b20
parent3e8283cf7c5892bcb958ae0028b2a61484088583 (diff)
downloadsamba-3e2f29eefd6c50c4474b297912e8e08d1537b20b.tar.gz
samba-3e2f29eefd6c50c4474b297912e8e08d1537b20b.tar.bz2
samba-3e2f29eefd6c50c4474b297912e8e08d1537b20b.zip
r22526: Support deep tree mounts after share (instead of having to specify
prepath) (This used to be commit 0548dea6c7222dc22144a86fffd32675cd14b677)
-rwxr-xr-xsource3/client/mount.cifs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index 7e4c27c820..49150e1ffb 100755
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -78,6 +78,7 @@ static int free_share_name = 0;
static char * user_name = NULL;
static char * mountpassword = NULL;
char * domain_name = NULL;
+char * prefixpath = NULL;
/* BB finish BB
@@ -804,6 +805,11 @@ continue_unc_parsing:
host_entry = gethostbyname(unc_name);
}
*(share - 1) = '/'; /* put the slash back */
+ if ((prefixpath = strchr(share, '/'))) {
+ *prefixpath = 0; /* permanently terminate the string */
+ if (!strlen(++prefixpath))
+ prefixpath = NULL; /* this needs to be done explicitly */
+ }
if(got_ip) {
if(verboseflag)
printf("ip address specified explicitly\n");
@@ -1196,6 +1202,10 @@ mount_retry:
strcat(options,",");
strcat(options,orgoptions);
}
+ if(prefixpath) {
+ strncat(options,",prefixpath=",12);
+ strcat(options,prefixpath); /* no need to cat the / */
+ }
if(verboseflag)
printf("\nmount.cifs kernel mount options %s \n",options);
if(mount(share_name, mountpoint, "cifs", flags, options)) {