summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--modules/pam_limits/README4
-rw-r--r--modules/pam_limits/limits.skel2
-rw-r--r--modules/pam_limits/pam_limits.c8
4 files changed, 15 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index d5607b76..8a7d5f87 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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;