aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ypldap
Commit message (Collapse)AuthorAgeFilesLines
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Log when we have finished pushing users and groups.Marcelo Araujo2017-08-011-0/+2
| | | | | | | | Obtained from: OpenBSD (rev 1.4) MFC after: 3 weeks. Notes: svn path=/head/; revision=321846
* Simplify parseval() by allocating a buffer the size of the input string,Marcelo Araujo2017-05-261-17/+6
| | | | | | | | | which will always be big enough to hold the output string. Obtained from: OpenBSD (revision 1.36) Notes: svn path=/head/; revision=318915
* Use SRCTOP-relative paths to other directories instead of .CURDIR-relative onesEnji Cooper2017-03-011-2/+2
| | | | | | | | | | This simplifies pathing in make/displayed output. MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314460
* Use memset(3) instead of bzero(3).Marcelo Araujo2016-12-024-13/+13
| | | | | | | Obtained from: OpenBSD (r1.12, r1.20, r1.18 and r1.37) Notes: svn path=/head/; revision=309393
* String terminators are called NUL, not NULL, also the variableMarcelo Araujo2016-12-021-1/+1
| | | | | | | | | mentioned in the comment is p and not u. Obtained from: OpenBSD (r1.34) Notes: svn path=/head/; revision=309392
* DIRDEPS_BUILD: Update dependencies after a 'make bootstrap-tools'.Bryan Drewery2016-09-021-0/+1
| | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=305303
* DIRDEPS_BUILD: Add some missing dirctories to the build.Bryan Drewery2016-08-311-0/+25
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=305148
* Do not allow whitespace in macro names.Marcelo Araujo2016-07-111-0/+8
| | | | | | | Obtained from: OpenBSD (r1.19). Notes: svn path=/head/; revision=302535
* Bump date in both manpages.Marcelo Araujo2016-06-071-1/+1
| | | | | | | Reported by: rodrigc Notes: svn path=/head/; revision=301541
* Add an entry on rc.conf(5) explaining the new optionsMarcelo Araujo2016-06-071-1/+3
| | | | | | | | | | | | | nis_ypldap_enable and nis_ypldap_flags. Also add an entry on ypldap(8) that it is a feature ready and appears on FreeBSD 11.0. Requested by: rodrigc Relnotes: Yes Notes: svn path=/head/; revision=301536
* Fix Coverity CIDs 1340544 Resource leak and 1340543 Use after freeDon Lewis2016-05-253-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=300639
* Simplify overengineered and buggy code that looked like as if it didMarcelo Araujo2016-05-161-29/+18
| | | | | | | | | | | some kind of UTF-8 validation, but actually didn't, but instead, for malformed UTF-8 input, caused buffer overruns in some cases and caused skipping of valid ASCII characters in other cases. Obtained from: OpenBSD (cvs 1.32) Notes: svn path=/head/; revision=299887
* When a group contains a non-existent user, make the warningMarcelo Araujo2016-05-161-3/+2
| | | | | | | | | message more helpful by mentioning the group name. Obtained from: OpenBSD (cvs 1.19) Notes: svn path=/head/; revision=299884
* Avoid indexing an array with a negative value.Don Lewis2016-05-131-1/+1
| | | | | | | | Reported by: Coverity CID: 971121 Notes: svn path=/head/; revision=299583
* Use nitems instead of 'sizeof(mapnames) / sizeof(mapnames[0]'.Marcelo Araujo2016-04-181-2/+2
| | | | Notes: svn path=/head/; revision=298177
* Convert ypldap_addr list to a tailq(queue(3)).Marcelo Araujo2016-04-133-39/+26
| | | | | | | Obtained from: OpenBSD r1.11, r1.17 and r1.36 Notes: svn path=/head/; revision=297907
* Apply revisions 1.4 and 1.5 from ldapd's ber.c to ypldap's copy, so it canMarcelo Araujo2016-04-131-0/+9
| | | | | | | | | deal with messages that haven't been fully read from the server yet. Obtained from: OpenBSD r1.11 Notes: svn path=/head/; revision=297903
* Set argument encode/result decode call backs for 'maplist' and 'all'.Marcelo Araujo2016-03-041-0/+4
| | | | | | | | | Note: Listing a map is still not fully implemented. Obtained from: OpenBSD (r1.16, r1.17) Notes: svn path=/head/; revision=296377
* Implement the 'master' request.Marcelo Araujo2016-03-041-1/+10
| | | | | | | Obtained from: OpenBSD (r1.15) Notes: svn path=/head/; revision=296376
* Switch from FD_SETSIZE to getdtablesize(2) as it can make the FD to beMarcelo Araujo2016-01-221-9/+6
| | | | | | | | | | | | tunable. Also it gets more close with the original implementation from OpenBSD. Requested by: rodrigc Approved by: rodrigc (mentor) Differential Revision: https://reviews.freebsd.org/D4970 Notes: svn path=/head/; revision=294543
* ypldap(8) is a feature ready to be used to translate nis(8) database to ldap(3).Marcelo Araujo2016-01-132-3/+6
| | | | | | | | | | | | | | | | | | This commit, fix a core dump on ypldap(8) related with memory allocation. Also an example of how to set the ypldap.conf(5) properly is added to examples files. A new user _ypldap is required to be able to run ypldap(8) as well as in a chroot mode. Reviewed by: rodrigc (mentor), bjk Approved by: bapt (mentor) Relnotes: Yes Sponsored by: gandi.net Differential Revision: https://reviews.freebsd.org/D4744 Notes: svn path=/head/; revision=293801
* Remove a garbage printf used for debug.Marcelo Araujo2015-12-151-3/+1
| | | | | | | Approved by: bapt (mentor implicit) Notes: svn path=/head/; revision=292273
* Remove the null checker before free.Marcelo Araujo2015-12-151-2/+1
| | | | | | | | | Approved by: bapt (mentor) Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D4549 Notes: svn path=/head/; revision=292272
* Remove wrong header and the NULL check before free().Marcelo Araujo2015-12-151-3/+1
| | | | | | | | | Approved by: bapt (mentor) Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D4548 Notes: svn path=/head/; revision=292271
* EAGAIN handling for imsg_read.Marcelo Araujo2015-12-153-5/+7
| | | | | | | | | Approved by: bapt (mentor) Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D4547 Notes: svn path=/head/; revision=292270
* Add include of signal.h for signal() prototype.Craig Rodrigues2015-11-161-0/+1
| | | | Notes: svn path=/head/; revision=290942
* Replace __svc_fdset with svc_fdset.Craig Rodrigues2015-11-161-5/+4
| | | | | | | FreeBSD lacks __svc_fdset and __svc_fdsetsize. Notes: svn path=/head/; revision=290941
* Do not use SA_LEN() to dereference sa_len.Craig Rodrigues2015-11-161-2/+2
| | | | | | | FreeBSD lacks the SA_LEN() macro. Notes: svn path=/head/; revision=290940
* Add include of time.h for tzset() prototype.Craig Rodrigues2015-11-161-0/+1
| | | | Notes: svn path=/head/; revision=290939
* Replace __dead with __dead2.Craig Rodrigues2015-11-162-3/+3
| | | | | | | FreeBSD lacks __dead. Notes: svn path=/head/; revision=290938
* Add include of sys/param.h for MAXHOSTNAMELENCraig Rodrigues2015-11-165-0/+5
| | | | Notes: svn path=/head/; revision=290937
* Replace __dead with __dead2.Craig Rodrigues2015-11-161-2/+2
| | | | | | | FreeBSD lacks __dead. Notes: svn path=/head/; revision=290936
* Replace HOST_NAME_MAX with MAXHOSTNAMELEN.Craig Rodrigues2015-11-161-2/+2
| | | | | | | FreeBSD lacks HOST_NAME_MAX. Notes: svn path=/head/; revision=290935
* Remove reference to EAI_NODATA.Craig Rodrigues2015-11-161-1/+1
| | | | | | | It does not exist on FreeBSD. Notes: svn path=/head/; revision=290934
* Add include of <string.h> for strlen() prototype.Craig Rodrigues2015-11-161-0/+1
| | | | Notes: svn path=/head/; revision=290933
* Convert Makefile to FreeBSD style.Craig Rodrigues2015-11-161-8/+7
| | | | | | | Add libopenbsd to link line for imsg. Notes: svn path=/head/; revision=290932
* Import ypldap from OpenBSD.Craig Rodrigues2015-11-1615-0/+6789
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. Notes: svn path=/head/; revision=290931