Bug 21725

Summary: mtree follows symlinks!
Product: Base System Reporter: jez
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description jez 2000-10-03 13:00:00 UTC
	Why, oh why does mtree(8) follow symlinks?

Fix: Here's a patch that adds -P and -L switches to mtree - cribbed
	from du(1).  -P prevents mtree from following symlinks, but I've
	left the default as -L.

	I see no point in adding the -H, as mtree does a chdir to the
	named directory, but this could be added easily.

	Finally, this patch seems to fix problem report bin/21017 as well,
	making the link itself part of the report, rather than what its
	pointing at.

-- CUT HERE --
cvs diff: Diffing .
How-To-Repeat: 
	% mkdir test ; cd test
	% ln -s / foo
	% mtree -c
Comment 1 Jonathan Chen freebsd_committer freebsd_triage 2001-08-02 23:30:38 UTC
State Changed
From-To: open->closed

feature committed in mtree.c 1.16.2.7, 1.18