From: Tomas Mraz Date: Fri, 13 Sep 2013 13:20:01 +0000 (+0200) Subject: Write to *rounds only if non-NULL. X-Git-Tag: Linux-PAM-1_1_8~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45ec020678ffc82f6c2849935907e2d83710a1f2;p=linux-pam Write to *rounds only if non-NULL. modules/pam_unix/support.c(_set_ctrl): Write to *rounds only if non-NULL. --- diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c index d8f4a6f7..9284dbaa 100644 --- a/modules/pam_unix/support.c +++ b/modules/pam_unix/support.c @@ -176,7 +176,7 @@ int _set_ctrl(pam_handle_t *pamh, int flags, int *remember, int *rounds, free (val); /* read number of rounds for crypt algo */ - if (on(UNIX_SHA256_PASS, ctrl) || on(UNIX_SHA512_PASS, ctrl)) { + if (rounds && (on(UNIX_SHA256_PASS, ctrl) || on(UNIX_SHA512_PASS, ctrl))) { val=search_key ("SHA_CRYPT_MAX_ROUNDS", LOGIN_DEFS); if (val) {