]> Pileus Git - ~andy/fetchmail/commitdiff
Print a warning that running fetchmail as root is discouraged.
authorMatthias Andree <matthias.andree@gmx.de>
Wed, 20 Jul 2005 15:25:09 +0000 (15:25 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Wed, 20 Jul 2005 15:25:09 +0000 (15:25 -0000)
svn path=/trunk/; revision=4145

fetchmail.c

index 6079f4ffa7d4df5149f24df078c433f8fdf2b2f2..d9ef9927a4e9b48b2717948058f7209f7c1b34d1 100644 (file)
@@ -155,6 +155,10 @@ int main(int argc, char **argv)
     iana_charset = "US-ASCII";
 #endif
 
+    if (getuid() == 0) {
+       report(stderr, GT_("WARNING: Running as root is discouraged.\n"));
+    }
+
     /*
      * Note: because we can't initialize reporting before we  know whether
      * syslog is supposed to be on, this message will go to stdout and