return 1;
}
+ if(seteuid(0) == 0) {
+ euid = geteuid();
+ if(debug) info("I am running with escalated privileges, uid = %u, euid = %u.", uid, euid);
+ return 1;
+ }
+
if(debug) info("I am not running with escalated privileges, uid = %u, euid = %u.", uid, euid);
return 0;
}
parse_args(argc, argv);
- if(!am_i_running_as_root()) {
- if(!check_capabilities()) {
+ if(!check_capabilities()) {
+ if(!am_i_running_as_root()) {
uid_t uid = getuid(), euid = geteuid();
#ifdef HAVE_CAPABILITY
error("apps.plugin should either run as root (now running with uid %u, euid %u) or have special capabilities. "