File 0024-ifup-fail-early-for-too-long-interface-names.patch of Package sysconfig.openSUSE_12.1_Update

From de3a73f4cc7c46ebac7e34171c2f6465c7a57d0d Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.com>
Date: Mon, 15 Oct 2012 12:25:06 +0200
References: bnc#784952
Subject: [PATCH 06/11] ifup: fail early for too long interface names

---
 scripts/ifup |    7 +++++++
 1 Datei geändert, 7 Zeilen hinzugefügt(+)

diff --git a/scripts/ifup b/scripts/ifup
index 95da1b0..cb62ccc 100755
--- a/scripts/ifup
+++ b/scripts/ifup
@@ -144,6 +144,13 @@ if [ -z "$CONFIG" ] ; then
 fi
 
 case $SCRIPTNAME in
+	ifup)
+		if [ ${#INTERFACE} -gt 15 ] ; then
+			message "`printf "    %-9s: name too long" "$INTERFACE"`"
+			exit $R_ERROR
+			#exit $R_NOCONFIG
+		fi
+	;;
 	ifprobe)
 		IFUPFILE=$RUN_FILES_BASE/ifup-$INTERFACE
 		if [ ! -e "$IFUPFILE" ] ; then
-- 
1.7.10.4

openSUSE Build Service is sponsored by