Remove commented out code and FIXMEs

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>
This commit is contained in:
Iker Pedrosa 2022-05-10 15:01:21 +02:00 committed by Serge Hallyn
parent 23baa40d9d
commit 0b51cde162
4 changed files with 4 additions and 6 deletions

View File

@ -345,7 +345,6 @@ unsigned long getdef_ulong (const char *item, unsigned long dflt)
} }
if (getulong (d->value, &val) == 0) { if (getulong (d->value, &val) == 0) {
/* FIXME: we should have a getulong */
fprintf (shadow_logfd, fprintf (shadow_logfd,
_("configuration error - cannot parse %s value: '%s'"), _("configuration error - cannot parse %s value: '%s'"),
item, d->value); item, d->value);

View File

@ -171,8 +171,7 @@ struct spwd *sgetspent (const char *string)
if (fields[8][0] == '\0') { if (fields[8][0] == '\0') {
spwd.sp_flag = SHADOW_SP_FLAG_UNSET; spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
} else if (getlong (fields[8], &spwd.sp_flag) == 0) { } else if (getulong (fields[8], &spwd.sp_flag) == 0) {
/* FIXME: add a getulong function */
return 0; return 0;
} }

View File

@ -305,8 +305,7 @@ static struct spwd *my_sgetspent (const char *string)
if (fields[8][0] == '\0') { if (fields[8][0] == '\0') {
spwd.sp_flag = SHADOW_SP_FLAG_UNSET; spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
} else { } else {
if (getlong (fields[8], &spwd.sp_flag) == 0) { if (getulong (fields[8], &spwd.sp_flag) == 0) {
/* FIXME: add a getulong function */
#ifdef USE_NIS #ifdef USE_NIS
if (nis_used) { if (nis_used) {
spwd.sp_flag = SHADOW_SP_FLAG_UNSET; spwd.sp_flag = SHADOW_SP_FLAG_UNSET;

View File

@ -341,9 +341,10 @@ static /*@observer@*/const unsigned long BCRYPT_get_salt_rounds (/*@null@*/int *
/* /*
* Use 19 as an upper bound for now, * Use 19 as an upper bound for now,
* because musl doesn't allow rounds >= 20. * because musl doesn't allow rounds >= 20.
* If musl ever supports > 20 rounds,
* rounds should be set to B_ROUNDS_MAX.
*/ */
if (rounds > 19) { if (rounds > 19) {
/* rounds = B_ROUNDS_MAX; */
rounds = 19; rounds = 19;
} }
#endif /* USE_XCRYPT_GENSALT */ #endif /* USE_XCRYPT_GENSALT */