diff options
author | Tomas Mraz <tm@t8m.info> | 2005-06-22 08:11:02 +0000 |
---|---|---|
committer | Tomas Mraz <tm@t8m.info> | 2005-06-22 08:11:02 +0000 |
commit | af62aef12b42f38c40ce68a7ef1d1933576918e0 (patch) | |
tree | dcfd0c80f021accca461c3a9eddb6906968d35de | |
parent | 0a7fe016a03184815b03fe92d50c58e67c8c05fc (diff) | |
download | pam-af62aef12b42f38c40ce68a7ef1d1933576918e0.tar.gz pam-af62aef12b42f38c40ce68a7ef1d1933576918e0.tar.bz2 pam-af62aef12b42f38c40ce68a7ef1d1933576918e0.zip |
Relevant BUGIDs:
Purpose of commit: new feature
Commit summary:
---------------
pam_limits: Support new limits in linux 2.6.12
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | modules/pam_limits/README | 4 | ||||
-rw-r--r-- | modules/pam_limits/limits.skel | 2 | ||||
-rw-r--r-- | modules/pam_limits/pam_limits.c | 8 |
4 files changed, 15 insertions, 0 deletions
@@ -87,6 +87,7 @@ BerliOS Bugs are marked with (BerliOS #XXXX). the config file (Novell #81690 - kukuk) * Fix all occurrence of dereferencing type-punned pointer will break strict-aliasing rules warnings (kukuk) +* pam_limits: Support new limits in linux 2.6.12 (t8m) 0.79: Thu Mar 31 16:48:45 CEST 2005 * pam_tally: added audit option (toady) diff --git a/modules/pam_limits/README b/modules/pam_limits/README index ac37afe1..ab2b6545 100644 --- a/modules/pam_limits/README +++ b/modules/pam_limits/README @@ -42,6 +42,10 @@ Where: - sigpending - max number of pending signals (Linux 2.6 and higher) - msgqueue - max memory used by POSIX message queues (bytes) (Linux 2.6 and higher) + - nice - max nice priority allowed to raise to. Nice levels 19..-20 + correspond to 0..39 values of this limit (Linux 2.6.12 and higher) + - rtprio - max realtime priority allowed for non-priviledged + processes (Linux 2.6.12 and higher) Note, if you specify a type of '-' but neglect to supply the item and value fields then the module will never enforce any limits on the diff --git a/modules/pam_limits/limits.skel b/modules/pam_limits/limits.skel index d805e0ce..c52778b1 100644 --- a/modules/pam_limits/limits.skel +++ b/modules/pam_limits/limits.skel @@ -33,6 +33,8 @@ # - locks - max number of file locks the user can hold # - sigpending - max number of pending signals # - msgqueue - max memory used by POSIX message queues (bytes) +# - nice - max nice priority allowed to raise to +# - rtprio - max realtime priority # #<domain> <type> <item> <value> # diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c index eec3917a..5909cb28 100644 --- a/modules/pam_limits/pam_limits.c +++ b/modules/pam_limits/pam_limits.c @@ -306,6 +306,14 @@ static void process_limit(int source, const char *lim_type, else if (strcmp(lim_item, "msgqueue") == 0) limit_item = RLIMIT_MSGQUEUE; #endif +#ifdef RLIMIT_NICE + else if (strcmp(lim_item, "nice") == 0) + limit_item = RLIMIT_NICE; +#endif +#ifdef RLIMIT_RTPRIO + else if (strcmp(lim_item, "rtprio") == 0) + limit_item = RLIMIT_RTPRIO; +#endif else if (strcmp(lim_item, "maxlogins") == 0) { limit_item = LIMIT_LOGIN; pl->flag_numsyslogins = 0; |