projects
/
mirror
/
userdir-ldap-cgi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2333aa3
)
no more logging
author
tausq
<>
Mon, 13 Dec 1999 04:03:47 +0000
(
04:03
+0000)
committer
tausq
<>
Mon, 13 Dec 1999 04:03:47 +0000
(
04:03
+0000)
login.cgi
patch
|
blob
|
history
diff --git
a/login.cgi
b/login.cgi
index
3da2b3a
..
243c427
100755
(executable)
--- a/
login.cgi
+++ b/
login.cgi
@@
-1,6
+1,6
@@
#!/usr/bin/perl
#!/usr/bin/perl
-# $Id: login.cgi,v 1.
4 1999/12/11 07:03:45
tausq Exp $
+# $Id: login.cgi,v 1.
5 1999/12/13 05:03:47
tausq Exp $
# (c) 1999 Randolph Chung. Licensed under the GPL. <tausq@debian.org>
use lib '.';
# (c) 1999 Randolph Chung. Licensed under the GPL. <tausq@debian.org>
use lib '.';
@@
-32,9
+32,6
@@
my $username = $query->param('username');
my $password = $query->param('password');
my $binddn = "uid=$username,$config{basedn}";
my $password = $query->param('password');
my $binddn = "uid=$username,$config{basedn}";
-&logf(sprintf("proto=[%s]; key=[%s]; hrkey=[%s]; username=[%s]; passwd=[%s]; binddn=[%s]",
- $proto, $key, $hrkey, $username, ($password ? "shh!" : "(null)"), $binddn));
-
my $mesg = $ldap->bind($binddn, password => $password);
$mesg->sync;
my $mesg = $ldap->bind($binddn, password => $password);
$mesg->sync;
@@
-44,29
+41,15
@@
if ($mesg->code == LDAP_SUCCESS) {
if ($query->param('update')) {
my $url = "$proto://$ENV{SERVER_NAME}/$config{webupdateurl}?id=$username&authtoken=$cryptid,$hrkey&editdn=";
$url .= uri_escape("uid=$username,$config{basedn}", "\x00-\x40\x7f-\xff");
if ($query->param('update')) {
my $url = "$proto://$ENV{SERVER_NAME}/$config{webupdateurl}?id=$username&authtoken=$cryptid,$hrkey&editdn=";
$url .= uri_escape("uid=$username,$config{basedn}", "\x00-\x40\x7f-\xff");
- &logf("redirect url = [$url]");
print "Location: $url\n\n";
} else {
my $url = "$proto://$ENV{SERVER_NAME}/$config{websearchurl}?id=$username&authtoken=$cryptid,$hrkey";
print "Location: $url\n\n";
} else {
my $url = "$proto://$ENV{SERVER_NAME}/$config{websearchurl}?id=$username&authtoken=$cryptid,$hrkey";
- &logf("redirect url = [$url]");
print "Location: $url\n\n";
}
$ldap->unbind;
} else {
print "Location: $url\n\n";
}
$ldap->unbind;
} else {
- &logf("bad auth");
print "Content-type: text/html\n\n";
print "<html><body><h1>Not authenticated</h1></body></html>\n";
}
print "Content-type: text/html\n\n";
print "<html><body><h1>Not authenticated</h1></body></html>\n";
}
-sub logf {
- my $msg = shift;
- my $t = localtime;
-
- if (open(L, ">>$config{weblogfile}")) {
- print L sprintf("[%s] %s: %s\n", $ENV{REMOTE_ADDR}, $t, $msg);
- close L;
- }
-}
-
-exit 0;