]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
print a warning on stderr if pam_auth is not started as root.
authorwessels <>
Fri, 11 Oct 2002 09:01:23 +0000 (09:01 +0000)
committerwessels <>
Fri, 11 Oct 2002 09:01:23 +0000 (09:01 +0000)
helpers/basic_auth/PAM/pam_auth.c

index d2b960ab56a099c076748560bdb5eae327866cf7..b1c559e5af79dca7d53e53fdb6329ccf1c6b4cda 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pam_auth.c,v 1.9 2002/08/12 16:58:11 hno Exp $
+ * $Id: pam_auth.c,v 1.10 2002/10/11 03:01:23 wessels Exp $
  *
  * PAM authenticator module for Squid.
  * Copyright (C) 1999,2002 Henrik Nordstrom <hno@squid-cache.org>
@@ -179,6 +179,9 @@ start:
        exit(1);
     }
 
+    if (0 != getuid())
+       fprintf(stderr, "WARNING: %s must be started as root\n", argv[0]);
+
     while (fgets(buf, BUFSIZE, stdin)) {
        user = buf;
        password = strchr(buf, '\n');