Mercurial > illumos > illumos-gate
changeset 13946:41660db11225
3305 smbfs mount shows password
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Marcel Telka <marcel@telka.sk>
Approved by: Richard Lowe <richlowe@richlowe.net>
author | Gordon Ross <gwr@nexenta.com> |
---|---|
date | Tue, 30 Oct 2012 23:03:27 -0400 |
parents | 7a9c1d41dfbe |
children | 4ae108c6a5d7 |
files | usr/src/cmd/fs.d/smbclnt/mount/mount.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/fs.d/smbclnt/mount/mount.c Tue Feb 05 11:15:10 2013 -0800 +++ b/usr/src/cmd/fs.d/smbclnt/mount/mount.c Tue Oct 30 23:03:27 2012 -0400 @@ -36,7 +36,7 @@ * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright 2012 Nexenta Systems, Inc. All rights reserved. */ #include <stdio.h> @@ -162,6 +162,7 @@ * to an "ro" by option processing. */ char optbuf[MAX_MNTOPT_STR] = "rw"; +char special[MAXPATHLEN]; int main(int argc, char *argv[]) @@ -298,7 +299,10 @@ if (optind + 2 != argc) usage(); - mnt.mnt_special = argv[optind]; + (void) snprintf(special, sizeof (special), "//%s/%s", + ctx->ct_fullserver, ctx->ct_origshare); + + mnt.mnt_special = special; mnt.mnt_mountp = argv[optind+1]; if ((realpath(argv[optind+1], mount_point) == NULL) ||