summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2005-01-07 12:16:01 +0000
committerTomas Mraz <tm@t8m.info>2005-01-07 12:16:01 +0000
commit2ff2e4efe031c6ff3d4f2bd54121e304fea3d024 (patch)
tree3d0b2cf473cebd2ee6f5596a9d2ea349df582513 /modules
parent6a117d5418f224a668a0a58d6299c212357a1972 (diff)
Relevant BUGIDs: Red Hat bz 131190
Purpose of commit: new feature Commit summary: --------------- Support new limits of Linux kernel 2.6
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_limits/README3
-rw-r--r--modules/pam_limits/limits.skel2
-rw-r--r--modules/pam_limits/pam_limits.c8
3 files changed, 13 insertions, 0 deletions
diff --git a/modules/pam_limits/README b/modules/pam_limits/README
index 023b9575..32afb197 100644
--- a/modules/pam_limits/README
+++ b/modules/pam_limits/README
@@ -39,6 +39,9 @@ Where:
- maxsyslogins - max number of logins on the system
- priority - lower the priority by given value (value can be -ve)
- locks - max locked files (Linux 2.4 and higher)
+ - 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)
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 ccb4e103..9ba31b19 100644
--- a/modules/pam_limits/limits.skel
+++ b/modules/pam_limits/limits.skel
@@ -30,6 +30,8 @@
# - maxlogins - max number of logins for this user
# - priority - the priority to run user process with
# - 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)
#
#<domain> <type> <item> <value>
#
diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c
index 2e9314a8..9ba19843 100644
--- a/modules/pam_limits/pam_limits.c
+++ b/modules/pam_limits/pam_limits.c
@@ -293,6 +293,14 @@ static void process_limit(int source, const char *lim_type,
else if (strcmp(lim_item, "locks") == 0)
limit_item = RLIMIT_LOCKS;
#endif
+#ifdef RLIMIT_SIGPENDING
+ else if (strcmp(lim_item, "sigpending") == 0)
+ limit_item = RLIMIT_SIGPENDING;
+#endif
+#ifdef RLIMIT_MSGQUEUE
+ else if (strcmp(lim_item, "msgqueue") == 0)
+ limit_item = RLIMIT_MSGQUEUE;
+#endif
else if (strcmp(lim_item, "maxlogins") == 0) {
limit_item = LIMIT_LOGIN;
pl->flag_numsyslogins = 0;