summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarshavardhana Ranganath <harsha@gluster.com>2009-12-04 20:48:09 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-12-06 09:28:52 -0800
commitf57ef39dbd46389dc9763bf291b08a0ba762b707 (patch)
treed3f6d8edcab04882ff91c42f3970ba243af92b2b
parent2449ed76ee63375846e62656e98cb88cdfce51ed (diff)
Fix critical argument validation bug found during initial testing.
Signed-off-by: Harshavardhana <harsha@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 437 (Fix critical argument validation check on Fedora11 systems) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=437
-rw-r--r--extras/volgen/CreateVolfile.py1
-rwxr-xr-xextras/volgen/glusterfs-volgen.in10
2 files changed, 10 insertions, 1 deletions
diff --git a/extras/volgen/CreateVolfile.py b/extras/volgen/CreateVolfile.py
index b51be76..2cca890 100644
--- a/extras/volgen/CreateVolfile.py
+++ b/extras/volgen/CreateVolfile.py
@@ -42,6 +42,7 @@ class CreateVolfile:
cmdline = string.join (sys.argv, ' ')
+
mount_fd.write ("## file auto generated by %s (mount.vol)\n" %
sys.argv[0])
mount_fd.write ("# Cmd line:\n")
diff --git a/extras/volgen/glusterfs-volgen.in b/extras/volgen/glusterfs-volgen.in
index 5d9c579..bd19d12 100755
--- a/extras/volgen/glusterfs-volgen.in
+++ b/extras/volgen/glusterfs-volgen.in
@@ -27,10 +27,14 @@ def args2dict(args):
keyvalue = {}
for arg in args:
+ if int(arg.find(':')) == -1:
+ continue
first = arg.split(':')[0]
keyvalue[first] = []
for arg in args:
+ if int(arg.find(':')) == -1:
+ continue
first = arg.split(':')[0]
if arg.split(':')[1] not in keyvalue[first]:
if arg.split(':')[1][0] != '/':
@@ -43,7 +47,11 @@ def args2dict(args):
def args2array(args):
array = []
- array = args
+
+ for arg in args:
+ if int(arg.find(':')) == -1:
+ continue
+ array.append(arg)
return array