diff options
Diffstat (limited to 'usr/src/lib/libsmbfs/smb/ctx.c')
-rw-r--r-- | usr/src/lib/libsmbfs/smb/ctx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/src/lib/libsmbfs/smb/ctx.c b/usr/src/lib/libsmbfs/smb/ctx.c index 40a62a3853..d29ec7bf0b 100644 --- a/usr/src/lib/libsmbfs/smb/ctx.c +++ b/usr/src/lib/libsmbfs/smb/ctx.c @@ -33,7 +33,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1253,6 +1253,14 @@ smb_ctx_get_tree(struct smb_ctx *ctx) strlcpy(tcon->tc_sh.sh_name, ctx->ct_origshare, sizeof (tcon->tc_sh.sh_name)); + /* + * Share password (unused - no share-level security) + * MS-SMB 2.2.6 says this should be null terminated, + * and the length includes the null. Did bzero above, + * so just set length for the null. + */ + tcon->tc_sh.sh_pwlen = 1; + /* The share "use" type. */ stype = smb_use_type_str(ctx->ct_shtype_req); strlcpy(tcon->tc_sh.sh_type_req, stype, |