Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 65456 Details for
Bug 101766
PAM needs Rlimits support for kernel >= 2.6.12
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
PAM Rlimits patch
pam-limits2.patch (text/plain), 1.37 KB, created by
Reuben Martin
on 2005-08-08 10:04:21 UTC
(
hide
)
Description:
PAM Rlimits patch
Filename:
MIME Type:
Creator:
Reuben Martin
Created:
2005-08-08 10:04:21 UTC
Size:
1.37 KB
patch
obsolete
>This one allows you to place nice values in the limits.conf > > >--- Linux-PAM-0.77/modules/pam_limits/pam_limits.c.prio 2005-01-14 10:47:03.000000000 -0800 >+++ Linux-PAM-0.77/modules/pam_limits/pam_limits.c 2005-01-14 10:55:13.000000000 -0800 >@@ -39,6 +39,11 @@ > #include <grp.h> > #include <pwd.h> > >+/* Hack to test new rlimit values */ >+#define RLIMIT_NICE 13 >+#define RLIMIT_RTPRIO 14 >+#define RLIM_NLIMITS 15 >+ > /* Module defines */ > #define LINE_LENGTH 1024 > >@@ -293,6 +298,10 @@ static void process_limit(int source, co > else if (strcmp(lim_item, "locks") == 0) > limit_item = RLIMIT_LOCKS; > #endif >+ else if (strcmp(lim_item, "rt_priority") == 0) >+ limit_item = RLIMIT_RTPRIO; >+ else if (strcmp(lim_item, "nice") == 0) >+ limit_item = RLIMIT_NICE; > else if (strcmp(lim_item, "maxlogins") == 0) { > limit_item = LIMIT_LOGIN; > pl->flag_numsyslogins = 0; >@@ -360,6 +369,19 @@ static void process_limit(int source, co > case RLIMIT_AS: > limit_value *= 1024; > break; >+ case RLIMIT_NICE: >+ limit_value = 19 - limit_value; >+ if (limit_value > 39) >+ limit_value = 39; >+ if (limit_value < 0) >+ limit_value = 0; >+ break; >+ case RLIMIT_RTPRIO: >+ if (limit_value > 99) >+ limit_value = 99; >+ if (limit_value < 0) >+ limit_value = 0; >+ break; > } > > if ( (limit_item != LIMIT_LOGIN)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 101766
: 65456