Fw: Re: make Net::LDAP::LDIF more similar to Net::LDAP #2

Hi, 
 
Am 09.06.2004 um 01:44 Uhr haben Sie geschrieben: 
> Extending Net::LDAP::Entry to update against LDIF and 
LDAP objects 
> could allow the changetype modifications to be to produced. 
>  
> This would be really useful to produce changetypes for 
entry objects by 
> updating against an LDIF object to produce the changetype 
LDIF required 
> up to synchronise entry objects. 
 
as Graham posted you can to that already now. 
Simply create your Net::LDAP::Entry object with the changes 
option set to TRUE. 
Having created the ::LDIF object that way you automatically 
get the changetype into any object written to the file. 
 
My intention is to provide an alternative to 
the ::LDIF->write() method by extending the 
::Entry->update() method, which in my intension shall 
create LDIF entries with changetype regardless of the 
value of the changes option in the ::LDIF object. 
 
Peter 



0
peter
6/9/2004 7:14:32 AM
perl.ldap 1268 articles. 0 followers. Follow

2 Replies
1167 Views

Similar Articles

[PageSpeed] 21
Get it on Google Play
Get it on Apple App Store

On 9 Jun 2004, at 08:14, peter.marschall@adpm.de wrote:
> My intention is to provide an alternative to
> the ::LDIF->write() method by extending the
> ::Entry->update() method, which in my intension shall
> create LDIF entries with changetype regardless of the
> value of the changes option in the ::LDIF object.

It is still not clear to me what you are proposing. Maybe a patch would 
make it clearer.

Graham.

0
gbarr
6/9/2004 8:31:15 AM
Hi Peter,

I have been trying to produce LDIF files with changetypes, but I can
only get "adds" to appear in the LDIF. I have been setting the
changetype to "modify", etc, but it will not produce any other
changetype other than "adds" in the LDIF . The reason is because the
operation will be called on "the client", and I presume this means the
LDAP object, not LDIF object, as implemented in the update method.

Basically, I want to override the value of the changetype, either by
automatically determining the correct changetype from an existing LDIF
though the update method (essentially by doing a ldifdiff), or but
manually setting the changetype (which I have attempted unsuccessfully).

Cheers, Sion.

peter.marschall@adpm.de wrote:

> Hi,
>
> Am 09.06.2004 um 01:44 Uhr haben Sie geschrieben:
> > Extending Net::LDAP::Entry to update against LDIF and
> LDAP objects
> > could allow the changetype modifications to be to produced.
> >
> > This would be really useful to produce changetypes for
> entry objects by
> > updating against an LDIF object to produce the changetype
> LDIF required
> > up to synchronise entry objects.
>
> as Graham posted you can to that already now.
> Simply create your Net::LDAP::Entry object with the changes
> option set to TRUE.
> Having created the ::LDIF object that way you automatically
> get the changetype into any object written to the file.
>
> My intention is to provide an alternative to
> the ::LDIF->write() method by extending the
> ::Entry->update() method, which in my intension shall
> create LDIF entries with changetype regardless of the
> value of the changes option in the ::LDIF object.
>
> Peter

0
sion
6/10/2004 1:15:47 AM
Reply:

Similar Artilces:

Fw: Re: make Net::LDAP::LDIF more similar to Net::LDAP
Am 08.06.2004 um 18:29 Uhr haben Sie geschrieben: > On 8 Jun 2004, at 16:56, peter@adpm.de wrote: > > I\'d like to start with a code() method that tries to mimic the >> Net::LDAP one and >I assume you mean better error handling ? My first goal is having a code() method in Net::LDAP::LDIF. > > I\'d like to extend the > > Net::LDAP::Entry->update() method so that it takes a > > Net::LDAP::LDIF object as an argument. The latter one > > requires a bit of work in Net::LDAP::LDIF to make it > > correct. > Not su...

make Net::LDAP::LDIF more similar to Net::LDAP
Hi Graham, hi Chris, hi list, I would like to rework Net::LDAP::LDIF a bit so that its API resembles that of Net::LDAP a bit more while still keeping the traditional API. The reason for this is that in application I often need to distinguish between Net::LDAP and Net::LDAP::LDIF because some methods are only implemented on one side. I\'d like to start with a code() method that tries to mimic the Net::LDAP one and I\'d like to extend the Net::LDAP::Entry->update() method so that it takes a Net::LDAP::LDIF object as an argument. The latter one requires a...

[Fwd: make Net::LDAP::LDIF more similar to Net::LDAP]
--------------95D5815B06BDC2BD1A0ABFEB Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit --------------95D5815B06BDC2BD1A0ABFEB Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mozilla-Status2: 00000000 Message-ID: <40C7B13E.8864E5A0@cs.adelaide.edu.au> Date: Thu, 10 Jun 2004 10:54:22 +1000 From: Sion Camilleri <sion@cs.adelaide.edu.au> Reply-To: sion@cs.adelaide.edu.au X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Graham Barr <gbarr@pobox.com>...

