AC_PROG_RANLIB
-CRYPTLIB=''
REGEXLIB='' # -lregex
# LIBREGEX='' # libregex.a
fi
dnl Check for libcrypt
+CRYPTLIB=
dnl Some of our helpers use crypt(3) which may be in libc, or in
dnl libcrypt (eg FreeBSD)
AC_CHECK_LIB(crypt, crypt, [CRYPTLIB="-lcrypt"])
AC_CHECK_LIB(md5, MD5Init, [CRYPTLIB="$CRYPTLIB -lmd5"])
AC_SUBST(CRYPTLIB)
+# check for crypt, may require -lcrypt
+SAVED_LIBS="$LIBS"
+LIBS="$LIBS $CRYPTLIB"
+AC_CHECK_FUNCS(crypt)
+LIBS="$SAVED_LIBS"
+
+
dnl Check for libdl, used by auth_modules/PAM
if test "$with_dl" = "yes"; then
AC_CHECK_LIB(dl, dlopen)
tempnam \
)
-# check for crypt, may require -lcrypt
-SAVED_LIBS="$LIBS"
-LIBS="$LIBS $CRYPTLIB"
-AC_CHECK_FUNCS(crypt)
-LIBS="$SAVED_LIBS"
-
dnl Magic which checks whether we are forcing a type of comm loop we
dnl are actually going to (ab)use
<item>squid_db_auth - basic_db_auth - Retrieve authentication details from a simple SQL database table.
<item>getpwnam_auth - basic_getpwname_auth - Authenticate with local system user accounts.
<item>squid_ldap_auth - basic_ldap_auth - Authenticate with LDAP user accounts.
+ <item>ncsa_auth - basic_ncsa_auth - Authenticate with NCSA httpd-style password file.
</itemize>
<sect2>Digest Authentication protocol helpers
-#
-# Makefile for the Squid Object Cache server
-#
-# $Id$
-#
-# Uncomment and customize the following to suit your needs:
-#
-
include $(top_srcdir)/src/Common.am
-libexec_PROGRAMS = ncsa_auth
-ncsa_auth_SOURCES = ncsa_auth.c crypt_md5.c crypt_md5.h
-man_MANS = ncsa_auth.8
-EXTRA_DIST = ncsa_auth.8
+libexec_PROGRAMS = basic_ncsa_auth
+basic_ncsa_auth_SOURCES = basic_ncsa_auth.cc crypt_md5.cc crypt_md5.h
+man_MANS = basic_ncsa_auth.8
+EXTRA_DIST = basic_ncsa_auth.8
LDADD = \
- $(top_builddir)/compat/libcompat.la \
- -L$(top_builddir)/lib -lmiscutil \
- $(CRYPTLIB) \
+ $(COMPAT_LIB) \
+ @CRYPTLIB@ \
$(XTRA_LIBS) \
$(SSLLIB)
.\"
.\" HISTORY:
.\" 2006-05-16, created by Rodrigo Rubira Branco <rrbranco@br.ibm.com>
-.TH ncsa_auth 8 "May 16, 2006" "Squid NCSA Auth helper"
+.TH basic_ncsa_auth 8 "May 16, 2006" "Squid NCSA Auth helper"
.SH NAME
-ncsa_auth \- NCSA httpd-style password file authentication helper for Squid
+basic_ncsa_auth \- NCSA httpd-style password file authentication helper for Squid
\fB
.SH SYNOPSIS
.nf
.fam C
-\fBncsa_auth\fP \fIpasswdfile\fP
+\fBbasic_ncsa_auth\fP \fIpasswdfile\fP
.fam T
.fi
.SH DESCRIPTION
-\fBncsa_auth\fP allows Squid to read and authenticate user and password information from an NCSA/Apache httpd-style password file when using basic HTTP authentication.
+\fBbasic_ncsa_auth\fP allows Squid to read and authenticate user and password information from an NCSA/Apache httpd-style password file when using basic HTTP authentication.
.PP
-The only parameter is the password file. It must have permissions to be read by the user that Squid is running as (cache_effective_user in squid.conf).
+The only parameter is the password file. It must have permissions to be read by the user that Squid is running as.
.PP
This password file can be manipulated using htpasswd.
.SH OPTIONS
Only specify the password file name.
.SH EXAMPLE
-\fBncsa_auth\fP /etc/squid/squid.pass
+\fBbasic_ncsa_auth\fP /etc/squid/squid.pass
.SH SECURITY
-\fBncsa_auth\fP must have access to the password file to be executed.
-.SH SEE ALSO
-\fBhtpasswd\fP(1), \fBsquid\fP(8)
+\fBbasic_ncsa_auth\fP must have access to the password file to be executed.
.SH AUTHOR
Manpage written by Rodrigo Rubira Branco <rrbranco@br.ibm.com>
+.SH SEE ALSO
+\fBhtpasswd\fP(1), \fBsquid\fP(8)
* to64(salt+4, rand(), 4);
* salt[0] = '\0';
*/
+#ifndef _CRYPT_MD5_H
+#define _CRYPT_MD5_H
+
char *crypt_md5(const char *pw, const char *salt);
/* MD5 hash without salt */
char *md5sum(const char *s);
+
+#endif /* _CRYPT_MD5_H */