Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc check if vi recovery files are regular files before tryi...
details: https://anonhg.NetBSD.org/src/rev/586123146217
branches: trunk
changeset: 475864:586123146217
user: christos <christos%NetBSD.org@localhost>
date: Sat Aug 28 03:39:59 1999 +0000
description:
check if vi recovery files are regular files before trying to e-mail them.
Stops a denial of service attack where the user can put a named pipe or
any other device that blocks i/o in /var/tmp/vi.recover/recover.*
[from dynamo%ime.net@localhost]
diffstat:
etc/rc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (20 lines):
diff -r 97dd5ecbcd10 -r 586123146217 etc/rc
--- a/etc/rc Sat Aug 28 01:32:33 1999 +0000
+++ b/etc/rc Sat Aug 28 03:39:59 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc,v 1.128 1999/08/05 20:51:57 christos Exp $
+# $NetBSD: rc,v 1.129 1999/08/28 03:39:59 christos Exp $
# originally from: @(#)rc 8.2 (Berkeley) 3/17/94
# System startup script run by init on autoboot
@@ -345,7 +345,9 @@
if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
echo preserving editor files
for i in $virecovery; do
- sendmail -t < $i
+ if [ -f $i ]; then
+ sendmail -t < $i
+ fi
done
fi
Home |
Main Index |
Thread Index |
Old Index