diff options
author | dm <dm@cvs.openbsd.org> | 1997-08-13 21:09:28 +0000 |
---|---|---|
committer | dm <dm@cvs.openbsd.org> | 1997-08-13 21:09:28 +0000 |
commit | 44dbc9719c1c86a71535213a3f43c4cee4a4b770 (patch) | |
tree | b5ff88183e0ab63766e4c4ce0d42470f689f90ff /libexec/mail.local | |
parent | 467e43fd9f5184a25ed9b8bc7c77d16abdb793ba (diff) |
a little extra paranoia
Diffstat (limited to 'libexec/mail.local')
-rw-r--r-- | libexec/mail.local/mail.local.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libexec/mail.local/mail.local.c b/libexec/mail.local/mail.local.c index b4af745df8f..e77536d5bf8 100644 --- a/libexec/mail.local/mail.local.c +++ b/libexec/mail.local/mail.local.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)mail.local.c 5.6 (Berkeley) 6/19/91";*/ -static char rcsid[] = "$Id: mail.local.c,v 1.16 1997/07/25 19:41:18 mickey Exp $"; +static char rcsid[] = "$Id: mail.local.c,v 1.17 1997/08/13 21:09:27 dm Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -393,8 +393,8 @@ retry: goto bad; } } else { - if (sb.st_nlink != 1 || S_ISLNK(sb.st_mode)) { - err(NOTFATAL, "%s: linked file", path); + if (sb.st_nlink != 1 || !S_ISREG(sb.st_mode)) { + err(NOTFATAL, "%s: linked or special file", path); goto bad; } if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK, @@ -412,8 +412,8 @@ retry: goto bad; } /* paranoia? */ - if (fsb.st_nlink != 1 || S_ISLNK(fsb.st_mode)) { - err(NOTFATAL, "%s: linked file", path); + if (fsb.st_nlink != 1 || !S_ISREG(fsb.st_mode)) { + err(NOTFATAL, "%s: linked or special file", path); goto bad; } } |