diff options
author | Harshavardhana Ranganath <harsha@gluster.com> | 2009-12-04 20:43:01 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-12-06 02:30:13 -0800 |
commit | 9cedbb537f648a38606d14c425caa952dd5d0049 (patch) | |
tree | a112195679838b52682cacb6eb85d83af22c9bad | |
parent | a2d7ca2ee22de61bf43525e4a8a2928ce6dd8851 (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.py | 1 | ||||
-rwxr-xr-x | extras/volgen/glusterfs-volgen.in | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/extras/volgen/CreateVolfile.py b/extras/volgen/CreateVolfile.py index b51be766a..2cca8903b 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 5d9c579cf..bd19d1227 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 |