diff options
author | hrs <hrs@FreeBSD.org> | 2005-04-13 03:19:41 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2005-04-13 03:19:41 +0000 |
commit | 33d5d6c4bafb8bd2eea7e9d6520474debdd1733f (patch) | |
tree | 27252c1f59cd233a922df1585ccad1ced40c373a /usr.sbin/syslogd/syslogd.c | |
parent | f52e695ee6fe6e0b62d340734d32c4c55f37ed12 (diff) | |
download | FreeBSD-src-33d5d6c4bafb8bd2eea7e9d6520474debdd1733f.zip FreeBSD-src-33d5d6c4bafb8bd2eea7e9d6520474debdd1733f.tar.gz |
Add -S option which allows to change the pathname of the privileged
socket /var/run/logpriv.
Reviewed by: glebius and kensmith
MFC after: 2 days
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 52f757b..71a77c3 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -356,7 +356,7 @@ main(int argc, char *argv[]) socklen_t len; bindhostname = NULL; - while ((ch = getopt(argc, argv, "46Aa:b:cdf:kl:m:nop:P:suv")) != -1) + while ((ch = getopt(argc, argv, "46Aa:b:cdf:kl:m:nop:P:sS:uv")) != -1) switch (ch) { case '4': family = PF_INET; @@ -445,6 +445,11 @@ main(int argc, char *argv[]) case 's': /* no network mode */ SecureMode++; break; + case 'S': /* path for privileged originator */ + if (strlen(optarg) >= sizeof(sunx.sun_path)) + errx(1, "%s path too long, exiting", optarg); + funix_secure.name = optarg; + break; case 'u': /* only log specified priority */ UniquePriority++; break; |