aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/librc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c
index fa2df683..68d09156 100644
--- a/src/librc/librc.c
+++ b/src/librc/librc.c
@@ -369,6 +369,9 @@ rc_set_user(void)
{
char *path, *tmp;
+ if (getuid() == 0)
+ eerrorx("Attempted to run user scripts as root.");
+
setenv("RC_USER_SERVICES", "YES", 1);
/* Setting the sysconf path to XDG_CONFIG_HOME, or ~/.config/, so subdirectories would go: