--DKU6Jbt7q3WqK7+M
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Feb 13, 2003, [EMAIL PROTECTED] wrote:
> On Thu, Feb 13, 2003 at 12:00:10PM +0100, [EMAIL PROTECTED] wrote:
>>On Tue, Feb 11, 2003, [EMAIL PROTECTED] wrote:
>>> Does openpkg's rc script depend on /usr/ucb/whoami ? Is there a better =
way to
>>> check simply that a user has effective id root? I'd like to avoid havin=
g to add
>>> /usr/ucb to root's PATH if possible, and more importantly avoid probs w=
ith 'su'
>>> vs. 'su -', etc.
>>>
>>[...]
>>>
>>> # who am i
>>> guest      pts/4        Feb  9 19:37    (laptop-a)
>>> # whoami
>>> root
>>> #
>>
>>Yes, this is a known problem. Today's OpenPKG 'rc' bourne shell bundled
>>with OpenPKG 1.[0-2] prefers 'whoami' to discover the username, but will
>>use 'who' as the next alternative. It seems that you've learned this
>>yourself the hard way, because running 'who am i' does not return the
>>correct username in some cases.
>=20
> May I suggest using the ``id'' program in place of ``who'' or ``whoami''
> (it's already in the coreutils and could be added to the bootstrap
> binaries)?  The ``id'' program is far more flexible, returning numric uid,
> gid, or names depending on the options.  At least on Linux systems, it's
> well integrated with the underlying authentication method, using
> /etc/nsswitch.conf, to return the appropriate information from files, nis,
> ldap, etc. as necessary.
>=20
It is a good idea, though I also view growing of the bootstrap as a hefty
disadvantage. That should be kept as simple as possible, and might outweigh
the easier macro usage you mentioned. In any case, I'll leave the decision =
up
to Ralf the bootstrap architect.

--
[EMAIL PROTECTED]
Development Team, Application Services
Cable & Wireless Deutschland GmbH

--DKU6Jbt7q3WqK7+M
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia+4K

iQEVAgUBPkwHFFuYv80UoVTdAQF2xAf9EvKnboX9iBY21znQ2XHpJPOLJ9G+7mbu
3u64AZ//otWt/bDpb5mao2y5crZsNn77FKDRGcVWczALVEVM7FtyV1OwAxWyPk1T
hdIXN1piNmWlFN/Gh6A+011KjqcCnHBVc01SjAu9OjoHnoebT9Euw9ildfTymfig
2NuveiMlreCXl7IgXE4xPLfR/vH9b/MYtGYeKOkWfRrA/HDOXGjEAP0Ab7Yl7obi
2SgseIPiZqF2AMaLRfLtsP7TzgDDgANxbtzoEULmsz28xOw9tC0wTOtu4DZ4oim1
PTfWSUEj7/ucOk2n4ryxcdlqyOpVPJPUGCs/fNfbFOe9oJZrSrKT6w==
=f/gE
-----END PGP SIGNATURE-----

--DKU6Jbt7q3WqK7+M--
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   [EMAIL PROTECTED]

Reply via email to