svn commit: samba r22526 - in branches/SAMBA_3_0/source/client: .
sfrench at samba.org
sfrench at samba.org
Thu Apr 26 17:23:34 GMT 2007
Author: sfrench
Date: 2007-04-26 17:23:33 +0000 (Thu, 26 Apr 2007)
New Revision: 22526
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22526
Log:
Support deep tree mounts after share (instead of having to specify
prepath)
Modified:
branches/SAMBA_3_0/source/client/mount.cifs.c
Changeset:
Modified: branches/SAMBA_3_0/source/client/mount.cifs.c
===================================================================
--- branches/SAMBA_3_0/source/client/mount.cifs.c 2007-04-26 17:22:13 UTC (rev 22525)
+++ branches/SAMBA_3_0/source/client/mount.cifs.c 2007-04-26 17:23:33 UTC (rev 22526)
@@ -78,6 +78,7 @@
static char * user_name = NULL;
static char * mountpassword = NULL;
char * domain_name = NULL;
+char * prefixpath = NULL;
/* BB finish BB
@@ -804,6 +805,11 @@
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 @@
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)) {
More information about the samba-cvs
mailing list