summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2016-01-13 01:49:35 +0000
committeraraujo <araujo@FreeBSD.org>2016-01-13 01:49:35 +0000
commit195a2554c476f28c6a09292226cf17726da0590d (patch)
tree68f6cec7758d8fe7d16823a9051823dad578b454 /usr.sbin
parent6647e6bbb4970f93e1fd9409236a754a507a6fc7 (diff)
downloadFreeBSD-src-195a2554c476f28c6a09292226cf17726da0590d.zip
FreeBSD-src-195a2554c476f28c6a09292226cf17726da0590d.tar.gz
ypldap(8) is a feature ready to be used to translate nis(8) database to ldap(3).
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
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ypldap/yp.c4
-rw-r--r--usr.sbin/ypldap/ypldap.conf.55
2 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/ypldap/yp.c b/usr.sbin/ypldap/yp.c
index e461136..3676245 100644
--- a/usr.sbin/ypldap/yp.c
+++ b/usr.sbin/ypldap/yp.c
@@ -83,10 +83,10 @@ void
yp_enable_events(void)
{
int i;
- extern fd_set svc_fdset;
+ extern fd_set svc_fdset;
struct yp_event *ye;
- for (i = 0; i < getdtablesize(); i++) {
+ for (i = 0; i < FD_SETSIZE; i++) {
if (FD_ISSET(i, &svc_fdset)) {
if ((ye = calloc(1, sizeof(*ye))) == NULL)
fatal(NULL);
diff --git a/usr.sbin/ypldap/ypldap.conf.5 b/usr.sbin/ypldap/ypldap.conf.5
index 5c22b3b..5c936a9 100644
--- a/usr.sbin/ypldap/ypldap.conf.5
+++ b/usr.sbin/ypldap/ypldap.conf.5
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: April 30 2012 $
+.Dd $Mdocdate: January 13 2016 $
.Dt YPLDAP.CONF 5
.Os
.Sh NAME
@@ -155,6 +155,9 @@ Use the supplied LDAP filter to retrieve password entries.
.It Pa /etc/ypldap.conf
.Xr ypldap 8
configuration file.
+.It Pa /usr/share/example/ypldap/ypldap.conf
+.Xr ypldap 8
+configuration file example.
.El
.Sh SEE ALSO
.Xr ypbind 8 ,
OpenPOWER on IntegriCloud