svn commit: r271259 - head/contrib/smbfs/lib/smb
Edward Tomasz Napierala
trasz at FreeBSD.org
Mon Sep 8 11:01:57 UTC 2014
Author: trasz
Date: Mon Sep 8 11:01:57 2014
New Revision: 271259
URL: http://svnweb.freebsd.org/changeset/base/271259
Log:
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".
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Modified:
head/contrib/smbfs/lib/smb/ctx.c
Modified: head/contrib/smbfs/lib/smb/ctx.c
==============================================================================
--- head/contrib/smbfs/lib/smb/ctx.c Mon Sep 8 10:57:43 2014 (r271258)
+++ head/contrib/smbfs/lib/smb/ctx.c Mon Sep 8 11:01:57 2014 (r271259)
@@ -191,10 +191,6 @@ smb_ctx_parseunc(struct smb_ctx *ctx, co
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);
More information about the svn-src-head
mailing list