Net::LDAP and Net:LDAP::LDIF read & add problems #2
I'm trying to read in a simple LDIF file to add an entry to my LDAP server. Here is the basic routine (extraneous details omitted for brevity and security): $ldif = Net::LDAP::LDIF->new($tmp,"r",onerror => 'warn'); $entry = $ldif->ready_entry(); $ldap = Net::LDAP->new($LDAPSERVER); $result=$ldap->bind("$binddn",password=>"$bindpass",version=>"3"); $result=$ldap->add($entry); Now, everything seems to work until I get to the $ldap->add method. From that I get various versions of the following: obj...

Net::LDAP and Net:LDAP::LDIF read & add problems
I'm trying to read in a simple LDIF file to add an entry to my LDAP server. Here is the basic routine (extraneous details omitted for brevity and security): $ldif = Net::LDAP::LDIF->new($tmp,"r",onerror => 'warn'); $entry = $ldif->ready_entry(); $ldap = Net::LDAP->new($LDAPSERVER); $result=$ldap->bind("$binddn",password=>"$bindpass",version=>"3"); $result=$ldap->add($entry); Now, everything seems to work until I get to the $ldap->add method. From that I get various versions of the following: object...

Net:Net:Net::LDAP::FAQ
------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

Net::LDAP v0.28, bug in Net::LDAP::Constant, :all not supported
Net::LDAP::Constant no longer supports the :all tag in the export list due to the switch from Exporter to a manual export routine. So, while the following: perl -MNet::LDAP::Constant=:all -e 1 worked fine in 0.2701, it now dies with the error: ":all" is not exported by the Net::LDAP::Constant module at -e line 0 Can't continue after import errors at -e line 0 BEGIN failed--compilation aborted, <DATA> line 197. The documentation for Net::LDAP::Constant still documents the ':all' tag. I am not subscribed to the list, so if some...

RE: Using Net::LDAPS #2
------_=_NextPart_001_01C389D6.D6C605BE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am on Unix (Solaris 2.8). When I add the "-w" and the "use strict" I = get one additional error message. IO::Socket::SSL: at /usr/perl5/site_perl/5.005/Net/LDAPS.pm line 20 IO::Socket::SSL: at ./ldaps.pl line 6. Line 20 of LDAPS.pm is the $ldap->{'net_ldap_socket'} =3D = IO::Socket::SSL->new command. I can connect if I use "new Net::LDAP" instead of "new Net::LDAPS", but = I a...

Net::LDAP::LDIF re-correction
--Apple-Mail-3--281482799 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Hi! It seems, the problem is in my perl-experience.. I generated an =20 another, bigger bug with my change, the trailing '\n'-s of lines =20 wasn't removed.. So those lines wasn't equivalent at all :( I'm attaching a diff of my changes, which now works fine for me.. I hope, these changes do solve the problem with memory-files. Regards, Gergely PS: I know, I should post this to mailing-list, but as I mentioned in...

Net::LDAP based LDAP server available?
Hi, has anybody tried to build an LDAP server based on Net::LDAP or Convert::ASN1 yet? Thanks for any hint. Enrik ...

Net::LDAP & LDAP Decoding Error
--mvpLiMfbWzRoNl4x Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello! I have a question about an LDAP query with Net::LDAP. I send queries to an OpenLDAP server (version 2.2.24). The queries are very simple and intended to detect already existing user entries. The code that prepares and sends the query looks like this: $filter =3D "(uid=3D".$username.")"; $filterobj =3D Net::LDAP::Filter->new($filter); $lres =3D $ldap->search( base =3D> $base, s...

Net::LDAPS and Net::SSLeay
------_=_NextPart_001_01C3EF1A.51A96530 Content-Type: text/plain Hello all: I am trying to use Net::LDAPS within a perl program in order to establish a secure socket connection with my ldap server. My program works fine if i use the bind function from Net::LDAP module. However, when I changed my source code to use the bind function from Net::LDAPS, my program failed because it complained about the need for IO::Socket::SSL module. Then, when i started to run make for IO::Socket::SSL, it complained about the need for Net::SSLeay. The compilation for Net::SSLeay versio...

Subject: Re: HowTo retrieve a userCertificate;binary from ldif file using Net::LDAP::LDIF
------_=_NextPart_001_01C5F690.E3DCB4B6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Chris thanks for the reply. =20 =20 >On 1/12/05 1:06, Rion, Bob <Bob_Rion[at]csgsystems.com> wrote: >=20 >> Hello >>=20 >> =20 >>=20 >> =20 >>=20 >> I am trying to extract a userCertificate;binary object from an ldif file >> using Net::LDAP::LDIF and even in this trivial example the [at]entries is >> not populated, the other objects and attributes are? >>=20 >...

Re: Net::LDAP performance problems #2
Hello, I have been using Net::LDAPS successfully on a project to create a web interface to an internal LDAP employee directory. The site is in an Apache mod-perl environment, with one web page view potentially causing several LDAP searches. (If more than one record is returned, I show a list to pick from. But if exactly one record is found, I do further queries to display that person's peers, direct reports, and management hierarchy on the same page.) If several calls are done for one web page display, I re-use the same connection, which saves lots of setup overhe...