Page MenuHomeFreeBSD

sh: install hard links with same mode as target
ClosedPublic

Authored by emaste on Nov 23 2022, 3:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 28, 8:50 AM
Unknown Object (File)
Sep 22 2024, 4:31 AM
Unknown Object (File)
Sep 3 2024, 12:01 AM
Unknown Object (File)
Sep 2 2024, 3:51 PM
Unknown Object (File)
Aug 18 2024, 7:39 PM
Unknown Object (File)
Aug 16 2024, 9:59 PM
Unknown Object (File)
Jul 31 2024, 12:58 AM
Unknown Object (File)
Jul 6 2024, 5:29 PM
Subscribers

Details

Summary

Previously when using NO_ROOT we recorded METALOG entries for the /.profile hard link with a different file mode than the link target, which is not permitted.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I am not sure why we have /.profile and /.cshrc at all, though?

Similar issue with etc/pam.d/ftp, with the same fix.

emaste retitled this revision from sh, csh: install hard links with same mode as target to sh: install hard links with same mode as target.
emaste edited the summary of this revision. (Show Details)

Split out sh change

bin/csh/Makefile
164 ↗(On Diff #113440)

Have to change this one, because it gets applied to

LINKS=  ${BINDIR}/csh ${BINDIR}/tcsh

also, resulting in

error: entries point to the same inode but have different meta: ./bin/csh,./bin/tcsh in line 11446,11476. off by "mode"

A slightly hacky way to do this would be:

${INSTALL_LINK} ${TAG_ARGS} -m ${CONFMODE} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc

(bsd.links.mk, bsd.own.mk do not include per-file control over ${LINKMODE})

This revision is now accepted and ready to land.Nov 23 2022, 6:56 PM