diff -Nrup Linux-PAM-0.77.orig/modules/pam_limits/limits.skel Linux-PAM-0.77.rlimit_prio/modules/pam_limits/limits.skel
--- Linux-PAM-0.77.orig/modules/pam_limits/limits.skel	2002-05-09 14:03:57.000000000 +0200
+++ Linux-PAM-0.77.rlimit_prio/modules/pam_limits/limits.skel	2005-01-09 04:51:27.439463677 +0100
@@ -29,6 +29,9 @@
 #        - as - address space limit
 #        - maxlogins - max number of logins for this user
 #        - priority - the priority to run user process with
+#        - maxprio - max scheduling priority
+#                    0-39 for nice levels 19 .. -20
+#                    40-139 for realtime polices
 #        - locks - max number of file locks the user can hold
 #
 #<domain>      <type>  <item>         <value>
diff -Nrup Linux-PAM-0.77.orig/modules/pam_limits/pam_limits.c Linux-PAM-0.77.rlimit_prio/modules/pam_limits/pam_limits.c
--- Linux-PAM-0.77.orig/modules/pam_limits/pam_limits.c	2005-01-08 19:24:03.201807000 +0100
+++ Linux-PAM-0.77.rlimit_prio/modules/pam_limits/pam_limits.c	2005-01-09 04:49:31.218024237 +0100
@@ -293,6 +293,10 @@ static void process_limit(int source, co
     else if (strcmp(lim_item, "locks") == 0)
 	limit_item = RLIMIT_LOCKS;
 #endif
+#ifdef RLIMIT_PRIO
+    else if (strcmp(lim_item, "maxprio") == 0)
+	limit_item = RLIMIT_PRIO;
+#endif
     else if (strcmp(lim_item, "maxlogins") == 0) {
 	limit_item = LIMIT_LOGIN;
 	pl->flag_numsyslogins = 0;
