On Sat, Jun 30, 2018 at 02:04:16PM -0400, Rob Pierce wrote:
> I recently committed a piece of BER code synchronizing in the wrong direction
> (i.e. from the ldap instances to the snmpd instance). sthen@ noticed a break
> in SNMPv3 authentication and reverted that part of the change. Thanks Stuart!
>
> I just fixed some typos in the snmpd regression test which prevented me from
> noticing the problem. I am also the author of those typos... arg.
>
> I believe the diff below synchronizes this piece of BER code in the right
> direction, from the snmpd instance to the ldap instances. I have done some
> testing against ldap and ldapd, but not ypldap. If anyone out there could
> perform further testing on and/or review the change to make sure it doesn't
> break anything that would be much appreciated.
>
> Thanks!
>
> Rob
>
> Index: usr.bin/ldap/ber.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/ldap/ber.c,v
> retrieving revision 1.6
> diff -u -p -r1.6 ber.c
> --- usr.bin/ldap/ber.c 29 Jun 2018 18:28:41 -0000 1.6
> +++ usr.bin/ldap/ber.c 30 Jun 2018 17:50:06 -0000
> @@ -1240,7 +1240,7 @@ ber_free(struct ber *b)
> static ssize_t
> ber_getc(struct ber *b, u_char *c)
> {
> - return ber_readbuf(b, c, 1);
> + return ber_read(b, c, 1);
> }
>
> static ssize_t
>
> Index: usr.sbin/ldapd/ber.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ldapd/ber.c,v
> retrieving revision 1.16
> diff -u -p -r1.16 ber.c
> --- usr.sbin/ldapd/ber.c 29 Jun 2018 18:28:42 -0000 1.16
> +++ usr.sbin/ldapd/ber.c 30 Jun 2018 17:50:06 -0000
> @@ -1240,7 +1240,7 @@ ber_free(struct ber *b)
> static ssize_t
> ber_getc(struct ber *b, u_char *c)
> {
> - return ber_readbuf(b, c, 1);
> + return ber_read(b, c, 1);
> }
>
> static ssize_t
>
> Index: usr.sbin/ypldap/ber.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ypldap/ber.c,v
> retrieving revision 1.18
> diff -u -p -r1.18 ber.c
> --- usr.sbin/ypldap/ber.c 29 Jun 2018 18:28:42 -0000 1.18
> +++ usr.sbin/ypldap/ber.c 30 Jun 2018 17:50:06 -0000
> @@ -1240,7 +1240,7 @@ ber_free(struct ber *b)
> static ssize_t
> ber_getc(struct ber *b, u_char *c)
> {
> - return ber_readbuf(b, c, 1);
> + return ber_read(b, c, 1);
> }
>
> static ssize_t
After further review and testing I am now looking for ok's on this.
Ok?