Page MenuHomeFreeBSD

Fixup plist owner/group/mode leackages.
ClosedPublic

Authored by mat on Jun 16 2020, 12:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 28 2024, 3:42 PM
Unknown Object (File)
Jan 16 2024, 5:46 AM
Unknown Object (File)
Dec 22 2023, 11:35 PM
Unknown Object (File)
Sep 26 2023, 10:11 PM
Unknown Object (File)
Jun 15 2023, 10:46 PM
Unknown Object (File)
Jun 11 2023, 5:34 PM
Unknown Object (File)
May 20 2023, 4:59 AM
Unknown Object (File)
May 20 2023, 4:58 AM
Subscribers

Details

Summary

Make sure rc files are owned by root:wheel with a sensible mode.

A PLIST file is supposed to be self contained, reset owner/group/mode after each.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mat requested review of this revision.Jun 16 2020, 12:20 PM
mat created this revision.

Only do it if the file exists.

won't it be better to have a loop that appends things to PLIST_FILES?

In D25295#557787, @bapt wrote:

won't it be better to have a loop that appends things to PLIST_FILES?

To have what loop? The USE_RC_SUBR one?

install-rc-script runs in the late install stage, whereas PLIST_FILES get handled early in generate-plist. Also, the USE_RC_SUBR loop is a shell loop, and you cannot add to a make variable in a shell loop ;-)

I do not think there would be any plus to it using PLIST_FILES. PLIST_FILES is a thing for porters to use in their ports. Inside the framework there are many many places adding things to TMPPLIST.

Oh, sorry, I missread what you wrote, a new loop.

Well, we could have a loop adding the content of USE_RC_SUBR to PLIST_FILES. As you'd have to do quoting be able to add the string containing spaces, so that it does not get splitted later, I am not sure anything would be gained by it.

In D25295#557793, @mat wrote:

Oh, sorry, I missread what you wrote, a new loop.

Well, we could have a loop adding the content of USE_RC_SUBR to PLIST_FILES. As you'd have to do quoting be able to add the string containing spaces, so that it does not get splitted later, I am not sure anything would be gained by it.

my main point here is to have on single place to add things to ${TMPPLIST} but that is just an idea, no strong feeling here.

Seems like a good idea to me.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 25 2020, 12:37 PM
This revision was automatically updated to reflect the committed changes.