diff options
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/log.c | 4 | ||||
-rw-r--r-- | sbin/isakmpd/ui.c | 4 | ||||
-rw-r--r-- | sbin/isakmpd/x509.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sbin/isakmpd/log.c b/sbin/isakmpd/log.c index f36d364515c..77376d47148 100644 --- a/sbin/isakmpd/log.c +++ b/sbin/isakmpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.58 2005/05/26 05:35:55 moritz Exp $ */ +/* $OpenBSD: log.c,v 1.59 2006/09/19 10:48:41 otto Exp $ */ /* $EOM: log.c,v 1.30 2000/09/29 08:19:23 niklas Exp $ */ /* @@ -413,7 +413,7 @@ log_packet_init(char *newname) /* XXX This is a fstat! */ if (monitor_stat(pcaplog_file, &st) == 0) { /* Sanity checks. */ - if ((st.st_mode & S_IFMT) != S_IFREG) { + if (!S_ISREG(st.st_mode)) { log_print("log_packet_init: existing capture file is " "not a regular file"); return; diff --git a/sbin/isakmpd/ui.c b/sbin/isakmpd/ui.c index 0f3df0007f3..121cf022f11 100644 --- a/sbin/isakmpd/ui.c +++ b/sbin/isakmpd/ui.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ui.c,v 1.48 2006/09/01 00:24:06 mpf Exp $ */ +/* $OpenBSD: ui.c,v 1.49 2006/09/19 10:48:41 otto Exp $ */ /* $EOM: ui.c,v 1.43 2000/10/05 09:25:12 niklas Exp $ */ /* @@ -84,7 +84,7 @@ ui_init(void) /* Don't overwrite a file, i.e '-f /etc/isakmpd/isakmpd.conf'. */ if (lstat(ui_fifo, &st) == 0) { - if ((st.st_mode & S_IFMT) == S_IFREG) { + if (S_ISREG(st.st_mode)) { errno = EEXIST; log_fatal("ui_init: could not create FIFO \"%s\"", ui_fifo); diff --git a/sbin/isakmpd/x509.c b/sbin/isakmpd/x509.c index eeaefefc7f5..a003d8a395e 100644 --- a/sbin/isakmpd/x509.c +++ b/sbin/isakmpd/x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.c,v 1.106 2006/06/02 19:35:55 hshoexer Exp $ */ +/* $OpenBSD: x509.c,v 1.107 2006/09/19 10:48:41 otto Exp $ */ /* $EOM: x509.c,v 1.54 2001/01/16 18:42:16 ho Exp $ */ /* @@ -608,7 +608,7 @@ x509_read_from_dir(X509_STORE *ctx, char *name, int hash) continue; } - if (!(sb.st_mode & S_IFREG)) { + if (!S_ISREG(sb.st_mode)) { close(fd); continue; } @@ -690,7 +690,7 @@ x509_read_crls_from_dir(X509_STORE *ctx, char *name) continue; } - if (!(sb.st_mode & S_IFREG)) { + if (!S_ISREG(sb.st_mode)) { close(fd); continue; } |