Page MenuHomeFreeBSD

Fixup plist owner/group/mode leackages.
ClosedPublic

Authored by mat on Jun 16 2020, 12:20 PM.
Tags
None
Referenced Files
F102871562: D25295.id73166.diff
Mon, Nov 18, 6:22 AM
Unknown Object (File)
Thu, Nov 14, 9:18 PM
Unknown Object (File)
Thu, Nov 14, 8:27 PM
Unknown Object (File)
Wed, Nov 13, 7:00 PM
Unknown Object (File)
Mon, Nov 11, 11:31 AM
Unknown Object (File)
Wed, Nov 6, 10:59 PM
Unknown Object (File)
Tue, Oct 29, 9:00 PM
Unknown Object (File)
Oct 17 2024, 4:51 PM
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.