Remove preprocessor conditionals that are always true

Since the last commit, LIMITS is always defined.  Remove the dummy
macro, and all conditionals on it.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar 2022-12-02 22:22:55 +01:00 committed by Serge Hallyn
parent 9d695340b4
commit b76d9b540a

View File

@ -29,8 +29,6 @@
#include "getdef.h"
#include "shadowlog.h"
#include <sys/resource.h>
#define LIMITS
#ifdef LIMITS
#ifndef LIMITS_FILE
#define LIMITS_FILE "/etc/limits"
#endif
@ -477,7 +475,6 @@ static int setup_user_limits (const char *uname)
}
return do_user_limits (limits, uname);
}
#endif /* LIMITS */
static void setup_usergroups (const struct passwd *info)
@ -521,7 +518,6 @@ void setup_limits (const struct passwd *info)
*/
if (getdef_bool ("QUOTAS_ENAB")) {
#ifdef LIMITS
if (info->pw_uid != 0) {
if ((setup_user_limits (info->pw_name) & LOGIN_ERROR_LOGIN) != 0) {
(void) fputs (_("Too many logins.\n"), log_get_logfd());
@ -529,7 +525,6 @@ void setup_limits (const struct passwd *info)
exit (EXIT_FAILURE);
}
}
#endif
for (cp = info->pw_gecos; cp != NULL; cp = strchr (cp, ',')) {
if (',' == *cp) {
cp++;