aboutsummaryrefslogtreecommitdiff
path: root/lib/utils_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils_base.h')
-rw-r--r--lib/utils_base.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/utils_base.h b/lib/utils_base.h
index 86adecf8..b4bd92ee 100644
--- a/lib/utils_base.h
+++ b/lib/utils_base.h
@@ -102,4 +102,8 @@ void np_init(char *, int argc, char **argv);
void np_set_args(int argc, char **argv);
void np_cleanup();
+/* mp_suid() returns true if the real and effective uids differs, such as when
+ * running a suid plugin */
+#define mp_suid() (getuid() != geteuid())
+
#endif /* _UTILS_BASE_ */