aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ypldap
Commit message (Collapse)AuthorAgeFilesLines
* ypldap(8): Fix grammar in ypldap.cShi-Xin Huang2024-02-131-1/+1
| | | | | Event: Advanced UNIX Programming Course (Fall’23) at NTHU. Pull Request: https://github.com/freebsd/freebsd-src/pull/991
* Trim various $FreeBSD$John Baldwin2023-10-101-1/+0
| | | | | | Approved by: markj (cddl/contrib changes) Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41961
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-1611-11/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* ypldap: Remove set but unused variables.John Baldwin2023-06-203-10/+2
| | | | Some of these were reported by GCC, others reported by clang.
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-2/+1
|
* ypldap: Fix mismatch in array bounds for ldapclient().John Baldwin2022-10-031-1/+1
| | | | | | Reviewed by: emaste Reported by: GCC -Warray-parameter Differential Revision: https://reviews.freebsd.org/D36807
* pkgbase: Put yellow pages programs to its own packageEmmanuel Vadot2021-12-211-0/+1
| | | | | | | | | YP is less and less used, split them to users have the choice to not install them. MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33441
* Only set WARNS if not definedKyle Evans2020-09-111-1/+1
| | | | | | | | | | | | | This would allow interested parties to do experimental runs with an environment set appropriately to raise all the warnings throughout the build; e.g. env WARNS=6 NO_WERROR=yes buildworld. Not currently touching the numerous instances in ^/tools. MFC after: 1 week Notes: svn path=/head/; revision=365631
* rename in-tree libevent v1 to libevent1Ed Maste2020-05-281-1/+1
| | | | | | | | | | | | | | | | r316063 installed pf's embedded libevent as a private lib, with headers in /usr/include/private/event. Unfortunately we also have a copy of libevent v2 included in ntp, which needed to be updated for compatibility with OpenSSL 1.1. As unadorned 'libevent' generally refers to libevent v2, be explicit that this one is libevent v1. Reviewed by: vangyzen (earlier) Differential Revision: https://reviews.freebsd.org/D17275 Notes: svn path=/head/; revision=361607
* yp*: fix -fno-common buildKyle Evans2020-04-062-2/+5
| | | | | | | | | | | | | | | | | This is mostly two problems spread out far and wide: - ypldap_process should be declared properly - debug is defined differently in many programs For the latter, just extern it and define it everywhere that actually needs it. This mostly works out nicely for ^/libexec/ypxfr, which can remove the assignment at the beginning of main in favor of defining it properly. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days Notes: svn path=/head/; revision=359677
* Correct path in EXAMPLES ypldap.conf.5Sergio Carlavilla Delgado2020-03-241-2/+2
| | | | | | | | | | | | PR: 244743 Submitted by: alex@i.org.ua Patch by: alex@i.org.ua Approved by: bcr@(mentor), 0mp MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D24144 Notes: svn path=/head/; revision=359282
* ypldap(8): Fix absent va_end() in 'goto fail' pathConrad Meyer2020-01-291-0/+1
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=357249
* Increase YPMAXRECORD to 16M to be compatible with Linux.Konstantin Belousov2019-08-121-20/+38
| | | | | | | | | | | | | | | | | | | | | | | Since YP protocol definition uses the constant to declare variable-size opaque byte strings, the change should be binary compatible with existing installations which do not expose keys or values larger than 1024 bytes. All uses of local variables with YPMAXRECORD sizes were removed to avoid insane stack use. On the other hand, variables with static lifetime should be fine and only result in increased VA use. Glibc made same change, increasing the allowed length for keys and values in YP to 16M, in 2013. Reviewed by: markj Discussed with: ian Sponsored by: Mellanox Technologies MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D20900 Notes: svn path=/head/; revision=350957
* 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