summaryrefslogtreecommitdiff
path: root/source3/lib/username.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/username.c')
-rw-r--r--source3/lib/username.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/username.c b/source3/lib/username.c
index 40327f8168..ac5530b5c7 100644
--- a/source3/lib/username.c
+++ b/source3/lib/username.c
@@ -283,6 +283,11 @@ struct passwd *Get_Pwnam(const char *user)
fstring user2;
struct passwd *ret;
+ if ( *user == '\0' ) {
+ DEBUG(10,("Get_Pwnam: empty username!\n"));
+ return NULL;
+ }
+
fstrcpy(user2, user);
DEBUG(5,("Finding user %s\n", user));