summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/smbpasswd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index e02a8115a1..7ca9c37f28 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -558,6 +558,8 @@ static int process_root(int argc, char *argv[])
ZERO_STRUCT(user_name);
ZERO_STRUCT(user_password);
+ user_name[0] = '\0';
+
while ((ch = getopt(argc, argv, "ax:d:e:hmnj:r:sR:D:U:L")) != EOF) {
switch(ch) {
case 'L':
@@ -685,6 +687,7 @@ static int process_root(int argc, char *argv[])
switch(argc) {
case 0:
+ fstrcpy(user_name, "");
break;
case 1:
fstrcpy(user_name, argv[0]);