summaryrefslogtreecommitdiffstats
path: root/source/lib/username.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-03-19 22:06:54 +0000
committerGerald Carter <jerry@samba.org>2004-03-19 22:06:54 +0000
commita90c3bd281e7a62bb8482e42aa3b674eeeb5995a (patch)
tree12e87ff1df0c0a3198c3e2e4d6b0063ff49e25b2 /source/lib/username.c
parenta6ed306d11e011d493b6b484465e4f7d74728d42 (diff)
downloadsamba-a90c3bd281e7a62bb8482e42aa3b674eeeb5995a.tar.gz
samba-a90c3bd281e7a62bb8482e42aa3b674eeeb5995a.tar.xz
samba-a90c3bd281e7a62bb8482e42aa3b674eeeb5995a.zip
BUG 417: fix %UuGg variables expansion in include lines setging the current_user_info struct in register_vuid() -- shouldn't be any more broken than we were
Diffstat (limited to 'source/lib/username.c')
-rw-r--r--source/lib/username.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/lib/username.c b/source/lib/username.c
index 40327f81687..ac5530b5c71 100644
--- a/source/lib/username.c
+++ b/source/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));