summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-02-18 02:25:40 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-02-18 02:25:40 +0000
commitdc9efbed8e5487e50e1d4edc317e3a1cd515fad3 (patch)
tree3aa905130d22e50cf86fe72541526dc22d647a18 /usr.sbin
parent4eb3c6f2bd8c56a47571f46979b3286a048ab075 (diff)
Use the SUN_LEN macro to set sun_len correctly
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/cron/crontab.c6
-rw-r--r--usr.sbin/cron/misc.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c
index 9a03c47961a..05ca44003a3 100644
--- a/usr.sbin/cron/crontab.c
+++ b/usr.sbin/cron/crontab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crontab.c,v 1.37 2003/02/17 18:40:11 millert Exp $ */
+/* $OpenBSD: crontab.c,v 1.38 2003/02/18 02:25:39 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
*/
@@ -21,7 +21,7 @@
*/
#if !defined(lint) && !defined(LINT)
-static char const rcsid[] = "$OpenBSD: crontab.c,v 1.37 2003/02/17 18:40:11 millert Exp $";
+static char const rcsid[] = "$OpenBSD: crontab.c,v 1.38 2003/02/18 02:25:39 millert Exp $";
#endif
/* crontab - install and manage per-user crontab files
@@ -654,7 +654,7 @@ poke_daemon() {
if (glue_strings(sun.sun_path, sizeof sun.sun_path, SPOOL_DIR,
CRONSOCK, '/')) {
sun.sun_family = AF_UNIX;
- sun.sun_len = strlen(sun.sun_path);
+ sun.sun_len = SUN_LEN(&sun);
if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0 &&
connect(sock, (struct sockaddr *)&sun, sizeof(sun)) == 0) {
poke = RELOAD_CRON;
diff --git a/usr.sbin/cron/misc.c b/usr.sbin/cron/misc.c
index 1fbbc70e047..8ea94593f0c 100644
--- a/usr.sbin/cron/misc.c
+++ b/usr.sbin/cron/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.23 2002/08/08 18:17:50 millert Exp $ */
+/* $OpenBSD: misc.c,v 1.24 2003/02/18 02:25:39 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
*/
@@ -21,7 +21,7 @@
*/
#if !defined(lint) && !defined(LINT)
-static char const rcsid[] = "$OpenBSD: misc.c,v 1.23 2002/08/08 18:17:50 millert Exp $";
+static char const rcsid[] = "$OpenBSD: misc.c,v 1.24 2003/02/18 02:25:39 millert Exp $";
#endif
/* vix 26jan87 [RCS has the rest of the log]
@@ -747,8 +747,8 @@ open_socket()
exit(ERROR_EXIT);
}
unlink(sun.sun_path);
- sun.sun_len = strlen(sun.sun_path);
sun.sun_family = AF_UNIX;
+ sun.sun_len = SUN_LEN(&sun);
omask = umask(007);
if (bind(sock, (struct sockaddr *)&sun, sizeof(sun))) {