diff options
author | trasz <trasz@FreeBSD.org> | 2014-09-25 17:59:00 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2014-09-25 17:59:00 +0000 |
commit | bb5379e9a2f748abed4de69c61b20523c4d77ac7 (patch) | |
tree | b6824314bfe24549cccc551ff3d66bc359cfe481 | |
parent | 7688b8f62ed48ee55b407507aace051a59ebf123 (diff) | |
download | FreeBSD-src-bb5379e9a2f748abed4de69c61b20523c4d77ac7.zip FreeBSD-src-bb5379e9a2f748abed4de69c61b20523c4d77ac7.tar.gz |
MFC r271259:
Make it possible to use empty user name ("-U ''") for mount_smbfs(8).
It's just like "-U guest", except that it actually works, at least
with Samba 4, which seems to return authentication failure for "-U guest".
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
-rw-r--r-- | contrib/smbfs/lib/smb/ctx.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/contrib/smbfs/lib/smb/ctx.c b/contrib/smbfs/lib/smb/ctx.c index c7b3ecab..2458607 100644 --- a/contrib/smbfs/lib/smb/ctx.c +++ b/contrib/smbfs/lib/smb/ctx.c @@ -191,10 +191,6 @@ smb_ctx_parseunc(struct smb_ctx *ctx, const char *unc, int sharetype, smb_error("no user name required", 0); return EINVAL; } - if (*p1 == 0) { - smb_error("empty user name", 0); - return EINVAL; - } error = smb_ctx_setuser(ctx, tmp); if (error) return error; @@ -521,11 +517,6 @@ smb_ctx_resolve(struct smb_ctx *ctx) smb_error("no server name specified", 0); return EINVAL; } - if (ssn->ioc_user[0] == 0) { - smb_error("no user name specified for server %s", - 0, ssn->ioc_srvname); - return EINVAL; - } if (ctx->ct_minlevel >= SMBL_SHARE && sh->ioc_share[0] == 0) { smb_error("no share name specified for %s@%s", 0, ssn->ioc_user, ssn->ioc_srvname); |