Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-04-17 14:11:14 UTC
Modified files:
ChangeLog tools/linesync/linesync.sh
Log message:
Improve screening for invalid input to linesync.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.600 ircu2.10/ChangeLog:1.601
--- ircu2.10/ChangeLog:1.600 Sat Apr 16 20:46:14 2005
+++ ircu2.10/ChangeLog Sun Apr 17 07:11:03 2005
@@ -1,3 +1,8 @@
+2005-04-17 Michael Poole <[EMAIL PROTECTED]>
+
+ * tools/linesync/linesync.sh: Fix typo comment. Check for
+ multiple blocks per line in the linesync input.
+
2005-04-17 Dan <[EMAIL PROTECTED]>
* tools/linesync/linesync.sh: Update to support new syntax and to
Index: ircu2.10/tools/linesync/linesync.sh
diff -u ircu2.10/tools/linesync/linesync.sh:1.3
ircu2.10/tools/linesync/linesync.sh:1.4
--- ircu2.10/tools/linesync/linesync.sh:1.3 Sat Apr 16 20:46:15 2005
+++ ircu2.10/tools/linesync/linesync.sh Sun Apr 17 07:11:04 2005
@@ -140,7 +140,7 @@
exit 1
fi
-# Check wether the file contains any disallowed .conf lines
+# Check whether the file contains any disallowed .conf lines
bad_lines=`egrep '^[^'$ALLOWED_LINES'|#]+' $TMPFILE`
if [ ! -z "$bad_lines" ]; then
echo "The file downloaded in $TMPFILE contains the following
disallowed line(s):"
@@ -148,6 +148,14 @@
exit 1
fi
+# Check whether somebody tried to sneak a second block onto some line
+bad_lines=`egrep -i '}[ ]*;[ ]*[a-z]+[ ]*{' $TMPFILE`
+if [ ! -z "$bad_lines" ] ; then
+ echo "The file downloaded in $TMPFILE contains the following
multi-block line(s):"
+ echo $bad_lines
+ exit 1
+fi
+
# check our ircd.conf
ircd_setup=`egrep '^# (BEGIN|END) LINESYNC$' $cpath|wc -l`
if [ $ircd_setup != 2 ]; then
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches