summaryrefslogtreecommitdiffstats
path: root/lib/utils_base.h
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2014-01-25 09:22:09 (GMT)
committerThomas Guyot-Sionnest <dermoth@aei.ca>2014-01-25 09:22:09 (GMT)
commit68fe713335183dd37ced78821711c2a3f1ea2cc7 (patch)
treeb558cc2a200249002d2716a9e3803c272fb01aaf /lib/utils_base.h
parent25a289f307270bb8f814a2df923aeab50acd50c6 (diff)
downloadmonitoring-plugins-68fe713335183dd37ced78821711c2a3f1ea2cc7.tar.gz
Ignore MP_STATE_DIRECTORY in suid plugins
If a plugin still has suid privileges at the time np_enable_state() is called, the MP_STATE_DIRECTORY environment will be ignored. There is no need for a NEWS entry as no suid plugins use np_enable_state yet.
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 86adecf..b4bd92e 100644
--- a/lib/utils_base.h
+++ b/lib/utils_base.h
@@ -102,4 +102,8 @@ void np_init(char *, int argc, char **argv);
102void np_set_args(int argc, char **argv); 102void np_set_args(int argc, char **argv);
103void np_cleanup(); 103void np_cleanup();
104 104
105/* mp_suid() returns true if the real and effective uids differs, such as when
106 * running a suid plugin */
107#define mp_suid() (getuid() != geteuid())
108
105#endif /* _UTILS_BASE_ */ 109#endif /* _UTILS_BASE_ */