aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2022-06-24 16:09:11 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2022-06-24 16:09:11 +0000
commitf9e62cbacc33987506332133bb076c8fe4fbe82d (patch)
tree589cfbb12682efd4872c314e907ff7b459078286
parent458f475df8e5912609c14208c189414a8255c738 (diff)
downloadsrc-f9e62cbacc33987506332133bb076c8fe4fbe82d.tar.gz
src-f9e62cbacc33987506332133bb076c8fe4fbe82d.zip
libc/syslog: fully deprecate and don't try to open "/dev/log"
The "/dev/log" socket existed in pre-FreeBSD times. Later it was substituted to a compatibility symlink. The symlink creation was deprecated in FreeBSD 10.2 and 9-STABLE. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35304
-rw-r--r--lib/libc/gen/syslog.c12
-rw-r--r--sys/sys/syslog.h1
2 files changed, 0 insertions, 13 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c
index 797c7389d1a2..50a77f651980 100644
--- a/lib/libc/gen/syslog.c
+++ b/lib/libc/gen/syslog.c
@@ -436,18 +436,6 @@ connectlog(void)
}
if (status == NOCONN) {
- /*
- * Try the old "/dev/log" path, for backward
- * compatibility.
- */
- (void)strncpy(SyslogAddr.sun_path, _PATH_OLDLOG,
- sizeof SyslogAddr.sun_path);
- if (_connect(LogFile, (struct sockaddr *)&SyslogAddr,
- sizeof(SyslogAddr)) != -1)
- status = CONNDEF;
- }
-
- if (status == NOCONN) {
(void)_close(LogFile);
LogFile = -1;
}
diff --git a/sys/sys/syslog.h b/sys/sys/syslog.h
index 071b68427105..ff2bd1450802 100644
--- a/sys/sys/syslog.h
+++ b/sys/sys/syslog.h
@@ -37,7 +37,6 @@
#define _PATH_LOG "/var/run/log"
#define _PATH_LOG_PRIV "/var/run/logpriv"
-#define _PATH_OLDLOG "/dev/log" /* backward compatibility */
/*
* priorities/facilities are encoded into a single 32-bit quantity, where the