Search squid archive

[squid-users] auth_helper wrapper, not working within squid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi.

in the squid-archives i found a perl-wrapper for ncsa_auth. like this one:

#!/usr/bin/perl
use IPC::Open2;
open2(*READ1, *WRITE1, "/usr/lib/squid/ncsa_auth /home/www/domain/.htpasswd")
  or die "cannot open: $!\n";
while (<>) {
        print WRITE1 $_;
        $ans = <READ1>;
        if ( $ans =~ /^OK/ ) { print $ans; next; }
        print $ans;
}

run from the shell it does the job quite right. but not when run for squid as a
"auth_param basic program". i will get the login prompt, but after typing valid
creds nothing happens anymore. nothing in the squid logs. tried with some debug
prints in the wrapper, it seems like the wrapper is not able to go to next line
of the <> operator after it got the first line (the valid creds). but why does
it work when run from the shell? any ideas?

tia sebastian


--

  sebastian pein
  netzwerkmanagement
  infinity networks gmbh

  web: www.infinity-networks.de
  fon: +49-6104-68363-0
  fax: +49-6104-68363-199
  mob: +49-163-68363-01

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux