From: wessels <> Date: Fri, 11 Oct 2002 09:01:23 +0000 (+0000) Subject: print a warning on stderr if pam_auth is not started as root. X-Git-Tag: SQUID_3_0_PRE1~682 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a237207127cf18be8d0aae63b45e0c36179653f3;p=thirdparty%2Fsquid.git print a warning on stderr if pam_auth is not started as root. --- diff --git a/helpers/basic_auth/PAM/pam_auth.c b/helpers/basic_auth/PAM/pam_auth.c index d2b960ab56..b1c559e5af 100644 --- a/helpers/basic_auth/PAM/pam_auth.c +++ b/helpers/basic_auth/PAM/pam_auth.c @@ -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 @@ -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');