From owner-freebsd-hackers Sat Apr 6 00:16:50 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA13857 for hackers-outgoing; Sat, 6 Apr 1996 00:16:50 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA13852 for ; Sat, 6 Apr 1996 00:16:47 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id SAA17173; Sat, 6 Apr 1996 18:16:04 +1000 Date: Sat, 6 Apr 1996 18:16:04 +1000 From: Bruce Evans Message-Id: <199604060816.SAA17173@godzilla.zeta.org.au> To: freebsd-hackers@FreeBSD.org, j@uriah.heep.sax.de Subject: Re: comments please Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >> The patch allows 'install' to use a numeric GID or UID in the same way that >> chgrp (et al) do. >> + #ifdef ALLOW_NUMERIC_IDS >I don't even think this should be #ifdef'ed. Btw., i missed the patch >for the Makefile to add it by default. It shouldn't be ifdefed if you are confident about it. Perhaps the old handling should be a runtime option. Some comments. The casts in resolve_*id() aren't necessary. You already depend on the compiler not warning about the conversions for the broken pw_uid and pw_gid types in , and there is no bounds checking in numeric_id(), so the casts may hide overflow bugs. The XXX comment is wrong. uid_t's and gid_t's are no longer unsigned longs. (I just fixed this problem in find(1). It uses strtol(), which can't handle large inums, sizes, uids or gids. It failed to find the large inums generated by devfs. I used strtoq(). This works, except for the lack of overflow checking when the result is assigned to a smaller type, because find doesn't search for any unsigned long long quantities.) Bruce