diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-09-19 10:48:42 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-09-19 10:48:42 +0000 |
commit | e41bf5c8cdf2b61b2e1f94e5dc2141160127d9ed (patch) | |
tree | b44230252bf934c93fda779dbcf81d022c6f4a3d /sbin/isakmpd/x509.c | |
parent | d21ea650b1bc6322fa2d4816990c11140a328490 (diff) |
Use S_IS* macros insted of masking with S_IF* flags. The latter may
have multiple bits set, which leads to surprising results. Spotted by/partly
from Paul Stoeber, more to come. ok ho@ miod@ hshoexer@
Diffstat (limited to 'sbin/isakmpd/x509.c')
-rw-r--r-- | sbin/isakmpd/x509.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |