Bug 88460

Summary: Import /usr/bin/getent from NetBSD
Product: Base System Reporter: Dan Nelson <dnelson>
Component: binAssignee: Maxim Konovalov <maxim>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.4-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
file.shar none

Description Dan Nelson 2005-11-03 17:20:12 UTC
	

I miss the getent command, which is available in a lot of other OSes.
This is NetBSD's version, which builds cleanly with only some include
changes.

Fix: Included are the diffs from NetBSD's sources, plus a shar of the
resulting files.
Comment 1 Julien Gabel 2005-11-03 19:25:55 UTC
>>Number:         88460
>>Category:       bin
>>Synopsis:       Import /usr/bin/getent from NetBSD
>>Confidential:   no
>>Severity:       non-critical
>>Priority:       low
>>Responsible:    freebsd-bugs
>>State:          open
>>Quarter:
>>Keywords:
>>Date-Required:
>>Class:          change-request
>>Submitter-Id:   current-users
>>Arrival-Date:   Thu Nov 03 17:20:12 GMT 2005
>>Closed-Date:
>>Last-Modified:
>>Originator:     Dan Nelson
>>Release:        FreeBSD 5.4-STABLE i386
>>Organization:
> The Allant Group
>>Environment:
> System: FreeBSD dan.emsphone.com 5.4-STABLE FreeBSD 5.4-STABLE #415: Wed
> Oct 26 12:24:22 CDT 2005
> zsh@dan.emsphone.com:/usr/src/sys/i386/compile/DANSMP i386
>
>>Description:
>
> I miss the getent command, which is available in a lot of other OSes.
> This is NetBSD's version, which builds cleanly with only some include
> changes.

Yes, i vote for this one!  Since you provide a patch, i just want to say
that if the `getent' command finally reach the FreeBSD tree, my old PR
bin/79903 requesting this particular inclusion (but without a patch) may
be closed too.  FYI, the proposed modifications seems ok on both RELENG_6
and -CURRENT machines (tested in a local[1] environment).  Thank you very
much, Dan.

-- 
-jpeg.
[1] i.e. without a NIS or LDAP respositories.  Can do the test tomorrow
though, if someone is interested.
Comment 2 Dan Nelson 2005-11-03 19:59:31 UTC
In the last episode (Nov 03), Julien Gabel said:
> Yes, i vote for this one!  Since you provide a patch, i just want to
> say that if the `getent' command finally reach the FreeBSD tree, my
> old PR bin/79903 requesting this particular inclusion (but without a
> patch) may be closed too.  FYI, the proposed modifications seems ok
> on both RELENG_6 and -CURRENT machines (tested in a local[1]
> environment).  Thank you very much, Dan.

I only verified that it works with both NIS and LDAP on 5.4 systems,
but I would be surprised if there were any problems on other versions.
It uses standard lookup functions.

-- 
	Dan Nelson
	dnelson@allantgroup.com
Comment 3 Julien Gabel 2005-11-04 16:59:31 UTC
> The following reply was made to PR bin/88460; it has been noted by GNATS.
>
> From: Dan Nelson <dnelson@allantgroup.com>
> To: Julien Gabel <jpeg@thilelli.net>
> Cc: freebsd-gnats-submit@freebsd.org
> Subject: Re: bin/88460: Import /usr/bin/getent from NetBSD.
> Date: Thu, 3 Nov 2005 13:59:31 -0600

> In the last episode (Nov 03), Julien Gabel said:
>> Yes, i vote for this one!  Since you provide a patch, i just want to
>> say that if the `getent' command finally reach the FreeBSD tree, my
>> old PR bin/79903 requesting this particular inclusion (but without a
> patch) may be closed too.  FYI, the proposed modifications seems ok
>> on both RELENG_6 and -CURRENT machines (tested in a local[1]
>> environment).  Thank you very much, Dan.

>  I only verified that it works with both NIS and LDAP on 5.4 systems,
>  but I would be surprised if there were any problems on other versions.
>  It uses standard lookup functions.

Yes, works great on a RELENG_6 desktop using NIS and LDAP repositories.

-- 
-jpeg.
Comment 4 Maxim Konovalov freebsd_committer freebsd_triage 2006-05-04 10:08:05 UTC
State Changed
From-To: open->patched

getent(1) has been imported to HEAD.  I will MFC it to RELENG_6 
in one month.  Thanks for the diff!
Comment 5 Maxim Konovalov freebsd_committer freebsd_triage 2006-05-04 10:09:12 UTC
Responsible Changed
From-To: freebsd-bugs->maxim

Feedbuck$$ trap.
Comment 6 Maxim Konovalov freebsd_committer freebsd_triage 2006-06-04 11:31:08 UTC
State Changed
From-To: patched->closed

Merged to RELENG_6.