diff options
author | Tomas Mraz <tm@t8m.info> | 2005-01-07 12:16:01 +0000 |
---|---|---|
committer | Tomas Mraz <tm@t8m.info> | 2005-01-07 12:16:01 +0000 |
commit | 2ff2e4efe031c6ff3d4f2bd54121e304fea3d024 (patch) | |
tree | 3d0b2cf473cebd2ee6f5596a9d2ea349df582513 /modules/pam_limits | |
parent | 6a117d5418f224a668a0a58d6299c212357a1972 (diff) | |
download | pam-2ff2e4efe031c6ff3d4f2bd54121e304fea3d024.tar.gz pam-2ff2e4efe031c6ff3d4f2bd54121e304fea3d024.tar.bz2 pam-2ff2e4efe031c6ff3d4f2bd54121e304fea3d024.zip |
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/pam_limits')
-rw-r--r-- | modules/pam_limits/README | 3 | ||||
-rw-r--r-- | modules/pam_limits/limits.skel | 2 | ||||
-rw-r--r-- | modules/pam_limits/pam_limits.c | 8 |
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; |