summaryrefslogtreecommitdiffstats
path: root/src/Daemon/Daemon.cpp
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2010-04-21 15:22:29 +0200
committerKarel Klic <kklic@redhat.com>2010-04-21 15:22:29 +0200
commit6a39e49bd877a33e36130cd5ffb8b0bc89066bac (patch)
tree2c7f92f4fc54871581d149302e9d328b9ccb7446 /src/Daemon/Daemon.cpp
parentabe511a362782e431f74459f145cf112a06f6b90 (diff)
downloadabrt-6a39e49bd877a33e36130cd5ffb8b0bc89066bac.tar.gz
abrt-6a39e49bd877a33e36130cd5ffb8b0bc89066bac.tar.xz
abrt-6a39e49bd877a33e36130cd5ffb8b0bc89066bac.zip
Show error message when abrtd service is run as non-root.
rhbz#584352
Diffstat (limited to 'src/Daemon/Daemon.cpp')
-rw-r--r--src/Daemon/Daemon.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index 34f6f43a..c5d29fe5 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -707,6 +707,9 @@ int main(int argc, char** argv)
textdomain(PACKAGE);
#endif
+ if (getuid() != 0)
+ error_msg_and_die("ABRT daemon must be run as root");
+
while ((opt = getopt(argc, argv, "dsvt:")) != -1)
{
unsigned long ul;