diff options
Diffstat (limited to 'debian/patches-applied/027_pam_limits_better_init_allow_explicit_root')
-rw-r--r-- | debian/patches-applied/027_pam_limits_better_init_allow_explicit_root | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/debian/patches-applied/027_pam_limits_better_init_allow_explicit_root b/debian/patches-applied/027_pam_limits_better_init_allow_explicit_root index 0145201d..de73761e 100644 --- a/debian/patches-applied/027_pam_limits_better_init_allow_explicit_root +++ b/debian/patches-applied/027_pam_limits_better_init_allow_explicit_root @@ -1,10 +1,10 @@ Allow explicit limits for root. Also, remove limits on su. -Index: Linux-PAM/modules/pam_limits/pam_limits.c +Index: pam.deb/modules/pam_limits/pam_limits.c =================================================================== ---- Linux-PAM/modules/pam_limits/pam_limits.c.orig -+++ Linux-PAM/modules/pam_limits/pam_limits.c -@@ -69,6 +69,7 @@ +--- pam.deb.orig/modules/pam_limits/pam_limits.c ++++ pam.deb/modules/pam_limits/pam_limits.c +@@ -70,6 +70,7 @@ /* internal data */ struct pam_limit_s { @@ -12,7 +12,7 @@ Index: Linux-PAM/modules/pam_limits/pam_limits.c int login_limit; /* the max logins limit */ int login_limit_def; /* which entry set the login limit */ int flag_numsyslogins; /* whether to limit logins only for a -@@ -219,6 +220,7 @@ +@@ -224,6 +225,7 @@ D(("called.")); @@ -20,7 +20,7 @@ Index: Linux-PAM/modules/pam_limits/pam_limits.c for(i = 0; i < RLIM_NLIMITS; i++) { int r = getrlimit(i, &pl->limits[i].limit); if (r == -1) { -@@ -230,6 +232,38 @@ +@@ -235,6 +237,38 @@ pl->limits[i].supported = 1; pl->limits[i].src_soft = LIMITS_DEF_NONE; pl->limits[i].src_hard = LIMITS_DEF_NONE; @@ -59,7 +59,7 @@ Index: Linux-PAM/modules/pam_limits/pam_limits.c } } -@@ -510,7 +544,7 @@ +@@ -525,7 +559,7 @@ if (i == 4) { /* a complete line */ if (strcmp(uname, domain) == 0) /* this user have a limit */ process_limit(pamh, LIMITS_DEF_USER, ltype, item, value, ctrl, pl); @@ -68,7 +68,7 @@ Index: Linux-PAM/modules/pam_limits/pam_limits.c if (ctrl & PAM_DEBUG_ARG) { pam_syslog(pamh, LOG_DEBUG, "checking if %s is in group %s", -@@ -519,7 +553,7 @@ +@@ -534,7 +568,7 @@ if (pam_modutil_user_in_group_nam_nam(pamh, uname, domain+1)) process_limit(pamh, LIMITS_DEF_GROUP, ltype, item, value, ctrl, pl); @@ -77,7 +77,7 @@ Index: Linux-PAM/modules/pam_limits/pam_limits.c if (ctrl & PAM_DEBUG_ARG) { pam_syslog(pamh, LOG_DEBUG, "checking if %s is in group %s", -@@ -533,7 +567,7 @@ +@@ -548,7 +582,7 @@ process_limit(pamh, LIMITS_DEF_ALLGROUP, ltype, item, value, ctrl, pl); } @@ -86,7 +86,7 @@ Index: Linux-PAM/modules/pam_limits/pam_limits.c process_limit(pamh, LIMITS_DEF_DEFAULT, ltype, item, value, ctrl, pl); } else if (i == 2 && ltype[0] == '-') { /* Probably a no-limit line */ -@@ -568,6 +602,12 @@ +@@ -583,6 +617,12 @@ int status; int retval = LIMITED_OK; @@ -99,12 +99,12 @@ Index: Linux-PAM/modules/pam_limits/pam_limits.c for (i=0, status=LIMITED_OK; i<RLIM_NLIMITS; i++) { if (!pl->limits[i].supported) { /* skip it if its not known to the system */ -@@ -648,6 +688,8 @@ +@@ -669,6 +709,8 @@ return PAM_ABORT; } + if (pwd->pw_uid == 0) -+ pl.root = 1; - retval = parse_config_file(pamh, pwd->pw_name, ctrl, &pl); ++ pl->root = 1; + retval = parse_config_file(pamh, pwd->pw_name, ctrl, pl); if (retval == PAM_IGNORE) { - D(("the configuration file has an applicable '<domain> -' entry")); + D(("the configuration file ('%s') has an applicable '<domain> -' entry", CONF_FILE)); |