Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions openarc/openarc-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ struct configdef arcf_config[] =
{ "Syslog", CONFIG_TYPE_BOOLEAN, FALSE },
{ "SyslogFacility", CONFIG_TYPE_STRING, FALSE },
{ "TemporaryDirectory", CONFIG_TYPE_STRING, FALSE },
{ "UMask", CONFIG_TYPE_INTEGER, FALSE },
{ "UserID", CONFIG_TYPE_STRING, FALSE },
{ NULL, (u_int) -1, FALSE }
};
Expand Down
2 changes: 2 additions & 0 deletions openarc/openarc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4413,6 +4413,8 @@ main(int argc, char **argv)
sizeof pidfile);
}

(void) config_get(cfg, "UMask", &filemask, sizeof filemask);

if (become == NULL)
{
(void) config_get(cfg, "Userid", &become,
Expand Down
11 changes: 11 additions & 0 deletions openarc/openarc.conf.5.in
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,17 @@ allowed in
.I syslog.conf(5).
The default is "mail".

.TP
.I UMask (integer)
Requests a specific permissions mask to be used for file creation.
This only applies to creation of the socket when
.I Socket
specifies a UNIX domain socket, and to the
.I PidFile
(if any). See
.I umask(2)
for more information.

.TP
.I UserID (string)
Attempts to become the specified userid before starting operations.
Expand Down
9 changes: 9 additions & 0 deletions openarc/openarc.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@ Syslog Yes

# TemporaryDirectory /tmp

## UMask mask
## default (none)
##
## Change the process umask for file creation to the specified value.
## The system has its own default which will be used (usually 022).
## See the umask(2) man page for more information.

# UMask 022

## Userid userid
## default (none)
##
Expand Down