summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-09-30 09:45:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:57 -0500
commit9430017b304b5d88cb12bcb67b531c66b6a6fdcd (patch)
treee371584f8d98c224384fca8d7c24df79af21dcf0 /source3/smbd
parent2b7d1fc7797e3124e3f6e5d579bfc275141f6000 (diff)
downloadsamba-9430017b304b5d88cb12bcb67b531c66b6a6fdcd.tar.gz
samba-9430017b304b5d88cb12bcb67b531c66b6a6fdcd.tar.bz2
samba-9430017b304b5d88cb12bcb67b531c66b6a6fdcd.zip
r19010: Fix bug 4137
(This used to be commit 3790d00a78fa4133b9875b9fed36f5752dce8e7f)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/share_access.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/share_access.c b/source3/smbd/share_access.c
index cee88bcf0b..adb9d16964 100644
--- a/source3/smbd/share_access.c
+++ b/source3/smbd/share_access.c
@@ -217,6 +217,10 @@ BOOL user_ok_token(const char *username, struct nt_user_token *token, int snum)
const char *list[2];
list[0] = lp_username(snum);
list[1] = NULL;
+ if ((list[0] == NULL) || (*list[0] == '\0')) {
+ DEBUG(0, ("'only user = yes' and no 'username ='\n"));
+ return False;
+ }
if (!token_contains_name_in_list(NULL, lp_servicename(snum),
token, list)) {
DEBUG(10, ("%s != 'username'\n", username));