From owner-freebsd-hackers Wed Oct 22 03:09:13 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA20563 for hackers-outgoing; Wed, 22 Oct 1997 03:09:13 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from david.siemens.de (david.siemens.de [139.23.36.11]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA20558 for ; Wed, 22 Oct 1997 03:09:08 -0700 (PDT) (envelope-from Andre.Albsmeier@mchp.siemens.de) Received: from salomon.mchp.siemens.de (mail.siemens.de [139.23.33.13]) by david.siemens.de (8.8.7/8.8.7) with ESMTP id MAA28638 for ; Wed, 22 Oct 1997 12:04:00 +0200 (MET DST) Received: from curry.mchp.siemens.de (daemon@curry.mchp.siemens.de [146.180.31.23]) by salomon.mchp.siemens.de (8.8.7/8.8.5) with ESMTP id MAA28660 for ; Wed, 22 Oct 1997 12:08:06 +0200 (MDT) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.8.7/8.8.7) id MAA06932 for ; Wed, 22 Oct 1997 12:08:05 +0200 (MET DST) From: Andre Albsmeier Message-Id: <199710221007.MAA01578@curry.mchp.siemens.de> Subject: Suggestion for chown -h To: hackers@freebsd.org Date: Wed, 22 Oct 1997 12:07:47 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, after asking on -questions why "chown -R -h" isn't allowed, I was told that this is due to the possibility that there might be symlinks which point to underlaying directories somewhere else. However, this might really be a problem, but only if the symlinks are followed. So if neither -L nor -H are specified, I think it would be safe to allow -h with -R. The diff's are quite simple: *** chown.c.ORI Wed Oct 22 11:35:40 1997 --- chown.c Tue Oct 21 20:23:30 1997 *************** *** 116,122 **** fts_options = FTS_PHYSICAL; if (Rflag) { ! if (hflag) errx(1, "the -R and -h options may not be specified together"); if (Hflag) fts_options |= FTS_COMFOLLOW; --- 116,122 ---- fts_options = FTS_PHYSICAL; if (Rflag) { ! if (hflag && (Lflag || Hflag) ) errx(1, "the -R and -h options may not be specified together"); if (Hflag) fts_options |= FTS_COMFOLLOW; I have tried it here and it works quite nice. The reason, why I like it is, to pass a whole directory over to another user; of course without the files the symlinks are pointing at. What do you think about that? -Andre