[37615] branches/gsoc08-privileges/base
Rainer Müller
raimue at macports.org
Mon Jun 23 18:04:45 PDT 2008
pmagrath at macports.org wrote:
> Revision: 37615
> http://trac.macosforge.org/projects/macports/changeset/37615
> Author: pmagrath at macports.org
> Date: 2008-06-15 10:36:41 -0700 (Sun, 15 Jun 2008)
>
> Log Message:
> -----------
> Add --with-no-root-privileges switch to ./configure.
>[...]
> + # Set install-group to current user
> + AC_MSG_CHECKING([for install group])
> + DSTGRP=`whoami`
While some testing I found a possible problem here: `whoami` might be
incorrect if the main group of the user does not have the same name as
the user. For example root has the primary group 'wheel' and there is no
group called 'root'.
I would recommend `id -gn` instead here. Then we should use `id -un` for
the username for consistency (and whoami is obsoleted by id as stated in
the man page).
Rainer
More information about the macports-dev
mailing list