summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/smtpd/control.c')
-rw-r--r--usr.sbin/smtpd/control.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/usr.sbin/smtpd/control.c b/usr.sbin/smtpd/control.c
index fafbe90aa47..1cf6eb0642d 100644
--- a/usr.sbin/smtpd/control.c
+++ b/usr.sbin/smtpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.110 2016/02/02 05:45:27 sunil Exp $ */
+/* $OpenBSD: control.c,v 1.111 2016/02/09 10:38:02 gilles Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
@@ -202,20 +202,20 @@ control_sig_handler(int sig, short event, void *p)
int
control_create_socket(void)
{
- struct sockaddr_un sun;
+ struct sockaddr_un s_un;
int fd;
mode_t old_umask;
if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
fatal("control: socket");
- memset(&sun, 0, sizeof(sun));
- sun.sun_family = AF_UNIX;
- if (strlcpy(sun.sun_path, SMTPD_SOCKET,
- sizeof(sun.sun_path)) >= sizeof(sun.sun_path))
+ memset(&s_un, 0, sizeof(s_un));
+ s_un.sun_family = AF_UNIX;
+ if (strlcpy(s_un.sun_path, SMTPD_SOCKET,
+ sizeof(s_un.sun_path)) >= sizeof(s_un.sun_path))
fatal("control: socket name too long");
- if (connect(fd, (struct sockaddr *)&sun, sizeof(sun)) == 0)
+ if (connect(fd, (struct sockaddr *)&s_un, sizeof(s_un)) == 0)
fatalx("control socket already listening");
if (unlink(SMTPD_SOCKET) == -1)
@@ -223,7 +223,7 @@ control_create_socket(void)
fatal("control: cannot unlink socket");
old_umask = umask(S_IXUSR|S_IXGRP|S_IWOTH|S_IROTH|S_IXOTH);
- if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
+ if (bind(fd, (struct sockaddr *)&s_un, sizeof(s_un)) == -1) {
(void)umask(old_umask);
fatal("control: bind");
}
@@ -339,7 +339,7 @@ control_accept(int listenfd, short event, void *arg)
{
int connfd;
socklen_t len;
- struct sockaddr_un sun;
+ struct sockaddr_un s_un;
struct ctl_conn *c;
size_t *count;
uid_t euid;
@@ -348,8 +348,8 @@ control_accept(int listenfd, short event, void *arg)
if (getdtablesize() - getdtablecount() < CONTROL_FD_RESERVE)
goto pause;
- len = sizeof(sun);
- if ((connfd = accept(listenfd, (struct sockaddr *)&sun, &len)) == -1) {
+ len = sizeof(s_un);
+ if ((connfd = accept(listenfd, (struct sockaddr *)&s_un, &len)) == -1) {
if (errno == ENFILE || errno == EMFILE)
goto pause;
if (errno == EINTR || errno == EWOULDBLOCK ||