Merge branches 'master' and 'suser_to_priv'
[dragonfly.git] / sys / platform / pc64 / amd64 / machdep.c
index 7879650..ef52ecc 100644 (file)
@@ -62,6 +62,7 @@
 #include <sys/linker.h>
 #include <sys/malloc.h>
 #include <sys/proc.h>
+#include <sys/priv.h>
 #include <sys/buf.h>
 #include <sys/reboot.h>
 #include <sys/mbuf.h>
@@ -2240,7 +2241,7 @@ set_dbregs(struct lwp *lp, struct dbreg *dbregs)
                 * from within kernel mode?
                 */
 
-               if (suser_cred(ucred, 0) != 0) {
+               if (priv_check_cred(ucred, PRIV_ROOT, 0) != 0) {
                        if (dbregs->dr[7] & 0x3) {
                                /* dr0 is enabled */
                                if (dbregs->dr[0] >= VM_MAX_USER_ADDRESS)