Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143158398
D39538.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D39538.diff
View Options
diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c
--- a/sys/kern/subr_kdb.c
+++ b/sys/kern/subr_kdb.c
@@ -40,6 +40,7 @@
#include <sys/malloc.h>
#include <sys/lock.h>
#include <sys/pcpu.h>
+#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/sbuf.h>
#include <sys/smp.h>
@@ -484,6 +485,11 @@
kdb_dbbe_select(const char *name)
{
struct kdb_dbbe *be, **iter;
+ int error;
+
+ error = priv_check(curthread, PRIV_KDB_SET_BACKEND);
+ if (error)
+ return (error);
SET_FOREACH(iter, kdb_dbbe_set) {
be = *iter;
diff --git a/sys/sys/priv.h b/sys/sys/priv.h
--- a/sys/sys/priv.h
+++ b/sys/sys/priv.h
@@ -515,10 +515,15 @@
#define PRIV_KMEM_READ 680 /* Open mem/kmem for reading. */
#define PRIV_KMEM_WRITE 681 /* Open mem/kmem for writing. */
+/*
+ * Kernel debugger privileges.
+ */
+#define PRIV_KDB_SET_BACKEND 690 /* Allow setting KDB backend. */
+
/*
* Track end of privilege list.
*/
-#define _PRIV_HIGHEST 682
+#define _PRIV_HIGHEST 691
/*
* Validate that a named privilege is known by the privilege system. Invalid
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 27, 5:46 PM (2 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28058826
Default Alt Text
D39538.diff (1 KB)
Attached To
Mode
D39538: Add new privilege PRIV_KDB_SET_BACKEND
Attached
Detach File
Event Timeline
Log In to Comment