-# From configure.in Revision: 1.225
+# From configure.in Revision: 1.226
ac_aux_dir=
for ac_dir in cfgaux $srcdir/cfgaux; do
if test -f $ac_dir/install-sh; then
varargs.h \
byteswap.h \
glib.h \
+ stdint.h \
+ inttypes.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2944: checking for $ac_hdr" >&5
+echo "configure:2946: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2949 "configure"
+#line 2951 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2982: checking for working const" >&5
+echo "configure:2984: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2987 "configure"
+#line 2989 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3057: checking whether byte ordering is bigendian" >&5
+echo "configure:3059: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3064 "configure"
+#line 3066 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3079 "configure"
+#line 3081 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3110 "configure"
+#line 3112 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6
-echo "configure:3148: checking if ANSI prototypes work" >&5
+echo "configure:3150: checking if ANSI prototypes work" >&5
if eval "test \"`echo '$''{'ac_cv_have_ansi_prototypes'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3154 "configure"
+#line 3156 "configure"
#include "confdefs.h"
int foo(char *); int foo (char *bar) {return 1;}
int main() {
foo("bar")
; return 0; }
EOF
-if { (eval echo configure:3161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_ansi_prototypes="yes"
else
fi
echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6
-echo "configure:3183: checking for tm->tm_gmtoff" >&5
+echo "configure:3185: checking for tm->tm_gmtoff" >&5
if eval "test \"`echo '$''{'ac_cv_have_tm_gmoff'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3189 "configure"
+#line 3191 "configure"
#include "confdefs.h"
#include <time.h>
#include <sys/time.h>
foo.tm_gmtoff = 0;
; return 0; }
EOF
-if { (eval echo configure:3198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_tm_gmoff="yes"
else
fi
echo $ac_n "checking for struct mallinfo""... $ac_c" 1>&6
-echo "configure:3220: checking for struct mallinfo" >&5
+echo "configure:3222: checking for struct mallinfo" >&5
if eval "test \"`echo '$''{'ac_cv_have_struct_mallinfo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3226 "configure"
+#line 3228 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if HAVE_MALLOC_H
foo.keepcost = 0;
; return 0; }
EOF
-if { (eval echo configure:3244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_struct_mallinfo="yes"
else
fi
echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6
-echo "configure:3266: checking for extended mallinfo" >&5
+echo "configure:3268: checking for extended mallinfo" >&5
if eval "test \"`echo '$''{'ac_cv_have_ext_mallinfo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3272 "configure"
+#line 3274 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <malloc.h>
foo.mxfast = 0;
; return 0; }
EOF
-if { (eval echo configure:3281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_ext_mallinfo="yes"
else
fi
echo $ac_n "checking for struct rusage""... $ac_c" 1>&6
-echo "configure:3303: checking for struct rusage" >&5
+echo "configure:3305: checking for struct rusage" >&5
if eval "test \"`echo '$''{'ac_cv_have_struct_rusage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3309 "configure"
+#line 3311 "configure"
#include "confdefs.h"
#if HAVE_SYS_TIME_H
struct rusage R;
; return 0; }
EOF
-if { (eval echo configure:3322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_struct_rusage="yes"
else
fi
echo $ac_n "checking for ip->ip_hl""... $ac_c" 1>&6
-echo "configure:3344: checking for ip->ip_hl" >&5
+echo "configure:3346: checking for ip->ip_hl" >&5
if eval "test \"`echo '$''{'ac_cv_have_ip_hl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3350 "configure"
+#line 3352 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <netinet/in.h>
ip.ip_hl= 0;
; return 0; }
EOF
-if { (eval echo configure:3369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_ip_hl="yes"
else
fi
echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:3391: checking size of void *" >&5
+echo "configure:3393: checking size of void *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3399 "configure"
+#line 3401 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_void_p=`cat conftestval`
else
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:3430: checking size of short" >&5
+echo "configure:3432: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3438 "configure"
+#line 3440 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:3469: checking size of int" >&5
+echo "configure:3471: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3477 "configure"
+#line 3479 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:3508: checking size of long" >&5
+echo "configure:3510: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3516 "configure"
+#line 3518 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:3547: checking size of long long" >&5
+echo "configure:3549: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3555 "configure"
+#line 3557 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_long=`cat conftestval`
else
echo $ac_n "checking size of __int64""... $ac_c" 1>&6
-echo "configure:3586: checking size of __int64" >&5
+echo "configure:3588: checking size of __int64" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3594 "configure"
+#line 3596 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof___int64=`cat conftestval`
else
echo $ac_n "checking size of int16_t""... $ac_c" 1>&6
-echo "configure:3625: checking size of int16_t" >&5
+echo "configure:3627: checking size of int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3633 "configure"
+#line 3635 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int16_t=`cat conftestval`
else
echo $ac_n "checking size of uint16_t""... $ac_c" 1>&6
-echo "configure:3664: checking size of uint16_t" >&5
+echo "configure:3666: checking size of uint16_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_uint16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3672 "configure"
+#line 3674 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_uint16_t=`cat conftestval`
else
echo $ac_n "checking size of u_int16_t""... $ac_c" 1>&6
-echo "configure:3703: checking size of u_int16_t" >&5
+echo "configure:3705: checking size of u_int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_u_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3711 "configure"
+#line 3713 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_u_int16_t=`cat conftestval`
else
echo $ac_n "checking size of int32_t""... $ac_c" 1>&6
-echo "configure:3742: checking size of int32_t" >&5
+echo "configure:3744: checking size of int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3750 "configure"
+#line 3752 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int32_t=`cat conftestval`
else
echo $ac_n "checking size of uint32_t""... $ac_c" 1>&6
-echo "configure:3781: checking size of uint32_t" >&5
+echo "configure:3783: checking size of uint32_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_uint32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3789 "configure"
+#line 3791 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_uint32_t=`cat conftestval`
else
echo $ac_n "checking size of u_int32_t""... $ac_c" 1>&6
-echo "configure:3820: checking size of u_int32_t" >&5
+echo "configure:3822: checking size of u_int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_u_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3828 "configure"
+#line 3830 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_u_int32_t=`cat conftestval`
else
echo $ac_n "checking size of int64_t""... $ac_c" 1>&6
-echo "configure:3859: checking size of int64_t" >&5
+echo "configure:3861: checking size of int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3867 "configure"
+#line 3869 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int64_t=`cat conftestval`
else
echo $ac_n "checking size of uint64_t""... $ac_c" 1>&6
-echo "configure:3898: checking size of uint64_t" >&5
+echo "configure:3900: checking size of uint64_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_uint64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3906 "configure"
+#line 3908 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_uint64_t=`cat conftestval`
else
echo $ac_n "checking size of u_int64_t""... $ac_c" 1>&6
-echo "configure:3937: checking size of u_int64_t" >&5
+echo "configure:3939: checking size of u_int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_u_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3945 "configure"
+#line 3947 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:3956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_u_int64_t=`cat conftestval`
else
if test "x$ac_cv_sizeof_short" = "x2"; then
echo $ac_n "checking for int16_t""... $ac_c" 1>&6
-echo "configure:3978: checking for int16_t" >&5
+echo "configure:3980: checking for int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3983 "configure"
+#line 3985 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif test "x$ac_cv_sizeof_int" = "x2"; then
echo $ac_n "checking for int16_t""... $ac_c" 1>&6
-echo "configure:4012: checking for int16_t" >&5
+echo "configure:4014: checking for int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4017 "configure"
+#line 4019 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
if test "x$ac_cv_sizeof_uint16_t" = "x2"; then
echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
-echo "configure:4047: checking for u_int16_t" >&5
+echo "configure:4049: checking for u_int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4052 "configure"
+#line 4054 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif test "x$ac_cv_sizeof_short" = "x2"; then
echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
-echo "configure:4081: checking for u_int16_t" >&5
+echo "configure:4083: checking for u_int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4086 "configure"
+#line 4088 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif test "x$ac_cv_sizeof_int" = "x2"; then
echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
-echo "configure:4115: checking for u_int16_t" >&5
+echo "configure:4117: checking for u_int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4120 "configure"
+#line 4122 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
if test "x$ac_cv_sizeof_int" = "x4"; then
echo $ac_n "checking for int32_t""... $ac_c" 1>&6
-echo "configure:4150: checking for int32_t" >&5
+echo "configure:4152: checking for int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4155 "configure"
+#line 4157 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif "x$ac_cv_sizeof_long" = "x4"; then
echo $ac_n "checking for int32_t""... $ac_c" 1>&6
-echo "configure:4184: checking for int32_t" >&5
+echo "configure:4186: checking for int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4189 "configure"
+#line 4191 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
if test "x$ac_cv_sizeof_uint32_t" = "x4"; then
echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
-echo "configure:4219: checking for u_int32_t" >&5
+echo "configure:4221: checking for u_int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4224 "configure"
+#line 4226 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif test "x$ac_cv_sizeof_int" = "x4"; then
echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
-echo "configure:4253: checking for u_int32_t" >&5
+echo "configure:4255: checking for u_int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4258 "configure"
+#line 4260 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif test "x$ac_cv_sizeof_long" = "x4"; then
echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
-echo "configure:4287: checking for u_int32_t" >&5
+echo "configure:4289: checking for u_int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4292 "configure"
+#line 4294 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
if test "x$ac_cv_sizeof_long" = "x8"; then
echo $ac_n "checking for int64_t""... $ac_c" 1>&6
-echo "configure:4322: checking for int64_t" >&5
+echo "configure:4324: checking for int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4327 "configure"
+#line 4329 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif test "x$ac_cv_sizeof_long_long" = "x8"; then
echo $ac_n "checking for int64_t""... $ac_c" 1>&6
-echo "configure:4356: checking for int64_t" >&5
+echo "configure:4358: checking for int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4361 "configure"
+#line 4363 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif test "x$ac_cv_sizeof___int64" = "x8"; then
echo $ac_n "checking for int64_t""... $ac_c" 1>&6
-echo "configure:4390: checking for int64_t" >&5
+echo "configure:4392: checking for int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4395 "configure"
+#line 4397 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
if test "x$ac_cv_sizeof_uint64_t" = "x8"; then
echo $ac_n "checking for u_int64_t""... $ac_c" 1>&6
-echo "configure:4425: checking for u_int64_t" >&5
+echo "configure:4427: checking for u_int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4430 "configure"
+#line 4432 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif test "x$ac_cv_sizeof_long" = "x8"; then
echo $ac_n "checking for u_int64_t""... $ac_c" 1>&6
-echo "configure:4459: checking for u_int64_t" >&5
+echo "configure:4461: checking for u_int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4464 "configure"
+#line 4466 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif test "x$ac_cv_sizeof_long_long" = "x8"; then
echo $ac_n "checking for u_int64_t""... $ac_c" 1>&6
-echo "configure:4493: checking for u_int64_t" >&5
+echo "configure:4495: checking for u_int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4498 "configure"
+#line 4500 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
elif test "x$ac_cv_sizeof___int64" = "x8"; then
echo $ac_n "checking for int64_t""... $ac_c" 1>&6
-echo "configure:4527: checking for int64_t" >&5
+echo "configure:4529: checking for int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4532 "configure"
+#line 4534 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:4562: checking for pid_t" >&5
+echo "configure:4564: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4567 "configure"
+#line 4569 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:4595: checking for size_t" >&5
+echo "configure:4597: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4600 "configure"
+#line 4602 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:4628: checking for ssize_t" >&5
+echo "configure:4630: checking for ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4633 "configure"
+#line 4635 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:4661: checking for off_t" >&5
+echo "configure:4663: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4666 "configure"
+#line 4668 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:4694: checking for mode_t" >&5
+echo "configure:4696: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4699 "configure"
+#line 4701 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for fd_mask""... $ac_c" 1>&6
-echo "configure:4727: checking for fd_mask" >&5
+echo "configure:4729: checking for fd_mask" >&5
if eval "test \"`echo '$''{'ac_cv_type_fd_mask'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4732 "configure"
+#line 4734 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:4763: checking for working alloca.h" >&5
+echo "configure:4765: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4768 "configure"
+#line 4770 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:4796: checking for alloca" >&5
+echo "configure:4798: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4801 "configure"
+#line 4803 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:4861: checking whether alloca needs Cray hooks" >&5
+echo "configure:4863: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4866 "configure"
+#line 4868 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4891: checking for $ac_func" >&5
+echo "configure:4893: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4896 "configure"
+#line 4898 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4946: checking stack direction for C alloca" >&5
+echo "configure:4948: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 4954 "configure"
+#line 4956 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:4973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:4997: checking for socklen_t" >&5
+echo "configure:4999: checking for socklen_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5003 "configure"
+#line 5005 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
fi
echo $ac_n "checking for mtyp_t""... $ac_c" 1>&6
-echo "configure:5034: checking for mtyp_t" >&5
+echo "configure:5036: checking for mtyp_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mtyp_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5040 "configure"
+#line 5042 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ipc.h>
fi
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:5068: checking for main in -lnsl" >&5
+echo "configure:5070: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5076 "configure"
+#line 5078 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:5111: checking for main in -lsocket" >&5
+echo "configure:5113: checking for main in -lsocket" >&5
ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5119 "configure"
+#line 5121 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "skipping libmalloc check (--enable-dlmalloc specified)"
else
echo $ac_n "checking for main in -lgnumalloc""... $ac_c" 1>&6
-echo "configure:5158: checking for main in -lgnumalloc" >&5
+echo "configure:5160: checking for main in -lgnumalloc" >&5
ac_lib_var=`echo gnumalloc'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgnumalloc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5166 "configure"
+#line 5168 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
*)
echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6
-echo "configure:5216: checking for main in -lmalloc" >&5
+echo "configure:5218: checking for main in -lmalloc" >&5
ac_lib_var=`echo malloc'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lmalloc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5224 "configure"
+#line 5226 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
-echo "configure:5264: checking for main in -lbsd" >&5
+echo "configure:5266: checking for main in -lbsd" >&5
ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5272 "configure"
+#line 5274 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for main in -lregex""... $ac_c" 1>&6
-echo "configure:5307: checking for main in -lregex" >&5
+echo "configure:5309: checking for main in -lregex" >&5
ac_lib_var=`echo regex'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lregex $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5315 "configure"
+#line 5317 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
-echo "configure:5343: checking for gethostbyname in -lbind" >&5
+echo "configure:5345: checking for gethostbyname in -lbind" >&5
ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5351 "configure"
+#line 5353 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
;;
*)
echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:5396: checking for inet_aton in -lresolv" >&5
+echo "configure:5398: checking for inet_aton in -lresolv" >&5
ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5404 "configure"
+#line 5406 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
inet_aton()
; return 0; }
EOF
-if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for inet_aton in -l44bsd""... $ac_c" 1>&6
-echo "configure:5431: checking for inet_aton in -l44bsd" >&5
+echo "configure:5433: checking for inet_aton in -l44bsd" >&5
ac_lib_var=`echo 44bsd'_'inet_aton | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-l44bsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5439 "configure"
+#line 5441 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
inet_aton()
; return 0; }
EOF
-if { (eval echo configure:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
-echo "configure:5482: checking for main in -lresolv" >&5
+echo "configure:5484: checking for main in -lresolv" >&5
ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5490 "configure"
+#line 5492 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
esac
fi
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:5528: checking for main in -lm" >&5
+echo "configure:5530: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5536 "configure"
+#line 5538 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:5572: checking for crypt in -lcrypt" >&5
+echo "configure:5574: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5580 "configure"
+#line 5582 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
crypt()
; return 0; }
EOF
-if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:5614: checking for dlopen in -ldl" >&5
+echo "configure:5616: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5622 "configure"
+#line 5624 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dlopen()
; return 0; }
EOF
-if { (eval echo configure:5633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
-echo "configure:5656: checking for main in -lpthread" >&5
+echo "configure:5658: checking for main in -lpthread" >&5
ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5664 "configure"
+#line 5666 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
case "$host" in
*-pc-sco3.2*)
echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:5696: checking for strftime in -lintl" >&5
+echo "configure:5698: checking for strftime in -lintl" >&5
ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5704 "configure"
+#line 5706 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
strftime()
; return 0; }
EOF
-if { (eval echo configure:5715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5900: checking for $ac_func" >&5
+echo "configure:5902: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5905 "configure"
+#line 5907 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6
-echo "configure:5954: checking if setresuid is implemented" >&5
+echo "configure:5956: checking if setresuid is implemented" >&5
if eval "test \"`echo '$''{'ac_cv_func_setresuid'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 5962 "configure"
+#line 5964 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setresuid="yes"
else
if test "$IPF_TRANSPARENT" ; then
echo $ac_n "checking if IP-Filter header files are installed""... $ac_c" 1>&6
-echo "configure:6000: checking if IP-Filter header files are installed" >&5
+echo "configure:6002: checking if IP-Filter header files are installed" >&5
# hold on to your hats...
if test "$ac_cv_header_ip_compat_h" = "yes" ||
test "$ac_cv_header_ip_fil_compat_h" = "yes" ||
if test "$LINUX_NETFILTER" ; then
echo $ac_n "checking if Linux 2.4 kernel header files are installed""... $ac_c" 1>&6
-echo "configure:6041: checking if Linux 2.4 kernel header files are installed" >&5
+echo "configure:6043: checking if Linux 2.4 kernel header files are installed" >&5
# hold on to your hats...
if test "$ac_cv_header_linux_netfilter_ipv4_h" = "yes"; then
LINUX_NETFILTER="yes"
esac
fi
echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6
-echo "configure:6075: checking if GNUregex needs to be compiled" >&5
+echo "configure:6077: checking if GNUregex needs to be compiled" >&5
if test -z "$USE_GNUREGEX"; then
if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then
USE_GNUREGEX="yes"
else
cat > conftest.$ac_ext <<EOF
-#line 6081 "configure"
+#line 6083 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <regex.h>
regex_t t; regcomp(&t,"",0);
; return 0; }
EOF
-if { (eval echo configure:6089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
USE_GNUREGEX="no"
else
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6120: checking for $ac_func" >&5
+echo "configure:6122: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6125 "configure"
+#line 6127 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6
-echo "configure:6176: checking Default FD_SETSIZE value" >&5
+echo "configure:6178: checking Default FD_SETSIZE value" >&5
if test "$cross_compiling" = yes; then
DEFAULT_FD_SETSIZE=256
else
cat > conftest.$ac_ext <<EOF
-#line 6181 "configure"
+#line 6183 "configure"
#include "confdefs.h"
#if HAVE_STDIO_H
}
EOF
-if { (eval echo configure:6206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
DEFAULT_FD_SETSIZE=`cat conftestval`
else
echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6
-echo "configure:6225: checking Maximum number of filedescriptors we can open" >&5
+echo "configure:6227: checking Maximum number of filedescriptors we can open" >&5
TLDFLAGS="$LDFLAGS"
case $host in
i386-unknown-freebsd*)
SQUID_MAXFD=256
else
cat > conftest.$ac_ext <<EOF
-#line 6237 "configure"
+#line 6239 "configure"
#include "confdefs.h"
#include <stdio.h>
}
EOF
-if { (eval echo configure:6297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
SQUID_MAXFD=`cat conftestval`
else
LDFLAGS="$TLDFLAGS"
echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6
-echo "configure:6324: checking Default UDP send buffer size" >&5
+echo "configure:6326: checking Default UDP send buffer size" >&5
if test "$cross_compiling" = yes; then
SQUID_UDP_SO_SNDBUF=16384
else
cat > conftest.$ac_ext <<EOF
-#line 6329 "configure"
+#line 6331 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:6350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
SQUID_UDP_SO_SNDBUF=`cat conftestval`
else
echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6
-echo "configure:6369: checking Default UDP receive buffer size" >&5
+echo "configure:6371: checking Default UDP receive buffer size" >&5
if test "$cross_compiling" = yes; then
SQUID_UDP_SO_RCVBUF=16384
else
cat > conftest.$ac_ext <<EOF
-#line 6374 "configure"
+#line 6376 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:6395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
SQUID_UDP_SO_RCVBUF=`cat conftestval`
else
echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6
-echo "configure:6414: checking Default TCP send buffer size" >&5
+echo "configure:6416: checking Default TCP send buffer size" >&5
if test "$cross_compiling" = yes; then
SQUID_TCP_SO_SNDBUF=16384
else
cat > conftest.$ac_ext <<EOF
-#line 6419 "configure"
+#line 6421 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:6440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
SQUID_TCP_SO_SNDBUF=`cat conftestval`
else
echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6
-echo "configure:6459: checking Default TCP receive buffer size" >&5
+echo "configure:6461: checking Default TCP receive buffer size" >&5
if test "$cross_compiling" = yes; then
SQUID_TCP_SO_RCVBUF=16384
else
cat > conftest.$ac_ext <<EOF
-#line 6464 "configure"
+#line 6466 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:6485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
SQUID_TCP_SO_RCVBUF=`cat conftestval`
else
echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
-echo "configure:6504: checking if sys_errlist is already defined" >&5
+echo "configure:6506: checking if sys_errlist is already defined" >&5
if eval "test \"`echo '$''{'ac_cv_needs_sys_errlist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6509 "configure"
+#line 6511 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
char *s = sys_errlist;
; return 0; }
EOF
-if { (eval echo configure:6516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_needs_sys_errlist="no"
else
fi
echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6
-echo "configure:6538: checking for libresolv _dns_ttl_ hack" >&5
+echo "configure:6540: checking for libresolv _dns_ttl_ hack" >&5
cat > conftest.$ac_ext <<EOF
-#line 6540 "configure"
+#line 6542 "configure"
#include "confdefs.h"
extern int _dns_ttl_;
int main() {
return _dns_ttl_;
; return 0; }
EOF
-if { (eval echo configure:6547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
rm -f conftest*
echo $ac_n "checking if inet_ntoa() actually works""... $ac_c" 1>&6
-echo "configure:6563: checking if inet_ntoa() actually works" >&5
+echo "configure:6565: checking if inet_ntoa() actually works" >&5
if test "$cross_compiling" = yes; then
INET_NTOA_RESULT="broken"
else
cat > conftest.$ac_ext <<EOF
-#line 6568 "configure"
+#line 6570 "configure"
#include "confdefs.h"
#include <stdlib.h>
}
EOF
-if { (eval echo configure:6587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
INET_NTOA_RESULT=`cat conftestval`
else
if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then
echo $ac_n "checking for working statvfs() interface""... $ac_c" 1>&6
-echo "configure:6613: checking for working statvfs() interface" >&5
+echo "configure:6615: checking for working statvfs() interface" >&5
cat > conftest.$ac_ext <<EOF
-#line 6615 "configure"
+#line 6617 "configure"
#include "confdefs.h"
#include <stdlib.h>
; return 0; }
EOF
-if { (eval echo configure:6632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_statvfs=yes
else
fi
echo $ac_n "checking for _res.nsaddr_list""... $ac_c" 1>&6
-echo "configure:6652: checking for _res.nsaddr_list" >&5
+echo "configure:6654: checking for _res.nsaddr_list" >&5
if eval "test \"`echo '$''{'ac_cv_have_res_nsaddr_list'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6657 "configure"
+#line 6659 "configure"
#include "confdefs.h"
#if HAVE_SYS_TYPES_H
_res.nsaddr_list[0];
; return 0; }
EOF
-if { (eval echo configure:6680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_res_nsaddr_list="yes"
else
if test $ac_cv_have_res_nsaddr_list = "no" ; then
echo $ac_n "checking for _res.ns_list""... $ac_c" 1>&6
-echo "configure:6702: checking for _res.ns_list" >&5
+echo "configure:6704: checking for _res.ns_list" >&5
if eval "test \"`echo '$''{'ac_cv_have_res_ns_list'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6707 "configure"
+#line 6709 "configure"
#include "confdefs.h"
#if HAVE_SYS_TYPES_H
_res.ns_list[0].addr;
; return 0; }
EOF
-if { (eval echo configure:6730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_res_ns_list="yes"
else
dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.226 2001/06/10 18:31:40 adrian Exp $
+dnl $Id: configure.in,v 1.227 2001/08/03 15:12:58 adrian Exp $
dnl
dnl
dnl
AC_INIT(src/main.c)
AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.226 $)dnl
+AC_REVISION($Revision: 1.227 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AC_CONFIG_AUX_DIR(cfgaux)
varargs.h \
byteswap.h \
glib.h \
+ stdint.h \
+ inttypes.h \
)
AC_C_CONST
obtain_challenge()
{
int j = 0;
- const char *ch;
+ const char *ch = NULL;
debug("obtain_challenge: getting new challenge\n");
for (j = 0; j < numcontrollers; j++) {
if (current_dc->status == DC_OK) {
/* Define if you have the <grp.h> header file. */
#undef HAVE_GRP_H
+/* Define if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
/* Define if you have the <ip_compat.h> header file. */
#undef HAVE_IP_COMPAT_H
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
+/* Define if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
/* Define if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/*
- * $Id: acl.cc,v 1.255 2001/06/28 20:16:30 wessels Exp $
+ * $Id: acl.cc,v 1.256 2001/08/03 15:13:03 adrian Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
#if SQUID_SNMP
static int aclMatchWordList(wordlist *, const char *);
#endif
+static void aclParseUserMaxIP(void *data);
+static void aclDestroyUserMaxIP(void *data);
+static wordlist *aclDumpUserMaxIP(void *data);
+static int aclMatchUserMaxIP(void *, auth_user_request_t *, struct in_addr);
static squid_acl aclStrToType(const char *s);
static int decode_addr(const char *, struct in_addr *, struct in_addr *);
static void aclCheck(aclCheck_t * checklist);
return ACL_REQ_MIME_TYPE;
if (!strcmp(s, "rep_mime_type"))
return ACL_REP_MIME_TYPE;
+ if (!strcmp(s, "max_user_ip"))
+ return ACL_MAX_USER_IP;
return ACL_NONE;
}
return "req_mime_type";
if (type == ACL_REP_MIME_TYPE)
return "rep_mime_type";
+ if (type == ACL_MAX_USER_IP)
+ return "max_user_ip";
return "ERROR";
}
case ACL_DST_ASN:
aclParseIntlist(&A->data);
break;
+ case ACL_MAX_USER_IP:
+ aclParseUserMaxIP(&A->data);
+ break;
#if SRC_RTT_NOT_YET_FINISHED
case ACL_NETDB_SRC_RTT:
aclParseIntlist(&A->data);
if (user == NULL)
return 0;
- if (data->flags.case_insensitive)
- Tolower(user);
-
if (data->flags.required) {
debug(28, 7) ("aclMatchUser: user REQUIRED and auth-info present.\n");
return 1;
}
- Top = splay_splay(user, Top, (SPLAYCMP *) strcmp);
+ if (data->flags.case_insensitive)
+ Top = splay_splay(user, Top, (SPLAYCMP *) strcasecmp);
+ else
+ Top = splay_splay(user, Top, (SPLAYCMP *) strcmp);
/* Top=splay_splay(user,Top,(SPLAYCMP *)dumping_strcmp); */
debug(28, 7) ("aclMatchUser: returning %d,Top is %p, Top->data is %s\n",
!splayLastResult, Top, (Top ? Top->data : "Unavailable"));
}
}
-/* aclMatchProxyAuth can return four exit codes:
- * 0 : Authenticated OK, Authorisation for this ACL failed.
- * 1 : Authenticated OK, Authorisation OK.
- * -1 : send data to an external authenticator
- * -2 : send data to the client
+/* aclMatchProxyAuth can return two exit codes:
+ * 0 : Authorisation for this ACL failed. (Did not match)
+ * 1 : Authorisation OK. (Matched)
*/
static int
aclMatchProxyAuth(void *data, http_hdr_type headertype,
squid_acl acltype)
{
/* checklist is used to register user name when identified, nothing else */
- const char *proxy_auth;
- /* consistent parameters ? */
- assert(auth_user_request == checklist->auth_user_request);
/* General program flow in proxy_auth acls
* 1. Consistency checks: are we getting sensible data
* username
*/
- assert(headertype != 0);
- proxy_auth = httpHeaderGetStr(&checklist->request->header, headertype);
+ /* for completeness */
+ authenticateAuthUserRequestLock(auth_user_request);
- if (checklist->conn == NULL) {
- debug(28, 1) ("aclMatchProxyAuth: no connection data, cannot process authentication\n");
- /*
- * deny access: clientreadrequest requires conn data, and it is always
- * compiled in so we should have it too.
- */
- return 0;
+ /* consistent parameters ? */
+ assert(authenticateUserAuthenticated(auth_user_request));
+ /* this ACL check completed */
+ authenticateAuthUserRequestUnlock(auth_user_request);
+ /* check to see if we have matched the user-acl before */
+ return aclCacheMatchAcl(&auth_user_request->auth_user->
+ proxy_match_cache, acltype, data,
+ authenticateUserRequestUsername(auth_user_request));
+}
+
+CBDATA_TYPE(acl_user_ip_data);
+
+void
+aclParseUserMaxIP(void *data)
+{
+ acl_user_ip_data **acldata = data;
+ char *t = NULL;
+ CBDATA_INIT_TYPE(acl_user_ip_data);
+ if (*acldata) {
+ debug(28, 1) ("Attempting to alter already set User max IP acl\n");
+ return;
}
- /*
- * a note on proxy_auth logix here:
- * proxy_auth==NULL -> unauthenticated request || already authenticated connection
- * so we test for an authenticated connection when we recieve no authentication
- * header.
- */
- if (((proxy_auth == NULL) && (!authenticateUserAuthenticated(auth_user_request ? auth_user_request : checklist->conn->auth_user_request)))
- || (checklist->conn->auth_type == AUTH_BROKEN)) {
- /* no header or authentication failed/got corrupted - restart */
- checklist->conn->auth_type = AUTH_UNKNOWN;
- debug(28, 4) ("aclMatchProxyAuth: broken auth or no proxy_auth header. Requesting auth header.\n");
- /* something wrong with the AUTH credentials. Force a new attempt */
- checklist->auth_user_request = NULL;
- checklist->conn->auth_user_request = NULL;
- if (auth_user_request) {
- /* unlock the ACL lock */
- authenticateAuthUserRequestUnlock(auth_user_request);
- }
- return -2;
- }
- /* we have a proxy auth header and as far as we know this connection has
- * not had bungled connection oriented authentication happen on it. */
- debug(28, 9) ("aclMatchProxyAuth: header %s.\n", proxy_auth);
- if (auth_user_request == NULL) {
- debug(28, 9) ("aclMatchProxyAuth: This is a new request on FD:%d\n",
- checklist->conn->fd);
- if ((!checklist->request->auth_user_request)
- && (checklist->conn->auth_type == AUTH_UNKNOWN)) {
- /* beginning of a new request check */
- debug(28, 4) ("aclMatchProxyAuth: no connection authentication type\n");
- if (!authenticateValidateUser(auth_user_request =
- authenticateGetAuthUser(proxy_auth))) {
- /* the decode might have left a username for logging, or a message to
- * the user */
- if (authenticateUserRequestUsername(auth_user_request)) {
- /* lock the user for the request structure link */
- authenticateAuthUserRequestLock(auth_user_request);
- checklist->request->auth_user_request = auth_user_request;
- /* unlock the ACL reference. */
- authenticateAuthUserRequestUnlock(auth_user_request);
- }
- return -2;
- }
- /* the user_request comes prelocked for the caller to GetAuthUser (us) */
- } else if (checklist->request->auth_user_request) {
- auth_user_request = checklist->request->auth_user_request;
- /* lock the user request for this ACL processing */
- authenticateAuthUserRequestLock(auth_user_request);
+ *acldata = cbdataAlloc(acl_user_ip_data);
+ if ((t = strtokFile())) {
+ debug(28, 5) ("aclParseUserMaxIP: First token is %s\n", t);
+ if (strcmp("-s", t) == 0) {
+ debug(28, 5) ("aclParseUserMaxIP: Going strict\n");
+ (*acldata)->flags.strict = 1;
} else {
- if (checklist->conn->auth_user_request != NULL) {
- auth_user_request = checklist->conn->auth_user_request;
- /* lock the user request for this ACL processing */
- authenticateAuthUserRequestLock(auth_user_request);
- } else {
- /* failed connection based authentication */
- debug(28, 4) ("aclMatchProxyAuth: Auth user request %d conn-auth user request %d conn type %d authentication failed.\n",
- auth_user_request, checklist->conn->auth_user_request,
- checklist->conn->auth_type);
- return -2;
- }
+ (*acldata)->max = atoi(t);
+ debug(28, 5) ("aclParseUserMaxIP: Max IP address's %d\n", (*acldata)->max);
}
- }
- /* Clear the reference in the checklist */
- checklist->auth_user_request = NULL;
- if (!authenticateUserAuthenticated(auth_user_request)) {
- /* User not logged in. Log them in */
- authenticateAuthUserRequestSetIp(auth_user_request,
- checklist->src_addr);
- authenticateAuthenticateUser(auth_user_request, checklist->request,
- checklist->conn, headertype);
- switch (authenticateDirection(auth_user_request)) {
- case 1:
- /* this ACL check is finished. Unlock. */
- authenticateAuthUserRequestUnlock(auth_user_request);
- return -2;
- case -1:
- /* we are partway through authentication within squid
- * store the auth_user for the callback to here */
- checklist->auth_user_request = auth_user_request;
- /* we will be called back here. Do not Unlock */
- return -1;
- case -2:
- /* this ACL check is finished. Unlock. */
- authenticateAuthUserRequestUnlock(auth_user_request);
- return -2;
- } /* on 0 the authentication is finished - fallthrough */
- /* See of user authentication failed for some reason */
- if (!authenticateUserAuthenticated(auth_user_request)) {
- if ((!checklist->rfc931[0]) &&
- (authenticateUserRequestUsername(auth_user_request))) {
- if (!checklist->request->auth_user_request) {
- /* lock the user for the request structure link */
- authenticateAuthUserRequestLock(auth_user_request);
- checklist->request->auth_user_request = auth_user_request;
- }
- }
- /* this ACL check is finished. Unlock. */
- authenticateAuthUserRequestUnlock(auth_user_request);
- return -2;
+ } else
+ fatal("aclParseUserMaxIP: Malformed ACL %d\n");
+}
- }
- }
- /* User authenticated ok */
- assert(authenticateUserAuthenticated(auth_user_request));
+void
+aclDestroyUserMaxIP(void *data)
+{
+ acl_user_ip_data **acldata = data;
+ if (*acldata)
+ cbdataFree(*acldata);
+ *acldata = NULL;
+}
- /* copy username to request for logging on client-side */
- /* the credentials are correct at this point */
- if (!checklist->request->auth_user_request) {
- /* lock the user for the request structure link */
- authenticateAuthUserRequestLock(auth_user_request);
- checklist->request->auth_user_request = auth_user_request;
- }
- if (authenticateCheckAuthUserIP(checklist->src_addr, auth_user_request)) {
- /* Once the match is completed we have finished with the
- * auth_user structure */
- /* this ACL check completed */
- authenticateAuthUserRequestUnlock(auth_user_request);
- /* check to see if we have matched the user-acl before */
- return aclCacheMatchAcl(&auth_user_request->auth_user->
- proxy_match_cache, acltype, data,
- authenticateUserRequestUsername(auth_user_request));
+wordlist *
+aclDumpUserMaxIP(void *data)
+{
+ acl_user_ip_data *acldata = data;
+ wordlist *W = NULL;
+ char buf[128];
+ if (acldata->flags.strict)
+ wordlistAdd(&W, "-s");
+ snprintf(buf, sizeof(buf), "%d", acldata->max);
+ wordlistAdd(&W, buf);
+ return W;
+}
+
+/* aclMatchUserMaxIP - check for users logging in from multiple IP's
+ * 0 : No match
+ * 1 : Match
+ */
+int
+aclMatchUserMaxIP(void *data, auth_user_request_t * auth_user_request,
+ struct in_addr src_addr)
+{
+/*
+ * > the logic for flush the ip list when the limit is hit vs keep it sorted in most recent access order and just drop the oldest one off is currently undecided
+ */
+ acl_user_ip_data *acldata = data;
+
+ if (authenticateAuthUserRequestIPCount(auth_user_request) <= acldata->max)
+ return 0;
+
+ /* this is a match */
+ if (acldata->flags.strict) {
+ /* simply deny access - the user name is already associated with
+ * the request
+ */
+ /* remove _this_ ip, as it is the culprit for going over the limit */
+ authenticateAuthUserRequestRemoveIp(auth_user_request, src_addr);
+ debug(28, 4) ("aclMatchUserMaxIP: Denying access in strict mode\n");
} else {
- debug(28, 1) ("XXX authenticateCheckAuthUserIP returned 0, somebody "
- "make sure the username gets logged to access.log.\n");
- debug(28, 1) ("XXX if it works, tell developers to remove this "
- "message\n");
+ /* non-strict - remove some/all of the cached entries
+ * ie to allow the user to move machines easily
+ */
+ authenticateAuthUserRequestClearIp(auth_user_request);
+ debug(28, 4) ("aclMatchUserMaxIP: Denying access in non-strict mode - flushing the user ip cache\n");
}
- /* this acl check completed */
- authenticateAuthUserRequestUnlock(auth_user_request);
- return 0;
+ /* We had reports about the username being lost when denying due to
+ * IP limits. That should be fixed in the new lazy-proxy code, but
+ * This note note is a reminder!
+ */
+ debug(28, 1) ("XXX aclMatchUserMaxIP returned 0, somebody "
+ "make sure the username gets logged to access.log.\n");
+ debug(28, 1) ("XXX if it works, tell developers to remove this "
+ "message\n");
+
+ return 1;
}
static void
char *esc_buf;
const char *header;
const char *browser;
- int k;
+ int k, ti;
http_hdr_type headertype;
if (!ae)
return 0;
/* NOTREACHED */
case ACL_PROXY_AUTH:
case ACL_PROXY_AUTH_REGEX:
+ case ACL_MAX_USER_IP:
+ /* ALL authentication predicated ACL's live here */
if (NULL == r) {
return -1;
} else if (!r->flags.accelerated) {
return -1;
#endif
}
+ /* get authed here */
+ if ((ti = authenticateAuthenticate(&checklist->auth_user_request, headertype, checklist->request, checklist->conn, checklist->src_addr)) != AUTH_AUTHENTICATED) {
+ switch (ti) {
+ case 0:
+ /* Authenticated but not Authorised for this ACL */
+ debug(28, 4) ("aclMatchAcl: returning 0 user authenticated but not authorised.\n");
+ return 0;
+ case 1:
+ fatal("AUTH_AUTHENTICATED == 1\n");
+ break;
+ case -1:
+ /* Send data to the helper */
+ debug(28, 4) ("aclMatchAcl: returning 0 sending authentication challenge.\n");
+ checklist->state[ACL_PROXY_AUTH] = ACL_LOOKUP_NEEDED;
+ return 0;
+ case -2:
+ /* Send a challenge to the client */
+ debug(28, 4) ("aclMatchAcl: returning 0 sending credentials to helper.\n");
+ checklist->state[ACL_PROXY_AUTH] = ACL_PROXY_AUTH_NEEDED;
+ return 0;
+ }
+ }
+ /* then, switch on type again to do the correct match routine :> */
+ switch (ae->type) {
+ case ACL_PROXY_AUTH:
+ case ACL_PROXY_AUTH_REGEX:
+ ti = aclMatchProxyAuth(ae->data, headertype,
+ checklist->auth_user_request, checklist, ae->type);
+ break;
+ case ACL_MAX_USER_IP:
+ ti = aclMatchUserMaxIP(ae->data, checklist->auth_user_request,
+ checklist->src_addr);
+ break;
+ default:
+ /* Keep GCC happy */
+ break;
+ }
+ checklist->auth_user_request = NULL;
/* Check the credentials */
- switch (aclMatchProxyAuth(ae->data, headertype,
- checklist->auth_user_request, checklist, ae->type)) {
+ switch (ti) {
case 0:
debug(28, 4) ("aclMatchAcl: returning 0 user authenticated but not authorised.\n");
/* Authenticated but not Authorised for this ACL */
/* Authenticated and Authorised for this ACL */
return 1;
case -2:
- debug(28, 4) ("aclMatchAcl: returning 0 sending authentication challenge.\n");
- /* Authentication credentials invalid or missing. */
- /* Or partway through NTLM handshake. A proxy_Authenticate header
- * gets sent to the client. */
- checklist->state[ACL_PROXY_AUTH] = ACL_PROXY_AUTH_NEEDED;
- return 0;
case -1:
- debug(28, 4) ("aclMatchAcl: returning 0 sending credentials to helper.\n");
- /*
- * we need to validate the password
- */
- checklist->state[ACL_PROXY_AUTH] = ACL_LOOKUP_NEEDED;
- return 0;
+ fatal("Invalid response from match routine\n");
+ break;
}
+
/* NOTREACHED */
#if SQUID_SNMP
case ACL_SNMP_COMMUNITY:
checklist->state[ACL_PROXY_AUTH] = ACL_LOOKUP_DONE;
if (result != NULL)
fatal("AclLookupProxyAuthDone: Old code floating around somewhere.\nMake clean and if that doesn't work, report a bug to the squid developers.\n");
- /* state info check */
- assert(checklist->conn != NULL);
auth_user_request = checklist->auth_user_request;
- if (!authenticateValidateUser(auth_user_request)) {
+ if (!authenticateValidateUser(auth_user_request) || checklist->conn == NULL) {
/* credentials could not be checked either way
* restart the whole process */
+ /* OR the connection was closed, there's no way to continue */
checklist->conn->auth_user_request = NULL;
checklist->conn->auth_type = AUTH_BROKEN;
checklist->auth_user_request = NULL;
case ACL_MAXCONN:
intlistDestroy((intlist **) & a->data);
break;
+ case ACL_MAX_USER_IP:
+ aclDestroyUserMaxIP(&a->data);
+ break;
case ACL_URL_PORT:
case ACL_MY_PORT:
aclDestroyIntRange(a->data);
case ACL_MAXCONN:
case ACL_DST_ASN:
return aclDumpIntlistList(a->data);
+ case ACL_MAX_USER_IP:
+ return aclDumpUserMaxIP(a->data);
case ACL_URL_PORT:
case ACL_MY_PORT:
return aclDumpIntRangeList(a->data);
-
/*
- * $Id: auth_basic.cc,v 1.8 2001/03/21 23:41:13 hno Exp $
+ * $Id: auth_basic.cc,v 1.9 2001/08/03 15:13:06 adrian Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
authscheme->oncloseconnection = NULL;
authscheme->decodeauth = authenticateBasicDecodeAuth;
authscheme->donefunc = authBasicDone;
+ authscheme->authConnLastHeader = NULL;
}
/* internal functions */
/* Decode now takes care of finding the auth_user struct in the cache */
/* after external auth occurs anyway */
auth_user->expiretime = current_time.tv_sec;
- auth_user->ip_expiretime = squid_curtime;
return;
}
authBasicAuthUserFindUsername(const char *username)
{
auth_user_hash_pointer *usernamehash;
- auth_user_t *auth_user;
debug(29, 9) ("authBasicAuthUserFindUsername: Looking for user '%s'\n", username);
if (username && (usernamehash = hash_lookup(proxy_auth_username_cache, username))) {
- while ((usernamehash->auth_user->auth_type != AUTH_BASIC) &&
- (usernamehash->next))
+ while (usernamehash) {
+ if ((usernamehash->auth_user->auth_type == AUTH_BASIC) &&
+ !strcmp(username, usernamehash->key))
+ return usernamehash->auth_user;
usernamehash = usernamehash->next;
- auth_user = NULL;
- if (usernamehash->auth_user->auth_type == AUTH_BASIC) {
- auth_user = usernamehash->auth_user;
}
- return auth_user;
}
return NULL;
}
auth_user->auth_type = AUTH_BASIC;
/* current time for timeouts */
auth_user->expiretime = current_time.tv_sec;
- auth_user->ip_expiretime = squid_curtime;
/* this auth_user struct is the 'lucky one' to get added to the username cache */
/* the requests after this link to the auth_user */
/*
- * $Id: auth_digest.cc,v 1.2 2001/03/03 10:39:36 hno Exp $
+ * $Id: auth_digest.cc,v 1.3 2001/08/03 15:13:10 adrian Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Robert Collins
hash_first(proxy_auth_username_cache);
while ((usernamehash = ((auth_user_hash_pointer *) hash_next(proxy_auth_username_cache)))) {
auth_user = usernamehash->auth_user;
- if (strcmp(authscheme_list[auth_user->auth_module - 1].typestr, "digest") == 0)
+ if (authscheme_list[auth_user->auth_module - 1].typestr &&
+ strcmp(authscheme_list[auth_user->auth_module - 1].typestr, "digest") == 0)
/* it's digest */
authenticateAuthUserUnlock(auth_user);
}
authscheme->decodeauth = authenticateDigestDecodeAuth;
authscheme->donefunc = authDigestDone;
authscheme->requestFree = authDigestAURequestFree;
+ authscheme->authConnLastHeader = NULL;
}
int
/* auth_user is now linked, we reset these values
* after external auth occurs anyway */
auth_user->expiretime = current_time.tv_sec;
- auth_user->ip_expiretime = squid_curtime;
return;
}
/*
- * $Id: auth_ntlm.cc,v 1.9 2001/05/21 04:50:58 hno Exp $
+ * $Id: auth_ntlm.cc,v 1.10 2001/08/03 15:13:12 adrian Exp $
*
* DEBUG: section 29 NTLM Authenticator
* AUTHOR: Robert Collins
static AUTHSFREECONFIG authNTLMFreeConfig;
static AUTHSINIT authNTLMInit;
static AUTHSONCLOSEC authenticateNTLMOnCloseConnection;
+static AUTHSCONNLASTHEADER NTLMLastHeader;
static AUTHSUSERNAME authenticateNTLMUsername;
static AUTHSREQFREE authNTLMAURequestFree;
static AUTHSPARSE authNTLMParse;
static HLPSONEQ authenticateNTLMHelperServerOnEmpty;
static statefulhelper *ntlmauthenticators = NULL;
+static wordlist *ntlmprevauthline = NULL;
CBDATA_TYPE(authenticateStateData);
*
*/
+static int
+wordliststrcmp(wordlist * a, wordlist * b)
+{
+ int i;
+ while (a && b) {
+ if ((i = strcmp(a->key, b->key)))
+ return i;
+ a = a->next;
+ b = b->next;
+ }
+ if (a && !b)
+ return -1;
+ if (b && !a)
+ return 1;
+ return 0;
+}
+
void
authNTLMDone(void)
{
debug(29, 2) ("authNTLMDone: shutting down NTLM authentication.\n");
- if (ntlmauthenticators)
- helperStatefulShutdown(ntlmauthenticators);
authntlm_initialised = 0;
if (!shutting_down)
return;
- if (ntlmauthenticators)
+ if (ntlmauthenticators) {
+ helperStatefulShutdown(ntlmauthenticators);
helperStatefulFree(ntlmauthenticators);
+ }
ntlmauthenticators = NULL;
if (ntlm_helper_state_pool) {
assert(memPoolInUseCount(ntlm_helper_state_pool) == 0);
* parser to be integrated.
*/
if (ntlmConfig->authenticate)
- Config.onoff.pipeline_prefetch=0;
+ Config.onoff.pipeline_prefetch = 0;
}
authscheme->decodeauth = authenticateDecodeNTLMAuth;
authscheme->donefunc = authNTLMDone;
authscheme->oncloseconnection = authenticateNTLMOnCloseConnection;
+ authscheme->authConnLastHeader = NTLMLastHeader;
}
/* Initialize helpers and the like for this auth scheme. Called AFTER parsing the
ntlmauthenticators->datapool = ntlm_helper_state_pool;
ntlmauthenticators->IsAvailable = authenticateNTLMHelperServerAvailable;
ntlmauthenticators->OnEmptyQueue = authenticateNTLMHelperServerOnEmpty;
- helperStatefulOpenServers(ntlmauthenticators);
+ if (wordliststrcmp(ntlmprevauthline, ntlmConfig->authenticate)) {
+ helperStatefulShutdown(ntlmauthenticators);
+ helperStatefulOpenServers(ntlmauthenticators);
+ if (ntlmprevauthline)
+ wordlistDestroy(&ntlmprevauthline);
+ ntlmprevauthline = wordlistDup(ntlmConfig->authenticate);
+ }
/* TODO: In here send the initial YR to preinitialise the challenge cache */
/* Think about this... currently we ask when the challenge is needed. Better? */
if (!ntlminit) {
assert(r->auth_user_request);
/* standard callback stuff */
valid = cbdataValid(r->data);
+ if (!valid) {
+ debug(29, 1) ("AuthenticateNTLMHandlePlacheholder: invalid callback data.\n");
+ return result;
+ }
/* call authenticateNTLMStart to retry this request */
debug(29, 9) ("authenticateNTLMHandleplaceholder: calling authenticateNTLMStart\n");
authenticateNTLMStart(r->auth_user_request, r->handler, r->data);
/* copy the challenge to the state data */
helperstate = helperStatefulServerGetData(lastserver);
if (helperstate == NULL)
- fatal("lost NTLm helper state! quitting\n");
+ fatal("lost NTLM helper state! quitting\n");
helperstate->challenge = xstrndup(reply, NTLM_CHALLENGE_SZ + 5);
helperstate->challengeuses = 0;
helperstate->renewed = squid_curtime;
ntlm_request = auth_user_request->scheme_data;
assert(ntlm_request != NULL);
result = S_HELPER_DEFER;
+ /* reserve the server for future authentication */
+ ntlm_request->authserver_deferred = 1;
debug(29, 9) ("authenticateNTLMHandleReply: helper '%d'\n", lastserver);
assert(ntlm_request->auth_state == AUTHENTICATE_STATE_NEGOTIATE);
- ntlm_request->authhelper = lastserver;
+ ntlm_request->authserver = lastserver;
ntlm_request->authchallenge = xstrndup(reply, NTLM_CHALLENGE_SZ + 5);
} else if (strncasecmp(reply, "AF ", 3) == 0) {
/* we're finished, release the helper */
/* we only expect OK when finishing the handshake */
assert(ntlm_request->auth_state == AUTHENTICATE_STATE_RESPONSE);
ntlm_user->username = xstrndup(reply, MAX_LOGIN_SZ);
- ntlm_request->authhelper = NULL;
+ ntlm_request->authserver = NULL;
auth_user->flags.credentials_ok = 1; /* login ok */
#ifdef NTLM_FAIL_OPEN
} else if (strncasecmp(reply, "LD ", 3) == 0) {
/* we only expect OK when finishing the handshake */
assert(ntlm_request->auth_state == AUTHENTICATE_STATE_RESPONSE);
ntlm_user->username = xstrndup(reply, MAX_LOGIN_SZ);
- helperstate = helperStatefulServerGetData(ntlm_request->authhelper);
- ntlm_request->authhelper = NULL;
+ helperstate = helperStatefulServerGetData(ntlm_request->authserver);
+ ntlm_request->authserver = NULL;
auth_user->flags.credentials_ok = 1; /* login ok */
/* BH code: mark helper as broken */
/* Not a valid helper response to a YR request. Assert so the helper
assert((ntlm_user != NULL) && (ntlm_request != NULL));
/* todo: action of Negotiate state on error */
result = S_HELPER_RELEASE; /*some error has occured. no more requests */
- ntlm_request->authhelper = NULL;
+ ntlm_request->authserver = NULL;
auth_user->flags.credentials_ok = 2; /* Login/Usercode failed */
debug(29, 4) ("authenticateNTLMHandleReply: Error validating user via NTLM. Error returned '%s'\n", reply);
ntlm_request->auth_state = AUTHENTICATE_STATE_NONE;
assert((ntlm_user != NULL) && (ntlm_request != NULL));
result = S_HELPER_RELEASE; /*some error has occured. no more requests for
* this helper */
- helperstate = helperStatefulServerGetData(ntlm_request->authhelper);
- ntlm_request->authhelper = NULL;
+ helperstate = helperStatefulServerGetData(ntlm_request->authserver);
+ ntlm_request->authserver = NULL;
if (ntlm_request->auth_state == AUTHENTICATE_STATE_NEGOTIATE) {
/* The helper broke on YR. It automatically
* resets */
/* restart the authentication process */
ntlm_request->auth_state = AUTHENTICATE_STATE_NONE;
auth_user->flags.credentials_ok = 3; /* cannot process */
- ntlm_request->authhelper = NULL;
+ ntlm_request->authserver = NULL;
}
} else {
fatal("authenticateNTLMHandleReply: called with no result string\n");
/* does our policy call for changing the challenge now? */
int
-authenticateNTLMChangeChallenge(ntlm_helper_state_t * helperstate)
+authenticateNTLMChangeChallenge_p(ntlm_helper_state_t * helperstate)
{
/* don't check for invalid challenges just for expiry choices */
/* this is needed because we have to starve the helper until all old
if (!helperstate->renewed) {
/* first use, no challenge has been set. Without this check, it will
* loop forever */
- debug(29, 5) ("authenticateNTLMChangeChallenge: first use\n");
+ debug(29, 5) ("authenticateNTLMChangeChallenge_p: first use\n");
return 0;
}
if (helperstate->challengeuses > ntlmConfig->challengeuses) {
- debug(29, 4) ("authenticateNTLMChangeChallenge: Challenge uses (%d) exceeded max uses (%d)\n", helperstate->challengeuses, ntlmConfig->challengeuses);
+ debug(29, 4) ("authenticateNTLMChangeChallenge_p: Challenge uses (%d) exceeded max uses (%d)\n", helperstate->challengeuses, ntlmConfig->challengeuses);
return 1;
}
if (helperstate->renewed + ntlmConfig->challengelifetime < squid_curtime) {
- debug(29, 4) ("authenticateNTLMChangeChallenge: Challenge exceeded max lifetime by %d seconds\n", squid_curtime - (helperstate->renewed + ntlmConfig->challengelifetime));
+ debug(29, 4) ("authenticateNTLMChangeChallenge_p: Challenge exceeded max lifetime by %d seconds\n", squid_curtime - (helperstate->renewed + ntlmConfig->challengelifetime));
return 1;
}
debug(29, 9) ("Challenge is to be reused\n");
break;
case AUTHENTICATE_STATE_RESPONSE:
sent_string = xstrdup(ntlm_request->ntlmauthenticate);
- assert(ntlm_request->authhelper);
- debug(29, 9) ("authenticateNTLMStart: Asking NTLMauthenticator '%d'.\n", ntlm_request->authhelper);
+ assert(ntlm_request->authserver);
+ debug(29, 9) ("authenticateNTLMStart: Asking NTLMauthenticator '%d'.\n", ntlm_request->authserver);
break;
default:
fatal("Invalid authenticate state for NTLMStart");
handler(data, NULL);
return;
}
-#ifdef NTLMHELPPROTOCOLV2
- r = cbdataAlloc(authenticateStateData);
- r->handler = handler;
- cbdataLock(data);
- r->data = data;
- r->auth_user_request = auth_user_request;
- snprintf(buf, 8192, "%s\n", sent_string);
- helperStatefulSubmit(ntlmauthenticators, buf, authenticateNTLMHandleReply, r, ntlm_request->authhelper);
- debug(29, 9) ("authenticateNTLMstart: finished\n");
-#else
/* this is ugly TODO: move the challenge generation routines to their own function and
* tidy the logic up to make use of the efficiency we now have */
switch (ntlm_request->auth_state) {
*/
server = helperStatefulDefer(ntlmauthenticators);
helperstate = server ? helperStatefulServerGetData(server) : NULL;
- while ((server != NULL) && authenticateNTLMChangeChallenge(helperstate)) {
+ while ((server != NULL) && authenticateNTLMChangeChallenge_p(helperstate)) {
/* flag this helper for challenge changing */
helperstate->starve = 1;
/* and release the deferred request */
helperStatefulReleaseServer(server);
+ /* Get another deferrable server */
server = helperStatefulDefer(ntlmauthenticators);
if (server != NULL)
helperstate = helperStatefulServerGetData(server);
if (server == NULL)
debug(29, 9) ("unable to get a deferred ntlm helper... all helpers are refreshing challenges. Queuing as a placeholder request.\n");
- ntlm_request->authhelper = server;
+ ntlm_request->authserver = server;
/* tell the log what helper we have been given */
debug(29, 9) ("authenticateNTLMStart: helper '%d' assigned\n", server);
- /* valid challenge? */
+ /* server and valid challenge? */
if ((server == NULL) || !authenticateNTLMValidChallenge(helperstate)) {
+ /* No server, or server with invalid challenge */
r = cbdataAlloc(authenticateStateData);
r->handler = handler;
cbdataLock(data);
r->data = data;
r->auth_user_request = auth_user_request;
if (server == NULL) {
- helperStatefulSubmit(ntlmauthenticators, NULL, authenticateNTLMHandleplaceholder, r, ntlm_request->authhelper);
+ helperStatefulSubmit(ntlmauthenticators, NULL, authenticateNTLMHandleplaceholder, r, NULL);
} else {
+ /* Server with invalid challenge */
snprintf(buf, 8192, "YR\n");
- helperStatefulSubmit(ntlmauthenticators, buf, authenticateNTLMHandleReply, r, ntlm_request->authhelper);
+ helperStatefulSubmit(ntlmauthenticators, buf, authenticateNTLMHandleReply, r, ntlm_request->authserver);
}
} else {
- /* we have a valid challenge */
+ /* (server != NULL and we have a valid challenge) */
/* TODO: turn the below into a function and call from here and handlereply */
/* increment the challenge uses */
helperstate->challengeuses++;
/* assign the challenge */
ntlm_request->authchallenge = xstrndup(helperstate->challenge, NTLM_CHALLENGE_SZ + 5);
+ /* we're not actually submitting a request, so we need to release the helper should
+ * the connection close unexpectedly
+ */
+ ntlm_request->authserver_deferred = 1;
handler(data, NULL);
}
r->data = data;
r->auth_user_request = auth_user_request;
snprintf(buf, 8192, "KK %s\n", sent_string);
- helperStatefulSubmit(ntlmauthenticators, buf, authenticateNTLMHandleReply, r, ntlm_request->authhelper);
+ /* getting rid of deferred request status */
+ ntlm_request->authserver_deferred = 0;
+ helperStatefulSubmit(ntlmauthenticators, buf, authenticateNTLMHandleReply, r, ntlm_request->authserver);
debug(29, 9) ("authenticateNTLMstart: finished\n");
break;
default:
fatal("Invalid authenticate state for NTLMStart");
}
-#endif
}
/* callback used by stateful helper routines */
/* clear the NTLM helper of being reserved for future requests */
void
-authenticateNTLMReleasehelper(auth_user_request_t * auth_user_request)
+authenticateNTLMReleaseServer(auth_user_request_t * auth_user_request)
{
ntlm_request_t *ntlm_request;
assert(auth_user_request->auth_user->auth_type == AUTH_NTLM);
assert(auth_user_request->scheme_data != NULL);
ntlm_request = auth_user_request->scheme_data;
- debug(29, 9) ("authenticateNTLMReleasehelper: releasing helper '%d'\n", ntlm_request->authhelper);
- helperStatefulReleaseServer(ntlm_request->authhelper);
- ntlm_request->authhelper = NULL;
+ debug(29, 9) ("authenticateNTLMReleaseServer: releasing server '%d'\n", ntlm_request->authserver);
+ helperStatefulReleaseServer(ntlm_request->authserver);
+ ntlm_request->authserver = NULL;
}
/* clear any connection related authentication details */
if (conn->auth_user_request != NULL) {
assert(conn->auth_user_request->scheme_data != NULL);
ntlm_request = conn->auth_user_request->scheme_data;
- if (ntlm_request->authhelper != NULL)
- authenticateNTLMReleasehelper(conn->auth_user_request);
+ if (ntlm_request->authserver != NULL && ntlm_request->authserver_deferred)
+ authenticateNTLMReleaseServer(conn->auth_user_request);
/* unlock the connection based lock */
debug(29, 9) ("authenticateNTLMOnCloseConnection: Unlocking auth_user from the connection.\n");
authenticateAuthUserRequestUnlock(conn->auth_user_request);
return NULL;
}
+/* NTLMLastHeader: return a pointer to the last header used in authenticating
+ * the request/conneciton
+ */
+const char *
+NTLMLastHeader(auth_user_request_t * auth_user_request)
+{
+ ntlm_request_t *ntlm_request;
+ assert(auth_user_request != NULL);
+ assert(auth_user_request->scheme_data != NULL);
+ ntlm_request = auth_user_request->scheme_data;
+ return ntlm_request->ntlmauthenticate;
+}
/*
* Decode an NTLM [Proxy-]Auth string, placing the results in the passed
auth_user_request->auth_user->auth_type = AUTH_NTLM;
auth_user_request->auth_user->scheme_data = memPoolAlloc(ntlm_user_pool);
auth_user_request->scheme_data = memPoolAlloc(ntlm_request_pool);
+ memset(auth_user_request->scheme_data, '\0', sizeof(ntlm_request_t));
/* lock for the auth_user_request link */
authenticateAuthUserLock(auth_user_request->auth_user);
node = dlinkNodeNew();
return strcmp(u1->username, u2->username);
}
+
+/* there is a known race where a single client recieves the same challenge
+ * and sends the same response to squid on a single select cycle.
+ * Check for this and if found ignore the new link
+ */
void
authenticateProxyAuthCacheAddLink(const char *key, auth_user_t * auth_user)
{
auth_user_hash_pointer *proxy_auth_hash;
+ dlink_node *node;
ntlm_user_t *ntlm_user;
+ ntlm_user = auth_user->scheme_data;
+ node = ntlm_user->proxy_auth_list.head;
+ /* prevent duplicates */
+ while (node) {
+ if (!strcmp(key, ((auth_user_hash_pointer *) node->data)->key))
+ return;
+ node = node->next;
+ }
proxy_auth_hash = memAllocate(MEM_AUTH_USER_HASH);
proxy_auth_hash->key = xstrdup(key);
proxy_auth_hash->auth_user = auth_user;
- ntlm_user = auth_user->scheme_data;
dlinkAddTail(proxy_auth_hash, &proxy_auth_hash->link, &ntlm_user->proxy_auth_list);
hash_join(proxy_auth_cache, (hash_link *) proxy_auth_hash);
}
break;
case AUTHENTICATE_STATE_NEGOTIATE:
ntlm_request->auth_state = AUTHENTICATE_STATE_CHALLENGE;
+ /* We _MUST_ have the auth challenge by now */
+ assert(ntlm_request->authchallenge);
return;
break;
case AUTHENTICATE_STATE_CHALLENGE:
} else {
debug(29, 4) ("authenticateNTLMAuthenticateUser: ntlm proxy-auth cache hit\n");
/* throw away the temporary entry */
- authenticateNTLMReleasehelper(auth_user_request);
+ authenticateNTLMReleaseServer(auth_user_request);
authenticateAuthUserMerge(auth_user, proxy_auth_hash->auth_user);
auth_user = proxy_auth_hash->auth_user;
auth_user_request->auth_user = auth_user;
/* on ntlm auth we do not unlock the auth_user until the
* connection is dropped. Thank MS for this quirk */
auth_user->expiretime = current_time.tv_sec;
- auth_user->ip_expiretime = squid_curtime;
}
return;
break;
/* set these to now because this is either a new login from an
* existing user or a new user */
auth_user->expiretime = current_time.tv_sec;
- auth_user->ip_expiretime = squid_curtime;
auth_user->flags.credentials_ok = 1; /*authenticated ok */
return;
break;
char *authchallenge;
/* what authenticate string did we get? */
char *ntlmauthenticate;
- /*we need to store the NTLM helper between requests */
- helper_stateful_server *authhelper;
+ /*we need to store the NTLM server between requests */
+ helper_stateful_server *authserver;
/* how far through the authentication process are we? */
auth_state_t auth_state;
+ /* have we got the helper-server in a deferred state? */
+ int authserver_deferred;
};
struct _ntlm_helper_state_t {
/*
- * $Id: authenticate.cc,v 1.24 2001/07/12 22:30:25 hno Exp $
+ * $Id: authenticate.cc,v 1.25 2001/08/03 15:13:03 adrian Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
#include "squid.h"
+CBDATA_TYPE(auth_user_ip_t);
+
static void
authenticateDecodeAuth(const char *proxy_auth, auth_user_request_t * auth_user_request);
auth_user_t *temp_auth;
temp_auth = memAllocate(MEM_AUTH_USER_T);
assert(temp_auth != NULL);
+ memset(temp_auth, '\0', sizeof(auth_user_t));
temp_auth->auth_type = AUTH_UNKNOWN;
temp_auth->references = 0;
temp_auth->auth_module = authenticateAuthSchemeId(scheme) + 1;
void
authenticateAuthUserRequestSetIp(auth_user_request_t * auth_user_request, struct in_addr ipaddr)
{
- if (auth_user_request->auth_user)
- if (!auth_user_request->auth_user->ipaddr.s_addr)
- auth_user_request->auth_user->ipaddr = ipaddr;
+ auth_user_ip_t *ipdata, *tempnode;
+ auth_user_t *auth_user;
+ char *ip1;
+ CBDATA_INIT_TYPE(auth_user_ip_t);
+ if (!auth_user_request->auth_user)
+ return;
+ auth_user = auth_user_request->auth_user;
+ ipdata = (auth_user_ip_t *) auth_user->ip_list.head;
+ /* we walk the entire list to prevent the first item in the list preventing
+ * old entries being flushed and locking a user out after a timeout+reconfigure
+ */
+ while (ipdata) {
+ tempnode = (auth_user_ip_t *) ipdata->node.next;
+ /* walk the ip list */
+ if (ipdata->ipaddr.s_addr == ipaddr.s_addr) {
+ /* This ip has alreadu been seen. */
+ /* update IP ttl */
+ ipdata->ip_expiretime = squid_curtime;
+ } else if (ipdata->ip_expiretime + Config.authenticateIpTTL < squid_curtime) {
+ /* This IP has expired - remove from the seen list */
+ dlinkDelete(&ipdata->node, &auth_user->ip_list);
+ cbdataFree(ipdata);
+ /* catch incipient underflow */
+ assert(auth_user->ipcount);
+ auth_user->ipcount--;
+ }
+ ipdata = tempnode;
+ }
+
+ /* This ip is not in the seen list */
+ ipdata = cbdataAlloc(auth_user_ip_t);
+ ipdata->ip_expiretime = squid_curtime;
+ ipdata->ipaddr = ipaddr;
+ dlinkAddTail(ipdata, &ipdata->node, &auth_user->ip_list);
+ auth_user->ipcount++;
+
+ ip1 = xstrdup(inet_ntoa(ipaddr));
+ debug(29, 1) ("authenticateAuthUserRequestSetIp: user '%s' has been seen at a new IP address (%s, %s)\n ", authenticateUserUsername(auth_user), ip1);
+ safe_free(ip1);
+}
+
+void
+authenticateAuthUserRequestRemoveIp(auth_user_request_t * auth_user_request, struct in_addr ipaddr)
+{
+ auth_user_ip_t *ipdata;
+ auth_user_t *auth_user;
+ if (!auth_user_request->auth_user)
+ return;
+ auth_user = auth_user_request->auth_user;
+ ipdata = (auth_user_ip_t *) auth_user->ip_list.head;
+ while (ipdata) {
+ /* walk the ip list */
+ if (ipdata->ipaddr.s_addr == ipaddr.s_addr) {
+ /* remove the node */
+ dlinkDelete(&ipdata->node, &auth_user->ip_list);
+ cbdataFree(ipdata);
+ /* catch incipient underflow */
+ assert(auth_user->ipcount);
+ auth_user->ipcount--;
+ return;
+ }
+ ipdata = (auth_user_ip_t *) ipdata->node.next;
+ }
+
}
+static void
+authenticateAuthUserClearIp(auth_user_t * auth_user)
+{
+ auth_user_ip_t *ipdata, *tempnode;
+ if (!auth_user)
+ return;
+ ipdata = (auth_user_ip_t *) auth_user->ip_list.head;
+ while (ipdata) {
+ tempnode = (auth_user_ip_t *) ipdata->node.next;
+ /* walk the ip list */
+ dlinkDelete(&ipdata->node, &auth_user->ip_list);
+ cbdataFree(ipdata);
+ /* catch incipient underflow */
+ assert(auth_user->ipcount);
+ auth_user->ipcount--;
+ ipdata = tempnode;
+ }
+ /* integrity check */
+ assert(auth_user->ipcount == 0);
+}
+
+
+void
+authenticateAuthUserRequestClearIp(auth_user_request_t * auth_user_request)
+{
+ if (auth_user_request)
+ authenticateAuthUserClearIp(auth_user_request->auth_user);
+}
+
+size_t
+authenticateAuthUserRequestIPCount(auth_user_request_t * auth_user_request)
+{
+ assert(auth_user_request);
+ assert(auth_user_request->auth_user);
+ return auth_user_request->auth_user->ipcount;
+}
+
+
/* Get Auth User: Return a filled out auth_user structure for the given
* Proxy Auth (or Auth) header. It may be a cached Auth User or a new
* Unauthenticated structure. The structure is given an inital lock here.
auth_user_request_t *auth_user_request = authenticateAuthUserRequestNew();
/* and lock for the callers instance */
authenticateAuthUserRequestLock(auth_user_request);
+ /* The scheme is allowed to provide a cached auth_user or a new one */
authenticateDecodeAuth(proxy_auth, auth_user_request);
return auth_user_request;
}
}
/*
- * authenticateAuthenticateUser: log this user request in.
+ * authenticateAuthenticateUser: call the module specific code to
+ * log this user request in.
* Cache hits may change the auth_user pointer in the structure if needed.
* This is basically a handle approach.
*/
-void
+static void
authenticateAuthenticateUser(auth_user_request_t * auth_user_request, request_t * request, ConnStateData * conn, http_hdr_type type)
{
assert(auth_user_request != NULL);
authscheme_list[auth_user_request->auth_user->auth_module - 1].authAuthenticate(auth_user_request, request, conn, type);
}
+/* returns one of
+ * AUTH_ACL_CHALLENGE,
+ * AUTH_ACL_HELPER,
+ * AUTH_ACL_CANNOT_AUTHENTICATE,
+ * AUTH_AUTHENTICATED
+ *
+ * How to use: In your proxy-auth dependent acl code, use the following
+ * construct:
+ * int rv;
+ * if ((rv = AuthenticateAuthenticate()) != AUTH_AUTHENTICATED)
+ * return rv;
+ *
+ * when this code is reached, the request/connection is authenticated.
+ *
+ * if you have non-acl code, but want to force authentication, you need a
+ * callback mechanism like the acl testing routines that will send a 40[1|7] to
+ * the client when rv==AUTH_ACL_CHALLENGE, and will communicate with
+ * the authenticateStart routine for rv==AUTH_ACL_HELPER
+ */
+auth_acl_t
+authenticateAuthenticate(auth_user_request_t ** auth_user_request, http_hdr_type headertype, request_t * request, ConnStateData * conn, struct in_addr src_addr)
+{
+ const char *proxy_auth;
+ assert(headertype != 0);
+ proxy_auth = httpHeaderGetStr(&request->header, headertype);
+
+ if (conn == NULL) {
+ debug(28, 1) ("authenticateAuthenticate: no connection data, cannot process authentication\n");
+ /*
+ * deny access: clientreadrequest requires conn data, and it is always
+ * compiled in so we should have it too.
+ */
+ return AUTH_ACL_CANNOT_AUTHENTICATE;
+ }
+ /*
+ * a note on proxy_auth logix here:
+ * proxy_auth==NULL -> unauthenticated request || already authenticated connection
+ * so we test for an authenticated connection when we recieve no authentication
+ * header.
+ */
+ if (((proxy_auth == NULL) && (!authenticateUserAuthenticated(*auth_user_request ? *auth_user_request : conn->auth_user_request)))
+ || (conn->auth_type == AUTH_BROKEN)) {
+ /* no header or authentication failed/got corrupted - restart */
+ conn->auth_type = AUTH_UNKNOWN;
+ debug(28, 4) ("authenticateAuthenticate: broken auth or no proxy_auth header. Requesting auth header.\n");
+ /* something wrong with the AUTH credentials. Force a new attempt */
+ conn->auth_user_request = NULL;
+ if (*auth_user_request) {
+ /* unlock the ACL lock */
+ authenticateAuthUserRequestUnlock(*auth_user_request);
+ auth_user_request = NULL;
+ }
+ return AUTH_ACL_CHALLENGE;
+ }
+ /*
+ * Is this an already authenticated connection with a new auth header?
+ * No check for function required in the if: its compulsory for conn based
+ * auth modules
+ */
+ if (proxy_auth && conn->auth_user_request &&
+ authenticateUserAuthenticated(conn->auth_user_request) &&
+ strcmp(proxy_auth, authscheme_list[conn->auth_user_request->auth_user->auth_module - 1].authConnLastHeader(conn->auth_user_request))) {
+ debug(28, 1) ("authenticateAuthenticate: DUPLICATE AUTH - authentication header on already authenticated connection!. Current user '%s' proxy_auth %s\n", authenticateUserRequestUsername(conn->auth_user_request), proxy_auth);
+ /* remove this request struct - the link is already authed and it can't be to
+ * reauth.
+ */
+
+ /* This should _only_ ever occur on the first pass through
+ * authenticateAuthenticate
+ */
+ assert(*auth_user_request == NULL);
+ /* unlock the conn lock on the auth_user_request */
+ authenticateAuthUserRequestUnlock(conn->auth_user_request);
+ /* mark the conn as non-authed. */
+ conn->auth_user_request = NULL;
+ /* Set the connection auth type */
+ conn->auth_type = AUTH_UNKNOWN;
+ }
+ /* we have a proxy auth header and as far as we know this connection has
+ * not had bungled connection oriented authentication happen on it. */
+ debug(28, 9) ("authenticateAuthenticate: header %s.\n", proxy_auth);
+ if (*auth_user_request == NULL) {
+ debug(28, 9) ("authenticateAuthenticate: This is a new checklist test on FD:%d\n",
+ conn->fd);
+ if ((!request->auth_user_request)
+ && (conn->auth_type == AUTH_UNKNOWN)) {
+ /* beginning of a new request check */
+ debug(28, 4) ("authenticateAuthenticate: no connection authentication type\n");
+ if (!authenticateValidateUser(*auth_user_request =
+ authenticateGetAuthUser(proxy_auth))) {
+ /* the decode might have left a username for logging, or a message to
+ * the user */
+ if (authenticateUserRequestUsername(*auth_user_request)) {
+ /* lock the user for the request structure link */
+ authenticateAuthUserRequestLock(*auth_user_request);
+ request->auth_user_request = *auth_user_request;
+ /* unlock the ACL reference. */
+ authenticateAuthUserRequestUnlock(*auth_user_request);
+ }
+ *auth_user_request = NULL;
+ return AUTH_ACL_CHALLENGE;
+ }
+ /* the user_request comes prelocked for the caller to GetAuthUser (us) */
+ } else if (request->auth_user_request) {
+ *auth_user_request = request->auth_user_request;
+ /* lock the user request for this ACL processing */
+ authenticateAuthUserRequestLock(*auth_user_request);
+ } else {
+ if (conn->auth_user_request != NULL) {
+ *auth_user_request = conn->auth_user_request;
+ /* lock the user request for this ACL processing */
+ authenticateAuthUserRequestLock(*auth_user_request);
+ } else {
+ /* failed connection based authentication */
+ debug(28, 4) ("authenticateAuthenticate: Auth user request %d conn-auth user request %d conn type %d authentication failed.\n",
+ *auth_user_request, conn->auth_user_request, conn->auth_type);
+ authenticateAuthUserRequestUnlock(*auth_user_request);
+ *auth_user_request = NULL;
+ return AUTH_ACL_CHALLENGE;
+ }
+ }
+ }
+ if (!authenticateUserAuthenticated(*auth_user_request)) {
+ /* User not logged in. Log them in */
+ authenticateAuthenticateUser(*auth_user_request, request,
+ conn, headertype);
+ switch (authenticateDirection(*auth_user_request)) {
+ case 1:
+ /* this ACL check is finished. Unlock. */
+ authenticateAuthUserRequestUnlock(*auth_user_request);
+ *auth_user_request = NULL;
+ return AUTH_ACL_CHALLENGE;
+ case -1:
+ /* we are partway through authentication within squid,
+ * the *auth_user_request variables stores the auth_user_request
+ * for the callback to here - Do not Unlock */
+ return AUTH_ACL_HELPER;
+ case -2:
+ /* this ACL check is finished. Unlock. */
+ authenticateAuthUserRequestUnlock(*auth_user_request);
+ *auth_user_request = NULL;
+ return AUTH_ACL_CHALLENGE;
+ }
+ /* on 0 the authentication is finished - fallthrough */
+ /* See of user authentication failed for some reason */
+ if (!authenticateUserAuthenticated(*auth_user_request)) {
+ if ((authenticateUserRequestUsername(*auth_user_request))) {
+ if (!request->auth_user_request) {
+ /* lock the user for the request structure link */
+ authenticateAuthUserRequestLock(*auth_user_request);
+ request->auth_user_request = *auth_user_request;
+ }
+ }
+ /* this ACL check is finished. Unlock. */
+ authenticateAuthUserRequestUnlock(*auth_user_request);
+ *auth_user_request = NULL;
+ return AUTH_ACL_CHALLENGE;
+ }
+ }
+ /* copy username to request for logging on client-side */
+ /* the credentials are correct at this point */
+ if (!request->auth_user_request) {
+ /* lock the user for the request structure link */
+ authenticateAuthUserRequestLock(*auth_user_request);
+ request->auth_user_request = *auth_user_request;
+ authenticateAuthUserRequestSetIp(*auth_user_request, src_addr);
+ }
+ /* Unlock the request - we've authenticated it */
+ authenticateAuthUserRequestUnlock(*auth_user_request);
+ return AUTH_AUTHENTICATED;
+}
+
+
/* authenticateUserUsername: return a pointer to the username in the */
char *
authenticateUserUsername(auth_user_t * auth_user)
|| (rep->sline.status == HTTP_UNAUTHORIZED)) && internal)
/* this is a authenticate-needed response */
{
- if ((auth_user_request != NULL) && (auth_user_request->auth_user->auth_module > 0) &! authenticateUserAuthenticated(auth_user_request))
+ if ((auth_user_request != NULL) && (auth_user_request->auth_user->auth_module > 0) & !authenticateUserAuthenticated(auth_user_request))
authscheme_list[auth_user_request->auth_user->auth_module - 1].authFixHeader(auth_user_request, rep, type, request);
else {
int i;
}
/* free cached acl results */
aclCacheMatchFlush(&u->proxy_match_cache);
+ /* free seen ip address's */
+ authenticateAuthUserClearIp(u);
if (u->scheme_data && u->auth_module > 0)
authscheme_list[u->auth_module - 1].FreeUser(u);
/* prevent accidental reuse */
/* lock for presence in the cache */
authenticateAuthUserLock(auth_user);
}
-
-
-
-/*
- * check the user for ip changes timeouts
- * 0 = failed check
- * 1 = ip requirements are ok.
- */
-/* TODO:
- * ip_expire data should be in a struct of it's own - for code reuse */
-int
-authenticateCheckAuthUserIP(struct in_addr request_src_addr, auth_user_request_t * auth_user_request)
-{
- char *username = authenticateUserRequestUsername(auth_user_request);
- if (request_src_addr.s_addr == auth_user_request->auth_user->ipaddr.s_addr || auth_user_request->auth_user->ip_expiretime + Config.authenticateIpTTL <= squid_curtime) {
- /* user has not moved ip or had the ip timeout expire */
- if ((auth_user_request->auth_user->auth_type == AUTH_UNKNOWN) ||
- (auth_user_request->auth_user->auth_type == AUTH_BROKEN)) {
- debug(29, 1) ("authenticateCheckProxyAuthIP: broken or unknown auth type %d.\n", auth_user_request->auth_user->auth_type);
- return 0;
- }
- username = authenticateUserRequestUsername(auth_user_request);
- /* Update IP ttl */
- auth_user_request->auth_user->ip_expiretime = squid_curtime;
- auth_user_request->auth_user->ipaddr = request_src_addr;
- return 1;
- } else {
- char *ip1 = xstrdup(inet_ntoa(auth_user_request->auth_user->ipaddr));
- char *ip2 = xstrdup(inet_ntoa(request_src_addr));
- if (Config.onoff.authenticateIpTTLStrict) {
- debug(29, 1) ("aclMatchProxyAuth: user '%s' tried to use multiple IP addresses! (%s, %s)\n ", username, ip1, ip2);
- } else {
- /* Non-strict mode. Reassign ownership to the new IP */
- auth_user_request->auth_user->ipaddr.s_addr = request_src_addr.s_addr;
- debug(29, 1) ("aclMatchProxyAuth: user '%s' has changed IP address (%s, %s)\n ", username, ip1, ip2);
- }
- safe_free(ip1);
- safe_free(ip2);
- /* and deny access */
- return 0;
- }
-}
#
-# $Id: cf.data.pre,v 1.222 2001/07/28 09:21:31 hno Exp $
+# $Id: cf.data.pre,v 1.223 2001/08/03 15:13:03 adrian Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
the user to redial without hassle. If all your users are
stationary then higher values may be used.
- See also authenticate_ip_ttl_is_strict
-DOC_END
-
-NAME: authenticate_ip_ttl_is_strict
-TYPE: onoff
-LOC: Config.onoff.authenticateIpTTLStrict
-DEFAULT: on
-DOC_START
- This option makes authenticate_ip_ttl a bit stricter. With this
- enabled authenticate_ip_ttl will deny all access from other IP
- addresses until the TTL has expired, and the IP address "owning"
- the userid will not be forced to reauthenticate.
+ See also the acl max_user_ip.
DOC_END
COMMENT_START
# This will be matched when the client's IP address has
# more than <number> HTTP connections established.
+ acl aclname max_user_ip
+ # This will be matched when the user attempts to log in from more
+ # than <number> different ip address's. The authenticate_ip_ttl
+ # parameter controls the timeout on the ip entries.
+ # NOTE: in acceleration mode, clients may appear to come from
+ # multiple address's if they are going through proxy farms,
+ # so a limit of 1 may cause user problems.
+
+
acl aclname req_mime_type mime-type1 ...
# regex match agains the mime type of the request generated
# by the client. Can be used to detect file upload or some
/*
- * $Id: client_side.cc,v 1.541 2001/07/28 09:21:31 hno Exp $
+ * $Id: client_side.cc,v 1.542 2001/08/03 15:13:03 adrian Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
e = storeCreateEntry(h->uri, h->log_uri, flags, m);
h->sc = storeClientListAdd(e, h);
#if DELAY_POOLS
- delaySetStoreClient(h->sc, delayClient(h->request));
+ delaySetStoreClient(h->sc, delayClient(h));
#endif
storeClientCopy(h->sc, e, 0, 0, CLIENT_SOCK_SZ,
memAllocate(MEM_CLIENT_SOCK_BUF), clientSendMoreData, h);
http->sc = storeClientListAdd(entry, http);
#if DELAY_POOLS
/* delay_id is already set on original store client */
- delaySetStoreClient(http->sc, delayClient(http->request));
+ delaySetStoreClient(http->sc, delayClient(http));
#endif
http->request->lastmod = http->old_entry->lastmod;
debug(33, 5) ("clientProcessExpired: lastmod %d\n", (int) entry->lastmod);
}
static int
-clientReplyBodyTooLarge(HttpReply *rep, int clen)
+clientReplyBodyTooLarge(HttpReply * rep, int clen)
{
if (0 == rep->maxBodySize)
return 0; /* disabled */
int rv;
httpReplyBodyBuildSize(http->request, rep, &Config.ReplyBodySize);
if (clientReplyBodyTooLarge(rep, rep->content_length)) {
- ErrorState *err = errorCon(ERR_TOO_BIG, HTTP_FORBIDDEN);
- err->request = requestLink(http->request);
- storeUnregister(http->sc, http->entry, http);
- http->sc = NULL;
- storeUnlockObject(http->entry);
- http->entry = clientCreateStoreEntry(http, http->request->method,
+ ErrorState *err = errorCon(ERR_TOO_BIG, HTTP_FORBIDDEN);
+ err->request = requestLink(http->request);
+ storeUnregister(http->sc, http->entry, http);
+ http->sc = NULL;
+ storeUnlockObject(http->entry);
+ http->entry = clientCreateStoreEntry(http, http->request->method,
null_request_flags);
- errorAppendEntry(http->entry, err);
- httpReplyDestroy(rep);
- return;
+ errorAppendEntry(http->entry, err);
+ httpReplyDestroy(rep);
+ return;
}
body_size = size - rep->hdr_sz;
assert(body_size >= 0);
http->entry->mem_obj->method = r->method;
http->sc = storeClientListAdd(http->entry, http);
#if DELAY_POOLS
- delaySetStoreClient(http->sc, delayClient(r));
+ delaySetStoreClient(http->sc, delayClient(http));
#endif
storeClientCopy(http->sc, http->entry,
http->out.offset,
conn->in.buf = xrealloc(conn->in.buf, conn->in.size);
/* XXX account conn->in.buf */
debug(33, 2) ("growing request buffer: offset=%ld size=%ld\n",
- (long) conn->in.offset, (long) conn->in.size);
+ (long) conn->in.offset, (long) conn->in.size);
len = conn->in.size - conn->in.offset - 1;
}
statCounter.syscalls.sock.reads++;
/*
- * $Id: enums.h,v 1.193 2001/04/20 21:34:39 hno Exp $
+ * $Id: enums.h,v 1.194 2001/08/03 15:13:04 adrian Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
ACL_MAXCONN,
ACL_REQ_MIME_TYPE,
ACL_REP_MIME_TYPE,
+ ACL_MAX_USER_IP,
ACL_ENUM_MAX
} squid_acl;
ACCESS_REQ_PROXY_AUTH
} allow_t;
+typedef enum {
+ AUTH_ACL_CHALLENGE = -2,
+ AUTH_ACL_HELPER = -1,
+ AUTH_ACL_CANNOT_AUTHENTICATE = 0,
+ AUTH_AUTHENTICATED = 1,
+} auth_acl_t;
+
typedef enum {
AUTH_UNKNOWN, /* default */
AUTH_BASIC,
/*
- * $Id: helper.cc,v 1.28 2001/05/21 04:50:57 hno Exp $
+ * $Id: helper.cc,v 1.29 2001/08/03 15:13:04 adrian Exp $
*
* DEBUG: section 29 Helper process maintenance
* AUTHOR: Harvest Derived?
srv->flags.alive = 1;
srv->flags.reserved = S_HELPER_FREE;
srv->deferred_requests = 0;
+ srv->stats.deferbyfunc = 0;
+ srv->stats.deferbycb = 0;
+ srv->stats.submits = 0;
+ srv->stats.releases = 0;
srv->index = k;
srv->rfd = rfd;
srv->wfd = wfd;
cbdataLock(r->data);
if ((buf != NULL) && lastserver) {
debug(29, 5) ("StatefulSubmit with lastserver %d\n", lastserver);
- if (lastserver->flags.reserved != S_HELPER_RESERVED)
+ /* the queue doesn't count for this assert because queued requests
+ * have already gone through here and been tested.
+ * It's legal to have deferred_requests == 0 and queue entries
+ * and status of S_HELPEER_DEFERRED.
+ * BUT: It's not legal to submit a new request w/lastserver in
+ * that state.
+ */
+ assert(!(lastserver->deferred_requests == 0 &&
+ lastserver->flags.reserved == S_HELPER_DEFERRED));
+ if (lastserver->flags.reserved != S_HELPER_RESERVED) {
+ lastserver->stats.submits++;
lastserver->deferred_requests--;
+ }
if (!(lastserver->request)) {
debug(29, 5) ("StatefulSubmit dispatching\n");
helperStatefulDispatch(lastserver, r);
debug(29, 1) ("helperStatefulDefer: None available.\n");
return NULL;
}
+ /* consistency check:
+ * when the deferred count is 0,
+ * submits + releases == deferbyfunc + deferbycb
+ * Or in english, when there are no deferred requests, the amount
+ * we have submitted to the queue or cancelled must equal the amount
+ * we have said we wanted to be able to submit or cancel
+ */
+ if (rv->deferred_requests == 0)
+ assert(rv->stats.submits + rv->stats.releases ==
+ rv->stats.deferbyfunc + rv->stats.deferbycb);
+
rv->flags.reserved = S_HELPER_DEFERRED;
rv->deferred_requests++;
+ rv->stats.deferbyfunc++;
return rv;
}
helperStatefulRequestFree(r);
srv->request = NULL;
}
- debug(29, 1) ("helperStatefulReset reset helper %s #%d\n", hlp->id_name, srv->index + 1);
srv->flags.busy = 0;
if (srv->queue.head) {
srv->flags.reserved = S_HELPER_DEFERRED;
helperStatefulReleaseServer(helper_stateful_server * srv)
/*decrease the number of 'waiting' clients that set the helper to be DEFERRED */
{
- if (srv->deferred_requests > 0)
+ srv->stats.releases++;
+ if (srv->flags.reserved == S_HELPER_DEFERRED) {
+ assert(srv->deferred_requests);
srv->deferred_requests--;
+ }
if (!(srv->deferred_requests) && (srv->flags.reserved == S_HELPER_DEFERRED) && !(srv->queue.head)) {
srv->flags.reserved = S_HELPER_FREE;
if ((srv->parent->OnEmptyQueue != NULL) && (srv->data))
fatal("helperStatefulHandleRead: either a non-state aware callback was give to the stateful helper routines, or an uninitialised callback response was recieved.\n");
break;
case S_HELPER_RELEASE: /* helper finished with */
- if (!srv->queue.head) {
+ if (!srv->deferred_requests && !srv->queue.head) {
srv->flags.reserved = S_HELPER_FREE;
if ((srv->parent->OnEmptyQueue != NULL) && (srv->data))
srv->parent->OnEmptyQueue(srv->data);
break;
case S_HELPER_RESERVE: /* 'pin' this helper for the caller */
if (!srv->queue.head) {
+ assert(srv->deferred_requests == 0);
srv->flags.reserved = S_HELPER_RESERVED;
debug(29, 5) ("StatefulHandleRead: reserving %s #%d\n", hlp->id_name, srv->index + 1);
} else {
*/
srv->flags.reserved = S_HELPER_DEFERRED;
srv->deferred_requests++;
+ srv->stats.deferbycb++;
debug(29, 5) ("StatefulHandleRead: reserving %s #%d for deferred requests.\n", hlp->id_name, srv->index + 1);
break;
default:
/*
- * $Id: protos.h,v 1.408 2001/07/28 09:21:32 hno Exp $
+ * $Id: protos.h,v 1.409 2001/08/03 15:13:04 adrian Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
extern void authenticateFixHeader(HttpReply *, auth_user_request_t *, request_t *, int, int);
extern void authenticateAddTrailer(HttpReply *, auth_user_request_t *, request_t *, int);
extern auth_user_request_t *authenticateGetAuthUser(const char *proxy_auth);
-extern void authenticateAuthenticateUser(auth_user_request_t *, request_t *, ConnStateData *, http_hdr_type);
+extern auth_acl_t authenticateAuthenticate(auth_user_request_t **, http_hdr_type, request_t *, ConnStateData *, struct in_addr);
extern void authenticateAuthUserUnlock(auth_user_t * auth_user);
extern void authenticateAuthUserLock(auth_user_t * auth_user);
extern void authenticateAuthUserRequestUnlock(auth_user_request_t *);
extern char *authenticateAuthUserRequestMessage(auth_user_request_t *);
extern int authenticateAuthUserInuse(auth_user_t * auth_user);
extern void authenticateAuthUserRequestSetIp(auth_user_request_t *, struct in_addr);
+extern void authenticateAuthUserRequestRemoveIp(auth_user_request_t *, struct in_addr);
+extern void authenticateAuthUserRequestClearIp(auth_user_request_t *);
+extern size_t authenticateAuthUserRequestIPCount(auth_user_request_t *);
extern int authenticateDirection(auth_user_request_t *);
extern FREE authenticateFreeProxyAuthUser;
extern void authenticateFreeProxyAuthUserACLResults(void *data);
/*
- * $Id: structs.h,v 1.395 2001/07/28 09:21:32 hno Exp $
+ * $Id: structs.h,v 1.396 2001/08/03 15:13:04 adrian Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
} flags;
};
+struct _acl_user_ip_data {
+ size_t max;
+ struct {
+ unsigned int strict:1;
+ } flags;
+};
struct _acl_ip_data {
struct in_addr addr1; /* if addr2 non-zero then its a range */
dlink_node link; /* other hash entries that point to the same auth_user */
};
+struct _auth_user_ip_t {
+ dlink_node node;
+ /* IP addr this user authenticated from */
+ struct in_addr ipaddr;
+ time_t ip_expiretime;
+};
+
struct _auth_user_t {
/* extra fields for proxy_auth */
/* this determines what scheme owns the user data. */
/* we may have many proxy-authenticate strings that decode to the same user */
dlink_list proxy_auth_list;
dlink_list proxy_match_cache;
+ dlink_list ip_list;
+ size_t ipcount;
struct {
unsigned int credentials_ok:2; /*0=unchecked,1=ok,2=failed */
} flags;
long expiretime;
- /* IP addr this user authenticated from */
- struct in_addr ipaddr;
- time_t ip_expiretime;
/* how many references are outstanding to this instance */
size_t references;
/* the auth scheme has it's own private data area */
AUTHSFREECONFIG *freeconfig;
AUTHSUSERNAME *authUserUsername;
AUTHSONCLOSEC *oncloseconnection; /*optional */
+ AUTHSCONNLASTHEADER *authConnLastHeader;
AUTHSDECODE *decodeauth;
AUTHSDIRECTION *getdirection;
AUTHSPARSE *parse;
int digest_generation;
#endif
int log_ip_on_direct;
- int authenticateIpTTLStrict;
int ie_refresh;
int vary_ignore_expire;
int pipeline_prefetch;
} flags;
struct {
int uses;
+ int submits;
+ int releases;
+ int deferbyfunc;
+ int deferbycb;
} stats;
size_t deferred_requests; /* current number of deferred requests */
void *data; /* State data used by the calling routines */
/*
- * $Id: typedefs.h,v 1.129 2001/07/28 09:21:32 hno Exp $
+ * $Id: typedefs.h,v 1.130 2001/08/03 15:13:04 adrian Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
typedef struct _auth_user_t auth_user_t;
typedef struct _auth_user_request_t auth_user_request_t;
typedef struct _auth_user_hash_pointer auth_user_hash_pointer;
+typedef struct _auth_user_ip_t auth_user_ip_t;
typedef struct _acl_proxy_auth_match_cache acl_proxy_auth_match_cache;
typedef struct _authscheme_entry authscheme_entry_t;
typedef struct _authScheme authScheme;
typedef struct _acl_user_data acl_user_data;
+typedef struct _acl_user_ip_data acl_user_ip_data;
typedef struct _acl_arp_data acl_arp_data;
typedef struct _acl acl;
typedef struct _acl_snmp_comm acl_snmp_comm;
typedef void AUTHSSHUTDOWN(void);
typedef void AUTHSSTART(auth_user_request_t *, RH *, void *);
typedef void AUTHSSTATS(StoreEntry *);
+typedef const char *AUTHSCONNLASTHEADER(auth_user_request_t *);
/* append/vprintf's for Packer */
typedef void (*append_f) (void *, const char *buf, int size);