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)
Fri, Jul 19, 10:31 AM
Unknown Object (File)
Sat, Jul 6, 11:43 AM
Unknown Object (File)
Sat, Jul 6, 7:55 AM
Unknown Object (File)
Mon, Jul 1, 3:26 AM
Unknown Object (File)
Sun, Jun 30, 11:53 AM
Unknown Object (File)
Fri, Jun 28, 1:39 AM
Unknown Object (File)
Thu, Jun 27, 1:50 PM
Unknown Object (File)
Thu, Jun 27, 1:50 PM

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!

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

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

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).