Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136460424
D20969.id59866.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D20969.id59866.diff
View Options
Index: usr.sbin/daemon/daemon.8
===================================================================
--- usr.sbin/daemon/daemon.8
+++ usr.sbin/daemon/daemon.8
@@ -44,7 +44,6 @@
.Op Fl s Ar syslog_priority
.Op Fl T Ar syslog_tag
.Op Fl l Ar syslog_facility
-.Op Fl M Ar umask
.Op Fl R Ar restart_delay_seconds
.Ar command arguments ...
.Sh DESCRIPTION
@@ -118,8 +117,6 @@
.It Fl r
Supervise and restart the program after a one-second delay if it has
been terminated.
-.It Fl M Ar umask
-Set umask (as octal) before starting child process.
.It Fl R Ar restart_delay_seconds
Supervise and restart the program after the specified delay
if it has been terminated.
Index: usr.sbin/daemon/daemon.c
===================================================================
--- usr.sbin/daemon/daemon.c
+++ usr.sbin/daemon/daemon.c
@@ -35,7 +35,6 @@
#include <sys/param.h>
#include <sys/mman.h>
-#include <sys/stat.h>
#include <sys/wait.h>
#include <fcntl.h>
@@ -85,7 +84,7 @@
sigset_t mask_susp, mask_orig, mask_read, mask_term;
struct log_params logpar;
int pfd[2] = { -1, -1 }, outfd = -1;
- int stdmask, logpri, logfac, mask;
+ int stdmask, logpri, logfac;
struct pidfh *ppfh, *pfh;
char *p;
@@ -100,8 +99,7 @@
dosyslog = 0;
outfn = NULL;
title = NULL;
- mask = -1;
- while ((ch = getopt(argc, argv, "cfSp:P:ru:o:s:l:t:l:m:M:R:T:")) != -1) {
+ while ((ch = getopt(argc, argv, "cfSp:P:ru:o:s:l:t:l:m:R:T:")) != -1) {
switch (ch) {
case 'c':
nochdir = 0;
@@ -137,11 +135,6 @@
if (p == optarg || restart < 1)
errx(6, "invalid restart delay");
break;
- case 'M':
- mask = strtol(optarg, &p, 8);
- if (p == optarg || mask < 0 || mask > 0777)
- errx(6, "unrecognized umask");
- break;
case 's':
logpri = get_log_mapping(optarg, prioritynames);
if (logpri == -1)
@@ -308,9 +301,6 @@
pfd[1] != STDOUT_FILENO)
close(pfd[1]);
}
- /* Set umask if requested */
- if (mask > 0)
- umask(mask);
execvp(argv[0], argv);
/*
* execvp() failed -- report the error. The child is
@@ -576,7 +566,6 @@
" [-u user] [-o output_file] [-t title]\n"
" [-l syslog_facility] [-s syslog_priority]\n"
" [-T syslog_tag] [-m output_mask] [-R restart_delay_secs]\n"
- " [-M umask]\n"
"command arguments ...\n");
exit(1);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 18, 9:53 PM (2 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25552717
Default Alt Text
D20969.id59866.diff (2 KB)
Attached To
Mode
D20969: Add option to set umask before starting child process
Attached
Detach File
Event Timeline
Log In to Comment