- 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)
+ - nice - max nice priority allowed to raise to (Linux 2.6.12 and higher)
- rtprio - max realtime priority allowed for non-priviledged
processes (Linux 2.6.12 and higher)
_pam_log(LOG_DEBUG,"unknown limit type '%s'", lim_type);
return;
}
- if (limit_item != LIMIT_PRI && (strcmp(lim_value, "-1") == 0
+ if (limit_item != LIMIT_PRI
+#ifdef RLIMIT_NICE
+ && limit_item != RLIMIT_NICE
+#endif
+ && (strcmp(lim_value, "-1") == 0
|| strcmp(lim_value, "-") == 0 || strcmp(lim_value, "unlimited") == 0
|| strcmp(lim_value, "infinity") == 0)) {
int_value = -1;
rlimit_value = RLIM_INFINITY;
} else if (limit_item == LIMIT_PRI || limit_item == LIMIT_LOGIN ||
+#ifdef RLIMIT_NICE
+ limit_item == RLIMIT_NICE ||
+#endif
limit_item == LIMIT_NUMSYSLOGINS) {
long temp;
temp = strtol (lim_value, &endptr, 10);
case RLIMIT_AS:
if (rlimit_value != RLIM_INFINITY)
rlimit_value *= 1024;
+#ifdef RLIMIT_NICE
+ case RLIMIT_NICE:
+ if (int_value > 19)
+ int_value = 19;
+ rlimit_value = 19 - int_value;
+#endif
break;
}