Page MenuHomeFreeBSD

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

Authored by eugen_grosbein.net on Aug 23 2022, 12:07 PM.
Tags
Referenced Files
Unknown Object (File)
Fri, Mar 29, 1:35 AM
Unknown Object (File)
Feb 16 2024, 2:58 PM
Unknown Object (File)
Feb 10 2024, 2:15 AM
Unknown Object (File)
Jan 3 2024, 4:34 AM
Unknown Object (File)
Dec 23 2023, 1:38 PM
Unknown Object (File)
Dec 20 2023, 6:52 AM
Unknown Object (File)
Dec 13 2023, 3:02 AM
Unknown Object (File)
Dec 2 2023, 11:33 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!

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!