diff options
author | Jeremy Allison <jra@samba.org> | 2000-03-01 18:58:50 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-03-01 18:58:50 +0000 |
commit | 50444a0b5fd1bece0dd031840873867d92c9507d (patch) | |
tree | 418ef2fe9acb8824a9713ed002b1bdeb00b99afe /source3/utils | |
parent | 72606557082f7bdd87729dd3871b57833a6ff060 (diff) | |
download | samba-50444a0b5fd1bece0dd031840873867d92c9507d.tar.gz samba-50444a0b5fd1bece0dd031840873867d92c9507d.tar.bz2 samba-50444a0b5fd1bece0dd031840873867d92c9507d.zip |
Fixed smbpasswd crash bugs found by Giulio.
Jeremy.
(This used to be commit 54440428e5dbf5c1e673e881d3a9364e64ad2ad7)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbpasswd.c | 5 |
1 files changed, 2 insertions, 3 deletions
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. |