Authen::SASL::Perl

2003-12-08 Thread Pat Monardo
I was able to get SASL DIGEST-MD5 to work by fixing two bugs:
1. qop should not be in your list of quoted values.
2. qop needs to be One of the values listed in the challenge. I hacked to simply set 
it to 'auth'
and then it worked.



Re: Fwd: ldap search filter problem

2003-12-08 Thread Jim Harle
Sharib,
  The only thing I see wrong with your query is the use of 's in #2 and you may
not have meant that literally since it wouldn't work with | either. This is, a
filter of (&(sn=Jones)(givenname=Bob)) is correct, but
(&(Sn='Jones')(givenname='Bob')) is most likely wrong since you realy don't
want 's in your directory entries.  If you didn't mean the 's, then you have
done something else wrong, which can't be detected from your message.  Try
using a filter in another tool like ldapsearch, the copying that and pasting it
into your perl code.  The reverse might not work because Net::LDAP is more
forgiving about missing outer ()s than ldapsearch.

  --Jim Harle

On Fri, 5 Dec 2003, Graham Barr wrote:

> Begin forwarded message:
> > From: [EMAIL PROTECTED]
> > Date: 5 December 2003 22:23:49 GMT
> > To: [EMAIL PROTECTED]
> > Subject: ldap search filter problem
> > Message-Id: <[EMAIL PROTECTED]>
> >
> > Hi,
> >
> > I am having trouble doing a existing filter search on my LDAP
> > directory.
> > My LDAP directory is openLDAP v3 server. I am using the Net:::LDAP API
> > for
> > my querires. I cant do a search with a filter like
> >
> > 1. (attr=*)
> > 2.( &( attr='value')(attr1='value1'))
> > The search number 2 runs perfectly if the & is replaced by |
> >
> > Can you exaplin why this is happening
> >
> > Sincerely,
> > Sharib khan
> >
>



Net::LDAP sorting

2003-12-08 Thread CZachary
Hello,

Could anyone tell me if there is a way to perform a sorted of entries 
returned from a search in Net::LDAP?   If yes, how would I do this?


Thanks,
newbie

Re: Net::LDAP sorting

2003-12-08 Thread Chris Ridd
On 8/12/03 5:04 pm, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> Could anyone tell me if there is a way to perform a sorted of entries
> returned from a search in Net::LDAP?   If yes, how would I do this?

Yes. The Net::LDAP::Search class has a sorted() method that may do what you
want. It only does a crude lexical sort, so you'll need to do some more work
if you want to sort values in different languages and contexts correctly.

$res = $ldap->search(...);

die "Search failed", $res->error_name, "\n" if $res->code;
# sort by sn first, then modifyTimestamp.
my (@sorted) = $res->sorted('sn','modifyTimestamp');

Cheers,

Chris