From a6412d5d4b560b82b2f6341754584b4c96fad042 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 24 May 2009 15:27:25 +0000 Subject: [PATCH] Fix chflags -h in various cases: do not use link target's flags as original. Patch slightly changed to align more with chmod.c. PR: bin/131999 Submitted by: bde Approved by: ed (mentor) MFC after: 3 weeks --- bin/chflags/chflags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/chflags/chflags.c b/bin/chflags/chflags.c index 053a7a7db4cc..02137eb30c34 100644 --- a/bin/chflags/chflags.c +++ b/bin/chflags/chflags.c @@ -115,7 +115,7 @@ main(int argc, char *argv[]) fts_options |= FTS_LOGICAL; } } else - fts_options = FTS_LOGICAL; + fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; /* XXX: Why don't chflags and lchflags have compatible prototypes? */ if (hflag)