Skip to contentSkip to conversation

conga/luci/site/luci/Extensions FenceHandler.py

Cluster-devel [email protected] 1 participant 1 message Jul 24, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-07-24 15:00:30

Modified files:
luci/site/luci/Extensions: FenceHandler.py

Log message:

	Fix 249097

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.6&r2=1.4.2.7

luci/site/luci/Extensions/FenceHandler.py +10 -1
@@ -759,7 +759,11 @@
 	try:
 		pwd = form['passwd'].strip()
 		if not pwd:
-			raise Exception, 'blank'
+			if form['passwd']:
+				# allow passwords consisting of nothing but whitespace
+				fencedev.addAttribute('passwd', form['passwd'])
+			else:
+				raise Exception, 'blank'
 		fencedev.addAttribute('passwd', pwd)
 		has_passwd = True
 	except Exception, e:
@@ -1136,6 +1140,11 @@
 	fenceinst = Device()
 	fenceinst.addAttribute('name', parent_name)
 
+	if form.has_key('option'):
+		option = form['option'].strip()
+		if option:
+			fenceinst.addAttribute('option', option)
+
 	try:
 		ret = FI_VALIDATE[fence_agent](form, fenceinst)
 		if len(ret) > 0: