]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
passwords.c: Update number of rounds for passwords from 7 to 10
authorAdolf Belka <adolf.belka@ipfire.org>
Wed, 7 May 2025 09:58:33 +0000 (11:58 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 7 May 2025 10:13:32 +0000 (10:13 +0000)
- This improves the security of the root and admin passwords created and makes it the
   same as used for the proxy local auth password code in proxy.cgi & chpasswd.cgi

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/setup/passwords.c

index 6242577af9eb7540cd87ef711f7d952d1304976f..bb6ffe8e6884d797b651df33d2eb6043b9789f58 100644 (file)
@@ -56,7 +56,7 @@ int handleadminpassword(void)
                return 0;
        
        snprintf(commandstring, STRING_SIZE,
-               "/usr/bin/htpasswd -c -B -C 7 -b " CONFIG_ROOT "/auth/users admin '%s'", password);
+               "/usr/bin/htpasswd -c -B -C 10 -b " CONFIG_ROOT "/auth/users admin '%s'", password);
        sprintf(message, _("Setting %s 'admin' user password..."), NAME);
        if (runhiddencommandwithstatus(commandstring, _("Setting password"), message, NULL)) {
                sprintf(message, _("Problem setting %s 'admin' user password."), NAME);