tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Chaging uid/gid at binary install



On 23 Feb 2011 07:27, "Steven Drake" <sbd%netbsd.org@localhost> wrote:
> On Mon, 21 Feb 2011, Masao Uebayashi wrote:
>> Can we provide a pre-defined pkgsrc username/UID "range"?
>>
>> For example, if I set PKG_UID_RANGE=500-999 and install foo-1.2.3
>> which needs user "_foo" which has pkgsrc UID index 50, pkg_add(8)
>> will useradd(8) user "_foo" as 550 and chown files.
>>
>> Does this sound reasonable?
>
> No! This is because there is no way of knowing if any uid/gid or range
> is really free or not. E.g. what if uid 550 is already used?
>
> The current way may be a pain but it works, moving to a system with fixed
> uids like you suggested would cause a lot of problems.
>

I suspect for the majority of users the suggested change would cause much fewer problems. 

Would the following address your concerns?

- in the event of an existing passwd entry with conflicting data: either just fail or dynamically allocate from the top of the range (option)
- have an option to always dynamically allocate (possibly from the top of the range)


Home | Main Index | Thread Index | Old Index