priv: Narrow down privileges
authorMichael Neumann <mneumann@ntecs.de>
Wed, 17 Jun 2009 19:18:45 +0000 (21:18 +0200)
committerMichael Neumann <mneumann@ntecs.de>
Wed, 17 Jun 2009 19:18:45 +0000 (21:18 +0200)
sys/kern/kern_plimit.c

index 4a788af..cff3701 100644 (file)
@@ -347,7 +347,8 @@ kern_setrlimit(u_int which, struct rlimit *limp)
         if (limp->rlim_cur > alimp->rlim_max ||
             limp->rlim_max > alimp->rlim_max) {
                spin_unlock_rd(&limit->p_spin);
-                if ((error = priv_check_cred(p->p_ucred, PRIV_ROOT, PRISON_ROOT)))
+                if ((error = priv_check_cred(p->p_ucred, PRIV_PROC_SETRLIMIT,
+                                            PRISON_ROOT)))
                         return (error);
        } else {
                spin_unlock_rd(&limit->p_spin);