diff options
-rw-r--r-- | usr.sbin/sasyncd/carp.c | 12 | ||||
-rw-r--r-- | usr.sbin/sasyncd/conf.y | 8 | ||||
-rw-r--r-- | usr.sbin/sasyncd/monitor.c | 12 | ||||
-rw-r--r-- | usr.sbin/sasyncd/net.c | 10 | ||||
-rw-r--r-- | usr.sbin/sasyncd/pfkey.c | 14 | ||||
-rw-r--r-- | usr.sbin/sasyncd/sasyncd.c | 4 | ||||
-rw-r--r-- | usr.sbin/sasyncd/timer.c | 4 |
7 files changed, 32 insertions, 32 deletions
diff --git a/usr.sbin/sasyncd/carp.c b/usr.sbin/sasyncd/carp.c index 7c67dc1aed0..32151a2037b 100644 --- a/usr.sbin/sasyncd/carp.c +++ b/usr.sbin/sasyncd/carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: carp.c,v 1.4 2006/06/02 20:09:43 mcbride Exp $ */ +/* $OpenBSD: carp.c,v 1.5 2006/06/02 20:31:48 moritz Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -112,7 +112,7 @@ carp_demote(int demote, int force) log_msg(1, "carp_demote: couldn't open socket"); return; } - + bzero(&ifgr, sizeof(ifgr)); strlcpy(ifgr.ifgr_name, cfgstate.carp_ifgroup, sizeof(ifgr.ifgr_name)); @@ -120,11 +120,11 @@ carp_demote(int demote, int force) if (!force) { if (ioctl(s, SIOCGIFGATTR, (caddr_t)&ifgr) == -1) { log_msg(1, "carp_demote: unable to get " - "the demote state of group '%s'", - cfgstate.carp_ifgroup); + "the demote state of group '%s'", + cfgstate.carp_ifgroup); goto done; } - + if (ifgr.ifgr_attrib.ifg_carp_demoted == 0) goto done; } @@ -248,7 +248,7 @@ carp_init(void) return -1; } log_msg(1, "carp_init: initializing runstate to %s", - carp_state_name(cfgstate.runstate)); + carp_state_name(cfgstate.runstate)); return 0; } diff --git a/usr.sbin/sasyncd/conf.y b/usr.sbin/sasyncd/conf.y index b8d6de3a418..e958d001011 100644 --- a/usr.sbin/sasyncd/conf.y +++ b/usr.sbin/sasyncd/conf.y @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.y,v 1.10 2006/06/02 20:09:43 mcbride Exp $ */ +/* $OpenBSD: conf.y,v 1.11 2006/06/02 20:31:48 moritz Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -59,7 +59,7 @@ void yyerror(const char *); %token MODE INTERFACE INTERVAL LISTEN ON PORT PEER SHAREDKEY %token Y_SLAVE Y_MASTER INET INET6 FLUSHMODE STARTUP NEVER SYNC -%token GROUP SKIPSLAVE +%token GROUP SKIPSLAVE %token <string> STRING %token <val> VALUE %type <val> af port mode flushmode @@ -230,7 +230,7 @@ match(char *token) } int -yylex(void) +yylex(void) { char *p; int v; @@ -284,7 +284,7 @@ conf_parse_file(char *cfgfile) if ((st.st_uid && st.st_uid != pw->pw_uid) || ((st.st_mode & S_IFMT) != S_IFREG) || ((st.st_mode & (S_IRWXG | S_IRWXO)) != 0)) { - log_msg(0, "configuration file has bad owner, type or mode"); + log_msg(0, "configuration file has bad owner, type or mode"); goto bad; } diff --git a/usr.sbin/sasyncd/monitor.c b/usr.sbin/sasyncd/monitor.c index 94c9a0b337e..e2251c069d1 100644 --- a/usr.sbin/sasyncd/monitor.c +++ b/usr.sbin/sasyncd/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.8 2006/06/02 20:09:43 mcbride Exp $ */ +/* $OpenBSD: monitor.c,v 1.9 2006/06/02 20:31:48 moritz Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -64,11 +64,11 @@ monitor_init(void) int p[2]; if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, p) != 0) { - log_err("%s: socketpair failed - %s", __progname, + log_err("%s: socketpair failed - %s", __progname, strerror(errno)); exit(1); } - + if (!pw) { log_err("%s: getpwnam(\"%s\") failed", __progname, SASYNCD_USER); @@ -97,7 +97,7 @@ monitor_init(void) m_state.s = p[0]; close(p[1]); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(1, &pw->pw_gid) || setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) || setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) { log_err("%s: failed to drop privileges", __progname); @@ -299,7 +299,7 @@ m_priv_pfkey_snap(int s) sadb_buflen = 0; goto try_spd; } - + sadb_buflen = sz; if ((sadb_buf = malloc(sadb_buflen)) == NULL) { log_err("m_priv_pfkey_snap: malloc"); @@ -323,7 +323,7 @@ m_priv_pfkey_snap(int s) spd_buflen = 0; goto out; } - + spd_buflen = sz; if ((spd_buf = malloc(spd_buflen)) == NULL) { log_err("m_priv_pfkey_snap: malloc"); diff --git a/usr.sbin/sasyncd/net.c b/usr.sbin/sasyncd/net.c index c131a1be1d3..416e0f0b5e8 100644 --- a/usr.sbin/sasyncd/net.c +++ b/usr.sbin/sasyncd/net.c @@ -1,4 +1,4 @@ -/* $OpenBSD: net.c,v 1.13 2006/06/02 20:09:43 mcbride Exp $ */ +/* $OpenBSD: net.c,v 1.14 2006/06/02 20:31:48 moritz Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -139,7 +139,7 @@ net_add_listener(struct sockaddr *sa) } if (getnameinfo(sa, sa->sa_len, host, sizeof host, port, sizeof port, - NI_NUMERICHOST | NI_NUMERICSERV)) + NI_NUMERICHOST | NI_NUMERICSERV)) log_msg(3, "listening on port %u fd %d", cfgstate.listen_port, s); else @@ -177,13 +177,13 @@ net_setup_listeners(void) return 0; } - /* + /* * If net_set_sa() failed, cfgstate.listen_on is probably an * interface name, so we should listen on all it's addresses. */ if (getifaddrs(&ifap) != 0) { - perror("net_setup_listeners: getifaddrs()"); + perror("net_setup_listeners: getifaddrs()"); goto errout; } @@ -683,7 +683,7 @@ net_read(struct syncpeer *p, u_int32_t *msgtype, u_int32_t *msglen) if (r < 1) net_disconnect_peer(p); return NULL; - } + } blob_len = ntohl(v); if (blob_len < sizeof hash + AES_IV_LEN + 2 * sizeof(u_int32_t)) diff --git a/usr.sbin/sasyncd/pfkey.c b/usr.sbin/sasyncd/pfkey.c index ed735f7f42f..b97a3826895 100644 --- a/usr.sbin/sasyncd/pfkey.c +++ b/usr.sbin/sasyncd/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.14 2006/06/02 20:09:43 mcbride Exp $ */ +/* $OpenBSD: pfkey.c,v 1.15 2006/06/02 20:31:48 moritz Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -48,7 +48,7 @@ #include "sasyncd.h" #include "net.h" -struct pfkey_msg +struct pfkey_msg { SIMPLEQ_ENTRY(pfkey_msg) next; @@ -128,7 +128,7 @@ static const char * pfkey_print_type(struct sadb_msg *msg) { static char uk[20]; - + if (msg->sadb_msg_type < sizeof msgtypes / sizeof msgtypes[0]) return msgtypes[msg->sadb_msg_type]; else { @@ -223,12 +223,12 @@ pfkey_msg_filter(struct sadb_msg *msg) return 1; break; case AF_INET6: - if (src && + if (src && memcmp(&((struct sockaddr_in6 *)p->sa)->sin6_addr, &((struct sockaddr_in6 *)src)->sin6_addr, sizeof(struct in_addr)) == 0) return 1; - if (dst && + if (dst && memcmp(&((struct sockaddr_in6 *)p->sa)->sin6_addr, &((struct sockaddr_in6 *)dst)->sin6_addr, sizeof(struct in_addr)) == 0) @@ -454,7 +454,7 @@ pfkey_snapshot(void *v) if (!p) return; - + if (monitor_get_pfkey_snap(&sadb, &sadbsz, &spd, &spdsz)) { log_msg(0, "pfkey_snapshot: failed to get pfkey snapshot"); return; @@ -506,7 +506,7 @@ pfkey_snapshot(void *v) /* Tweak msg type. */ m->sadb_msg_type = SADB_X_ADDFLOW; - + if (pfkey_msg_filter(m)) continue; diff --git a/usr.sbin/sasyncd/sasyncd.c b/usr.sbin/sasyncd/sasyncd.c index f07904bfab4..f1f665db18a 100644 --- a/usr.sbin/sasyncd/sasyncd.c +++ b/usr.sbin/sasyncd/sasyncd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sasyncd.c,v 1.11 2006/06/02 20:09:43 mcbride Exp $ */ +/* $OpenBSD: sasyncd.c,v 1.12 2006/06/02 20:31:48 moritz Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -101,7 +101,7 @@ sasyncd_run(pid_t ppid) timeout = &tv; timer_next_event(&tv); - + n = select(maxfd, rfds, wfds, 0, timeout); if (n == -1) { if (errno != EINTR) { diff --git a/usr.sbin/sasyncd/timer.c b/usr.sbin/sasyncd/timer.c index 92317a8175c..d4726f3dc42 100644 --- a/usr.sbin/sasyncd/timer.c +++ b/usr.sbin/sasyncd/timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: timer.c,v 1.2 2005/05/23 19:53:27 ho Exp $ */ +/* $OpenBSD: timer.c,v 1.3 2006/06/02 20:31:48 moritz Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -64,7 +64,7 @@ timer_init(void) /* * Return the number of seconds until the next event happens. Used for * the select() call in the main loop. - */ + */ void timer_next_event(struct timeval *tv) { |