Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 130925 Details for
Bug 192526
[Patch] sys-apps/shadow - Add RLIMIT_NICE and RLIMIT_RTPRIO support without PAM
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
shadow-4.0.15-nice-rtprio.patch
shadow-4.0.15-nice-rtprio.patch (text/plain), 2.67 KB, created by
Justin Bronder (RETIRED)
on 2007-09-14 16:37:48 UTC
(
hide
)
Description:
shadow-4.0.15-nice-rtprio.patch
Filename:
MIME Type:
Creator:
Justin Bronder (RETIRED)
Created:
2007-09-14 16:37:48 UTC
Size:
2.67 KB
patch
obsolete
>diff -urN shadow-4.0.15/etc/limits shadow-4.0.15patched/etc/limits >--- shadow-4.0.15/etc/limits 1997-12-14 15:07:18.000000000 -0500 >+++ shadow-4.0.15patched/etc/limits 2007-09-13 12:58:48.000000000 -0400 >@@ -18,10 +18,12 @@ > # T: max CPU time (MIN) > # U: max number of processes > # L: max number of logins for this user >+# I: max nice value (0..39 translates to 20..-19) >+# O: max real time priority (0..MAX_RT_PRIO) > # > # Examples: > # the default entry >-#* L2 D6144 R2048 S2048 U32 N32 F16384 T5 C0 >+#* L2 D6144 R2048 S2048 U32 N32 F16384 T5 C0 I20 O0 > # another way of suspending a user login > #guest L0 > # this account has no limits >diff -urN shadow-4.0.15/libmisc/limits.c shadow-4.0.15patched/libmisc/limits.c >--- shadow-4.0.15/libmisc/limits.c 2005-09-05 13:32:17.000000000 -0400 >+++ shadow-4.0.15patched/libmisc/limits.c 2007-09-13 12:56:26.000000000 -0400 >@@ -187,7 +187,8 @@ > * [Kk]: k = file creation masK (umask) > * [Ll]: l = max number of logins for this user > * [Pp]: p = process priority -20..20 (negative = high, positive = low) >- * >+ * [Ii]: i = RLIMIT_NICE max nice value (0..39 translates to 20..-19) >+ * [Oo]: o = RLIMIT_RTPRIO max real time priority (linux/sched.h 0..MAX_RT_PRIO) > * Return value: > * 0 = okay, of course > * LOGIN_ERROR_RLIMIT = error setting some RLIMIT >@@ -275,6 +276,20 @@ > retval |= setrlimit_value (RLIMIT_STACK, pp, 1024); > break; > #endif >+#ifdef RLIMIT_NICE >+ case 'i': >+ case 'I': >+ /* RLIMIT_NICE - max scheduling priority (0..39) */ >+ retval |= setrlimit_value (RLIMIT_NICE, pp, 1); >+ break; >+#endif >+#ifdef RLIMIT_RTPRIO >+ case 'o': >+ case 'O': >+ /* RLIMIT_RTPRIO - max real time priority (0..MAX_RT_PRIO) */ >+ retval |= setrlimit_value (RLIMIT_RTPRIO, pp, 1); >+ break; >+#endif > case 'k': > case 'K': > retval |= set_umask (pp); >@@ -330,7 +345,7 @@ > * Imposing a limit should be done with care, so a wrong > * entry means no care anyway :-). A '-' as a limits > * strings means no limits --cristiang */ >- if (sscanf (buf, "%s%[ACDFMNRSTULPacdfmnrstulp0-9 \t-]", >+ if (sscanf (buf, "%s%[ACDFMNRSTULPIOacdfmnrstulpio0-9 \t-]", > name, tempbuf) == 2) { > if (strcmp (name, uname) == 0) { > strcpy (limits, tempbuf); >diff -urN shadow-4.0.15/man/limits.5 shadow-4.0.15patched/man/limits.5 >--- shadow-4.0.15/man/limits.5 2006-03-06 13:57:18.000000000 -0500 >+++ shadow-4.0.15patched/man/limits.5 2007-09-13 12:58:37.000000000 -0400 >@@ -67,6 +67,12 @@ > \(bu > P: process priority, set by > \fBsetpriority\fR(2). >+.TP 3 >+\(bu >+I: max nice value (0..39 which translates to 20..-19) >+.TP 3 >+\(bu >+O: max real time priority > .PP > For example, > \fIL2D2048N5\fR
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 192526
: 130925 |
130927