summaryrefslogtreecommitdiff
path: root/source3/smbd/share_access.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/share_access.c')
-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));