Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 1997 12:07:47 +0200 (CEST)
From:      Andre Albsmeier <Andre.Albsmeier@mchp.siemens.de>
To:        hackers@freebsd.org
Subject:   Suggestion for chown -h
Message-ID:  <199710221007.MAA01578@curry.mchp.siemens.de>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710221007.MAA01578>