History log of /freebsd/usr.sbin/ypldap/ber.c (Results 1 – 13 of 13)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# 2a63c3be 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0
# bb1d0df5 29-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357179 through r357269.


# 446bb222 29-Jan-2020 Conrad Meyer <cem@FreeBSD.org>

ypldap(8): Fix absent va_end() in 'goto fail' path

In this path, we used va_start() without pairing it with va_end(). Add the
va_end(). (va_start() without paired va_end() is undefined behavior pe

ypldap(8): Fix absent va_end() in 'goto fail' path

In this path, we used va_start() without pairing it with va_end(). Add the
va_end(). (va_start() without paired va_end() is undefined behavior per the C
standard.)

"In many implementations, [va_end] is a do-nothing operation; but those
implementations that need it probably need it badly." - Rationale for the ANSI
C Programming Language, § 4.8.1.3.

Reported by: Coverity
CID: 1340539

show more ...


Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0
# 9d80a8b0 25-May-2016 Don Lewis <truckman@FreeBSD.org>

Fix Coverity CIDs 1340544 Resource leak and 1340543 Use after free

At line 479 of ldapclient.c in client_build_req(), the error return
leaks ldap_attrs (CID 1340544). It looks like this can happen

Fix Coverity CIDs 1340544 Resource leak and 1340543 Use after free

At line 479 of ldapclient.c in client_build_req(), the error return
leaks ldap_attrs (CID 1340544). It looks like this can happen if
the first utoa() call in aldap_get_stringset() fails. It looks
like other leaks can happen if other utoa() calls fail since scanning
this array when it is freed stops when the first NULL is encountered.
Fix these problems by not storing NULL in the array when utoa()
fails, and by freeing ret and returning NULL if nothing is stored
in the array. That way the caller will never see the
ldap_attrs[0] == NULL case, so delete that check.

The ber_printf_element() calls ber_free_elements() on its ber
argument and returns NULL on failure. When each of its callers
detects failure, they do a goto fail, which then calls ber_free_elements()
with the same pointer (CID 1340543). Fix is to delete the
ber_free_elements() from ber_printf_element()

Reported by: Coverity
CID: 1340543, 1340544
Reviewed by: araujo
Differential Revision: https://reviews.freebsd.org/D6550

show more ...


# a5f63746 13-May-2016 Don Lewis <truckman@FreeBSD.org>

Avoid indexing an array with a negative value.

Reported by: Coverity
CID: 971121


# 9c831bbd 13-Apr-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# 0e356242 13-Apr-2016 Marcelo Araujo <araujo@FreeBSD.org>

Apply revisions 1.4 and 1.5 from ldapd's ber.c to ypldap's copy, so it can
deal with messages that haven't been fully read from the server yet.

Obtained from: OpenBSD r1.11


Revision tags: release/10.3.0
# b626f5a7 04-Jan-2016 Glen Barber <gjb@FreeBSD.org>

MFH r289384-r293170

Sponsored by: The FreeBSD Foundation


# 9a7cd2e6 22-Dec-2015 Bjoern A. Zeeb <bz@FreeBSD.org>

MFH @r292599

This includes the pluggable TCP framework and other chnages to the
netstack to track for VNET stability.

Security: The FreeBSD Foundation


# 474fa6a7 15-Dec-2015 Marcelo Araujo <araujo@FreeBSD.org>

Remove wrong header and the NULL check before free().

Approved by: bapt (mentor)
Obtained from: OpenBSD
Differential Revision: https://reviews.freebsd.org/D4548


# a5d8944a 19-Nov-2015 Navdeep Parhar <np@FreeBSD.org>

Catch up with head (r291075).


# 28b524fb 16-Nov-2015 Craig Rodrigues <rodrigc@FreeBSD.org>

Add include of <string.h> for strlen() prototype.


# 9e7c127f 16-Nov-2015 Craig Rodrigues <rodrigc@FreeBSD.org>

Import ypldap from OpenBSD.

ypldap -- Intended to be a drop-in replacement for ypserv, gluing in a
LDAP directory and thus providing support for users and groups stored in
LDAP for the get{pw,gr}ent

Import ypldap from OpenBSD.

ypldap -- Intended to be a drop-in replacement for ypserv, gluing in a
LDAP directory and thus providing support for users and groups stored in
LDAP for the get{pw,gr}ent family of functions.

show more ...