[Pdbg] [PATCH] main: Run as root
Amitay Isaacs
amitay at ozlabs.org
Wed Mar 28 14:41:26 AEDT 2018
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
src/main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main.c b/src/main.c
index 121e4ad..878761c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -493,6 +493,11 @@ int main(int argc, char *argv[])
if (target_select())
return 1;
+ if (geteuid() != 0) {
+ fprintf(stderr, "Run as root\n");
+ return 1;
+ }
+
pdbg_target_probe();
for (i = 0; i < ARRAY_SIZE(actions); i++) {
--
2.14.3
More information about the Pdbg
mailing list