From 50444a0b5fd1bece0dd031840873867d92c9507d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 1 Mar 2000 18:58:50 +0000 Subject: Fixed smbpasswd crash bugs found by Giulio. Jeremy. (This used to be commit 54440428e5dbf5c1e673e881d3a9364e64ad2ad7) --- source3/utils/smbpasswd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index dcfafaa8b9..7a0d0eeea9 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -271,11 +271,10 @@ static int process_root(int argc, char *argv[]) char *old_passwd = NULL; char *remote_machine = NULL; - while ((ch = getopt(argc, argv, "a:x:d:e:mnj:r:sR:D:U:")) != EOF) { + while ((ch = getopt(argc, argv, "ax:d:e:mnj:r:sR:D:U:")) != EOF) { switch(ch) { case 'a': local_flags |= LOCAL_ADD_USER; - user_name = optarg; break; case 'x': local_flags |= LOCAL_DELETE_USER; @@ -297,6 +296,7 @@ static int process_root(int argc, char *argv[]) case 'n': local_flags |= LOCAL_SET_NO_PASSWORD; new_passwd = "NO PASSWORD"; + break; case 'j': new_domain = optarg; strupper(new_domain); @@ -328,7 +328,6 @@ static int process_root(int argc, char *argv[]) argc -= optind; argv += optind; - /* * Ensure add/delete user and either remote machine or join domain are * not both set. -- cgit