From owner-svn-src-head@freebsd.org Mon Jan 25 06:58:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D75FA450E4; Mon, 25 Jan 2016 06:58:43 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 01DBEE54; Mon, 25 Jan 2016 06:58:43 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-ob0-x22c.google.com with SMTP id zv1so7544425obb.2; Sun, 24 Jan 2016 22:58:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=2/hslY4Lv1WVqeE4ojQaNfI0D9ABCaHbl26faoBCjx8=; b=d+yeBLpCkmHd2mMdim4OrPNTLz7QRyxX6n0ng4jKKbToaVe5odFACqSMkzL10Dzdii I+hkFkaKi+j2wdPbONFOaocA8FRdRPdkv507JbtE2PPRqIbaNkBZgRKnhQ6QmHLYFZZ5 /rLTuoypB1UiEW9tkBTzuzUfjRiRaCLptHCgb9g/2AGlZFDGG7MDnOf6DOctWlJWbA8n N7A2qqXKCw2SDTgVvc8RnhEUyn9t7dS15JzGrPdBuclBgt/z9/pw9Kf0US4uH0vzLM3S pyK7c/Fwcm4qimO17EUx4n3sV3dZX+sLbixjWUbApLEGmm/WCSSS61brhyewLTWxrqkN 5xvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=2/hslY4Lv1WVqeE4ojQaNfI0D9ABCaHbl26faoBCjx8=; b=gCIMJv/VT2kY3exIIlk9t7lE1O4ik2C3CW0IDzgCKxHelQN0le69PgudGkwNq0SuPs liepvhp612wrAEeYvNsxi40pDZGCXNb+Zt3c9lBWUYT8kXFZThnaSC093oQYBRacLlQU cHz+5eXUANP2coRrT4w18sDpRKN/VLGRVDLb+VQ0evwt3zwMiH4GFsRyAD6YJAe4w+xH wUUBWe8GrX4RylTqRT9dBHB3r4Gwm1SDfXsy+D7f0Fj5vyihTWRSv1NUXUQI1JlzANhl UZozP2hWVj8aDv9uLLFkuXkpNLckfHk6NteKXQua/YuUHL/8IE9jraczBL1a867G8iMq O0kA== X-Gm-Message-State: AG10YOSOHIVy3itwesoL697URIDVlLLzDB6fJv2UZJLqEGgjcY4N/hky1ure/QPN5e0f3NI5vfVH0hzmCfP/MQ== MIME-Version: 1.0 X-Received: by 10.60.81.103 with SMTP id z7mr12276463oex.59.1453705122207; Sun, 24 Jan 2016 22:58:42 -0800 (PST) Received: by 10.182.40.194 with HTTP; Sun, 24 Jan 2016 22:58:42 -0800 (PST) Reply-To: araujo@FreeBSD.org In-Reply-To: References: <201601130149.u0D1nZmI053966@repo.freebsd.org> Date: Mon, 25 Jan 2016 14:58:42 +0800 Message-ID: Subject: Re: svn commit: r293801 - in head: . etc share/examples/ypldap usr.sbin/ypldap From: Marcelo Araujo To: Antoine Brodin Cc: "src-committers@freebsd.org" , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2016 06:58:43 -0000 Thanks to point it out! I have sent a patch for review and approve. Best, 2016-01-24 21:58 GMT+08:00 Antoine Brodin : > > On Jan 13, 2016 2:49 AM, "Marcelo Araujo" wrote: > > > > Author: araujo > > Date: Wed Jan 13 01:49:35 2016 > > New Revision: 293801 > > URL: https://svnweb.freebsd.org/changeset/base/293801 > > > > Log: > > 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 > > > > Hi, > > Uid 93 is already used in the ports tree by jabber. (/usr/ports/UIDs) > > Cheers, > > Antoine > > > Added: > > head/share/examples/ypldap/ > > head/share/examples/ypldap/ypldap.conf (contents, props changed) > > Modified: > > head/UPDATING > > head/etc/master.passwd > > head/usr.sbin/ypldap/yp.c > > head/usr.sbin/ypldap/ypldap.conf.5 > > > > Modified: head/UPDATING > > > ============================================================================== > > --- head/UPDATING Wed Jan 13 01:32:04 2016 (r293800) > > +++ head/UPDATING Wed Jan 13 01:49:35 2016 (r293801) > > @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 > > disable the most expensive debugging functionality run > > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > > > > +20160113: > > + With the addition of ypldap(8), a new _ypldap user is now > required > > + during installworld. "mergemaster -p" can be used to add the user > > + prior to installworld, as documented in the handbook. > > + > > 20151216: > > The tftp loader (pxeboot) now uses the option root-path > directive. As a > > consequence it no longer looks for a pxeboot.4th file on the tftp > > > > Modified: head/etc/master.passwd > > > ============================================================================== > > --- head/etc/master.passwd Wed Jan 13 01:32:04 2016 (r293800) > > +++ head/etc/master.passwd Wed Jan 13 01:49:35 2016 (r293801) > > @@ -22,5 +22,6 @@ uucp:*:66:66::0:0:UUCP pseudo-user:/var/ > > pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin > > auditdistd:*:78:77::0:0:Auditdistd unprivileged > user:/var/empty:/usr/sbin/nologin > > www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin > > +_ypldap:*:93:93::0:0:YP Ldap unprivileged > user:/var/empty:/usr/sbin/nologin > > hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin > > nobody:*:65534:65534::0:0:Unprivileged > user:/nonexistent:/usr/sbin/nologin > > > > Added: head/share/examples/ypldap/ypldap.conf > > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/share/examples/ypldap/ypldap.conf Wed Jan 13 01:49:35 > 2016 (r293801) > > @@ -0,0 +1,40 @@ > > +$FreeBSD$ > > +domain "freebsd.org" > > +interval 60 > > +provide map "passwd.byname" > > +provide map "passwd.byuid" > > +provide map "group.byname" > > +provide map "group.bygid" > > +provide map "netid.byname" > > + > > +directory "127.0.0.1" { > > + # directory options > > + binddn "cn=ldap,dc=freebsd,dc=org" > > + bindcred "secret" > > + basedn "dc=freebsd.,dc=org" > > + # starting point for groups directory search, default to basedn > > + groupdn "ou=Groups,dc=freebsd,dc=org" > > + > > + # passwd maps configuration (RFC 2307 posixAccount object class) > > + passwd filter "(objectClass=posixAccount)" > > + > > + attribute name maps to "uid" > > + fixed attribute passwd "*" > > + attribute uid maps to "uidNumber" > > + attribute gid maps to "gidNumber" > > + attribute gecos maps to "cn" > > + attribute home maps to "homeDirectory" > > + attribute shell maps to "loginShell" > > + fixed attribute change "0" > > + fixed attribute expire "0" > > + fixed attribute class "" > > + > > + # group maps configuration (RFC 2307 posixGroup object class) > > + group filter "(objectClass=posixGroup)" > > + > > + attribute groupname maps to "cn" > > + fixed attribute grouppasswd "*" > > + attribute groupgid maps to "gidNumber" > > + # memberUid returns multiple group members > > + list groupmembers maps to "memberUid" > > +} > > > > Modified: head/usr.sbin/ypldap/yp.c > > > ============================================================================== > > --- head/usr.sbin/ypldap/yp.c Wed Jan 13 01:32:04 2016 (r293800) > > +++ head/usr.sbin/ypldap/yp.c Wed Jan 13 01:49:35 2016 (r293801) > > @@ -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); > > > > Modified: head/usr.sbin/ypldap/ypldap.conf.5 > > > ============================================================================== > > --- head/usr.sbin/ypldap/ypldap.conf.5 Wed Jan 13 01:32:04 2016 > (r293800) > > +++ head/usr.sbin/ypldap/ypldap.conf.5 Wed Jan 13 01:49:35 2016 > (r293801) > > @@ -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 > > .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 , > > > -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_)