From bb3a915c9df2e7356f7ed171ac05c4ad08ec010a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 17 Oct 2005 11:33:13 +0000 Subject: r11113: fixed two small bugs in newuser - randpass() is now in the random ejs module, not global - don't dereference the undefined variable on getopt failure (This used to be commit 7e338c23f5ac351b362a9e07fd81ec07bc700484) --- source4/setup/newuser | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/setup/newuser') diff --git a/source4/setup/newuser b/source4/setup/newuser index cf2c7b8382..c114338d27 100755 --- a/source4/setup/newuser +++ b/source4/setup/newuser @@ -16,7 +16,7 @@ options = GetOptions(ARGV, 'quiet'); if (options == undefined) { - println("Failed to parse options: " + options.ERROR); + println("Failed to parse options"); return -1; } @@ -56,6 +56,7 @@ if (options['username'] == undefined) { ShowHelp(); } if (options['password'] == undefined) { + random_init(local); options.password = randpass(12); printf("chose random password %s\n", options.password); } -- cgit