Bug 196390 - [makefs] when using METALOG, multiple file entries with the same leaf file name result in incorrect permissions
Summary: [makefs] when using METALOG, multiple file entries with the same leaf file na...
Status: Closed Unable to Reproduce
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-30 22:02 UTC by Adrian Chadd
Modified: 2019-09-16 21:15 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Chadd freebsd_committer 2014-12-30 22:02:35 UTC
Hi,

When using makefs with METALOG, I've noticed that things like 'passwd' aren't set suid.

I found that this in METALOG:

. type=dir uname=root gname=wheel mode=0755
./etc type=dir uname=root gname=wheel mode=0755
./sbin type=dir uname=root gname=wheel mode=0755
./usr type=dir uname=root gname=wheel mode=0755
./usr/bin type=dir uname=root gname=wheel mode=0755
./usr/bin/passwd type=file uname=root gname=wheel mode=04555 size=7000
./etc/passwd type=file mode=0644 uname=root gname=wheel

.. results in /usr/bin/passwd being not setuid.

But:

. type=dir uname=root gname=wheel mode=0755
./etc type=dir uname=root gname=wheel mode=0755
./sbin type=dir uname=root gname=wheel mode=0755
./usr type=dir uname=root gname=wheel mode=0755
./usr/bin type=dir uname=root gname=wheel mode=0755
./etc/passwd type=file mode=0644 uname=root gname=wheel
./usr/bin/passwd type=file uname=root gname=wheel mode=04555 size=7000

.. results in /usr/bin/passwd being setuid.
Comment 1 Ed Maste freebsd_committer 2019-09-16 21:12:24 UTC
Not reproducible on -current at r348071.