Re: Net::LDAP and contextCSN

Christian <[email protected]> Tue, 16 Jul 2019 09:15:58 +0200
Newsgroups gmane.comp.lang.perl.modules.ldap
Message-ID <[email protected]>
--PJyGH9bvHmsrrt2H5BtLUsqnk9SKII2Ht
Content-Type: multipart/mixed; boundary="KsBitxyPEqK8O08niC0gPMQRH80gG04P8";
 protected-headers="v1"
From: Christian <[email protected]>
To: [email protected]
Message-ID: <[email protected]>
Subject: Re: Net::LDAP and contextCSN
References: <[email protected]>
 <[email protected]>
In-Reply-To: <[email protected]>

--KsBitxyPEqK8O08niC0gPMQRH80gG04P8
Content-Type: text/plain; charset=utf-8
Content-Language: de-DE
Content-Transfer-Encoding: quoted-printable

Hello Strat,

thank you for your reply.

Am 15.07.19 um 23:46 schrieb Martin Fabiani-Reher:
> Hello Christian,
>=20
> I don't know the exact syntax for ldapsearch because I haven't used it
> for ages.
>=20
> filter =3D> '*' indeed is no valid filter.=C2=A0 It is a bit like tryin=
g an SQL
> command like SELECT contextCSN FROM $table WHERE *
>=20
> If I remember correctly, you either need to omit the filter:
Now I know omitting is not correct and will result in 'Bad Filter' ...


> or set on which attribute you search for:
>=20
> $search =3D $ldap->search(
>     base   =3D> $BaseDn,
>     scope  =3D> 'base',
>     filter =3D> '(contextCSN=3D*)',
>     attrs  =3D> [ 'contextCSN'],
> );
This works and in combination with Dales simple Example I got it running
and getting the wanted results. :-)


>=20
> BTW: it's better to copy&paste code, because the code you gave in your
> call for help will never compile, see the red annotations in your code
> example.
I fully agree, but at that moment I wasn't able to copy&paste ...
hence the typos.

I just wanted to show up the 'filter' problem.
I need to define a valid filter:
filter =3D> '(objectClass=3D*)',
or
filter =3D> '(contextCSN=3D*)',

both work.
Regards

--=20

Christian
------------------------------------------------------------
   https://join.worldcommunitygrid.org?recruiterId=3D177038
------------------------------------------------------------
           http://www.sc24.de - Sportbekleidung
------------------------------------------------------------


--KsBitxyPEqK8O08niC0gPMQRH80gG04P8--

--PJyGH9bvHmsrrt2H5BtLUsqnk9SKII2Ht
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEThvTI4MzF/bFZJIZlrSBLH1fdAkFAl0tebEACgkQlrSBLH1f
dAk40Af/VLjvj6zefnekhDAiKYrQdm89U4Mq7FJQeeaYARwwGNDchnyPvjEWk1Tm
iQxmQdDVtqloysdZZ32pRJiWOAI9IEcGOiSdtA01XrSmaRbiVnrOh4LsJ/QdcPD/
bMEArHyFKN/FK+tFgJtImQLsQldhw2XSyvGuydytQ/8RnbGp1lavyHZh4Bj9xHEK
jT1lJ+B9VGE1DcX03d1ADSEI5nggEVs056rMaVYTN/eQGdTtd/Mmo3iwrInycMqg
kbdu8PFAx3RdM2o0kkTc7kllr94wmULWvXRmqirnXQw8bj41DIEh4I1pn8bdRq9m
+PHQxTUsHiE25vyRLPX3mdE1DmEPUA==
=BJC/
-----END PGP SIGNATURE-----

--PJyGH9bvHmsrrt2H5BtLUsqnk9SKII2Ht--