]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Remove commented out code and FIXMEs
authorIker Pedrosa <ipedrosa@redhat.com>
Tue, 10 May 2022 13:01:21 +0000 (15:01 +0200)
committerSerge Hallyn <serge@hallyn.com>
Tue, 24 May 2022 12:49:11 +0000 (07:49 -0500)
In order to remove some of the FIXMEs it was necessary to change the
code and call getulong() instead of getlong().

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
lib/getdef.c
lib/sgetspent.c
lib/shadow.c
libmisc/salt.c

index fbaea2e1fbb9945fec72f74303d607722a8dd445..2e6022fa5cf1e60e4168f701226bd4a84d3434c9 100644 (file)
@@ -345,7 +345,6 @@ unsigned long getdef_ulong (const char *item, unsigned long dflt)
        }
 
        if (getulong (d->value, &val) == 0) {
-               /* FIXME: we should have a getulong */
                fprintf (shadow_logfd,
                         _("configuration error - cannot parse %s value: '%s'"),
                         item, d->value);
index a35b6759b566439dbcb4f62f7822d643a21f9cdb..cbadb7e6d9f2a6d8508914359bef53258c528447 100644 (file)
@@ -171,8 +171,7 @@ struct spwd *sgetspent (const char *string)
 
        if (fields[8][0] == '\0') {
                spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
-       } else if (getlong (fields[8], &spwd.sp_flag) == 0) {
-               /* FIXME: add a getulong function */
+       } else if (getulong (fields[8], &spwd.sp_flag) == 0) {
                return 0;
        }
 
index 9e86b90889f181de8749ad815943c043a2bd951c..b628b65733026cea7c041a37b03bf3ddcfe134d9 100644 (file)
@@ -305,8 +305,7 @@ static struct spwd *my_sgetspent (const char *string)
        if (fields[8][0] == '\0') {
                spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
        } else {
-               if (getlong (fields[8], &spwd.sp_flag) == 0) {
-                       /* FIXME: add a getulong function */
+               if (getulong (fields[8], &spwd.sp_flag) == 0) {
 #ifdef USE_NIS
                        if (nis_used) {
                                spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
index ebf162fc177a69c014c0ad11206993028e135e4a..450293d70b64dc83aaee549cdd2c5f8c6235ebeb 100644 (file)
@@ -341,9 +341,10 @@ static /*@observer@*/const unsigned long BCRYPT_get_salt_rounds (/*@null@*/int *
        /*
         * Use 19 as an upper bound for now,
         * because musl doesn't allow rounds >= 20.
+        * If musl ever supports > 20 rounds,
+        * rounds should be set to B_ROUNDS_MAX.
         */
        if (rounds > 19) {
-               /* rounds = B_ROUNDS_MAX; */
                rounds = 19;
        }
 #endif /* USE_XCRYPT_GENSALT */