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