Page MenuHomeFreeBSD

Allow to specify umask(1) for a service started with rc(8)
ClosedPublic

Authored by eugen_grosbein.net on Aug 23 2022, 12:07 PM.
Tags
Referenced Files
Unknown Object (File)
Thu, Nov 21, 5:38 PM
Unknown Object (File)
Mon, Nov 18, 11:45 PM
Unknown Object (File)
Thu, Nov 14, 1:50 AM
Unknown Object (File)
Tue, Nov 12, 3:41 PM
Unknown Object (File)
Oct 19 2024, 2:55 AM
Unknown Object (File)
Oct 13 2024, 11:52 AM
Unknown Object (File)
Oct 9 2024, 9:34 AM
Unknown Object (File)
Oct 9 2024, 5:42 AM

Details

Summary

Currently we have multiple ways to modify environment (variables, working directory, limits etc.) for a service without touching its startup script but no way to change default umask(1) value. None of tools working with login classes change umask.

Also, we have no ways to extract umask by class name for shell script. Let us deal with the problem in simple way via new servicename_umask knob for rc.conf(5)

Some file-sharing services that create new files may benefit from it.

Test Plan

N/A

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 47078

Event Timeline

Manual page change LGTM and seems consistent with what I think the intent of the rc.subr change is. Can't vouch for the implementation.

This revision is now accepted and ready to land.Aug 25 2022, 10:03 PM
In D36309#825545, @pauamma wrote:

Manual page change LGTM and seems consistent with what I think the intent of the rc.subr change is. Can't vouch for the implementation.

Thanks.

I'm going to commit this soon unless an objection raised.

Is there a reason why this change was not MFCd? Thank you!

In D36309#935684, @jlduran_gmail.com wrote:

Is there a reason why this change was not MFCd? Thank you!

Forgot about it. I've just merged it downto stable/12.

In D36309#935684, @jlduran_gmail.com wrote:

Is there a reason why this change was not MFCd? Thank you!

Forgot about it. I've just merged it downto stable/12.

Thank you! /etc/rc.d/dmesg might just be its first consumer!

emaste added a subscriber: emaste.

Was committed (tag was Differential not Differential Revision so it did not auto-close).