aboutsummaryrefslogtreecommitdiff
path: root/pwgen.c
diff options
context:
space:
mode:
authorPhilipp Klaus <philipp.klaus@gmail.com>2011-06-21 17:12:22 +0200
committerPhilipp Klaus <philipp.klaus@gmail.com>2011-06-21 17:12:22 +0200
commitf6085cae15588228695eba6f7e0c2a490641bff9 (patch)
treede0a0d62d136a675cff09437de11507d2e5c52c2 /pwgen.c
parent1832804a4c6771ff86fba6064a6fb575524b64ef (diff)
downloadpwgen-f6085cae15588228695eba6f7e0c2a490641bff9.zip
automatic commit for pwgen-2.05
Diffstat (limited to 'pwgen.c')
-rw-r--r--pwgen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pwgen.c b/pwgen.c
index 3af933b..a371f92 100644
--- a/pwgen.c
+++ b/pwgen.c
@@ -158,6 +158,10 @@ int main(int argc, char **argv)
pw_length = strtol(argv[optind], &tmp, 0);
if (pw_length < 5)
pwgen = pw_rand;
+ if (pw_length <= 2)
+ pwgen_flags &= ~PW_UPPERS;
+ if (pw_length <= 1)
+ pwgen_flags &= ~PW_DIGITS;
if (*tmp) {
fprintf(stderr, "Invalid password length: %s\n",
argv[optind]);