*** empty log message ***

This commit is contained in:
leif 1998-07-29 09:01:12 +00:00
parent 3aadc360b3
commit 49eb2981e0
4 changed files with 41 additions and 6 deletions

View File

@ -1,3 +1,26 @@
1998-07-29 Leif Hedstrom <leif@netscape.com>
* Conn.pm (new): Added support for passing a hash array of all the
parameters, as returned by the ldapArgs() function.
* Utils.pm (str2Scope): New function, for converting strings
(subtree) to a numerical scope value (2).
(askPassword): Dito, ask for a password, interactively.
(ldapArgs): Dito, handle common LDAP command line arguments.
* Makefile.PL: Minor change, to do regex match on OS version for
MSWin.
* Entry.pm: Changed all _XXX hash values to also end with a _,
hence making it easier to isolate them (/^_.*_$/).
* Conn.pm (nextEntry): Changed to accept that the attributes are
now arrays, not pointers to arrays. We still consider them as
pointers internally though, it's cleaner API.
* API.pm: Changed to use the native Exporter function to export
tags into EXPORT_OK.
1998-07-22 Leif Hedstrom <leif@netscape.com>
* LDIF.pm (readEntry): Moved from my LdapUtils.pm package.

View File

@ -16,3 +16,4 @@ test_api/search.pl
test_api/write.pl
test_api/api.pl
examples/lfinger.pl
examples/qsearch.pl

View File

@ -0,0 +1,4 @@
1998-07-29 Leif Hedstrom <leif@netscape.com>
* qsearch.pl: First working version.

View File

@ -1,6 +1,6 @@
#!/usr/bin/perl5
#############################################################################
# $Id: lfinger.pl,v 1.7 1998/07/29 08:36:45 leif Exp $
# $Id: lfinger.pl,v 1.8 1998/07/29 08:59:05 leif Exp $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
@ -38,7 +38,7 @@ use Mozilla::LDAP::Utils; # LULU, utilities.
# effectively with appropriate ACI/ACLs.
#
$APPNAM = "lfinger";
$USAGE = "$APPNAM [-nv] -b base -h host -D bind -w pswd -P cert user_info";
$USAGE = "$APPNAM -m -b base -h host -D bind -w pswd -P cert user_info";
@ATTRIBUTES = ("uid", "cn", "homedirectory", "loginshell", "pager",
"telephonenumber", "facsimiletelephonenumber", "mobile");
@ -84,7 +84,7 @@ sub printIt
#############################################################################
# Check arguments, and configure some parameters accordingly..
#
if (!getopts('nvb:h:D:p:w:P:') || !defined($ARGV[$[]))
if (!getopts('mb:h:D:p:w:P:') || !defined($ARGV[$[]))
{
print "usage: $APPNAM $USAGE\n";
exit;
@ -96,15 +96,22 @@ $user=$ARGV[$[];
#############################################################################
# Instantiate an LDAP object, which also binds to the LDAP server.
#
$conn = new Mozilla::LDAP::Conn($ld{host}, $ld{port}, $ld{bind},
$ld{pswd}, $ld{cert});
$conn = new Mozilla::LDAP::Conn(\%ld);
die "Could't connect to LDAP server $ld{host}" unless $conn;
#############################################################################
# Ok, lets generate the filter, and do the search!
#
$search = "(&(|(cn=*$user*)(uid=*$user*)(telephonenumber=*$user*))(!$HIDE))";
if ($opt_m)
{
$search = "(&(uid=$user)(!$HIDE))";
}
else
{
$search = "(&(|(cn=*$user*)(uid=*$user*)(telephonenumber=*$user*))(!$HIDE))";
}
$entry = $conn->search($ld{root}, "subtree", $search, 0, @ATTRIBUTES);
while($entry)
{