From mwm@mired.org  Fri Apr 19 06:59:10 2002
Return-Path: <mwm@mired.org>
Received: from mired.org (dsl-64-192-6-133.telocity.com [64.192.6.133])
	by hub.freebsd.org (Postfix) with SMTP id E2CE737B416
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 19 Apr 2002 06:59:08 -0700 (PDT)
Received: (qmail 32875 invoked by uid 100); 19 Apr 2002 13:59:08 -0000
Message-Id: <20020419135908.32874.qmail@mired.org>
Date: 19 Apr 2002 13:59:08 -0000
From: Mike Meyer <mwm@mired.org>
Reply-To: Mike Meyer <mwm@mired.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ports seem to have to hardwire numeric userids.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         37251
>Category:       ports
>Synopsis:       ports seem to have to hardwire numeric userids.
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 19 07:00:02 PDT 2002
>Closed-Date:    Fri Aug 30 19:08:58 PDT 2002
>Last-Modified:  Fri Aug 30 19:08:58 PDT 2002
>Originator:     Mike Meyer
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Meyer Consulting
>Environment:
System: FreeBSD guru.mired.org 4.5-STABLE FreeBSD 4.5-STABLE #4: Sun Apr 7 04:32:23 CDT 2002 mwm@guru.mired.org:/sharetmp/obj/usr/src/sys/GURU i386


>Description:

	ports that need to create userids all seem to wire a numeric
	userid down. This sometimes causes collisions when two ports
	trying to use the same uid are installed, and may also cause
	problems if a third party package is installed other than via
	ports.

>How-To-Repeat:

	Examine some ports that create userids, and note that most
	(all?)  wire in the userids: qmail, postgresql and perforce
	immediately, but there are others.

>Fix:

	How about providing a /usr/ports/Mk/pw.conf file that
	specifically for creating ids - both user and group - for
	ports? A copy of the default that specifies a min[ug]id of 1,
	and a max[ug]id of 99, or roughly those numbers. That way the
	install scripts that currently invoke pw with something like
	"-u ${UID} -g ${GID}" can leave those off, and just use "-C
	${PORTSDIR}/Mk/pw.conf", and have the user and groups
	allocated automatically. Possibly a PW variable could be added
	to ports/Mk/bsd.ports.mk that is set to "pw -C
	${PORTSDIR}/Mk/pw.conf" to make it slightly easier to get
	these things right - assuming that pw will work with [-C
	config] before the command.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->portmgr 
Responsible-Changed-By: petef 
Responsible-Changed-When: Sun May 26 20:54:28 PDT 2002 
Responsible-Changed-Why:  
This is portmgr material. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=37251 
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Fri Aug 30 19:07:20 PDT 2002 
State-Changed-Why:  
Thanks for the suggestion, but I don't think it is feasible. 
For example, packages need to hard-wire in the numeric uid, so 
it cannot be locally customized.  The problem of uid collision 
between two different ports is handled by having a single 
master registry of uids (listed in the porter's handbook); 
ports which do not follow this list are broken and should 
be fixed individually. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=37251 
>Unformatted:
