]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
gateway: modify auth-openvpn script to ignore comments and blank lines 218/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 24 Mar 2016 20:45:23 +0000 (16:45 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 24 Mar 2016 21:31:56 +0000 (17:31 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/gateway/templates/auth-openvpn

index bd82544ad2b62bd7c781c1e4dfc2c25fab9aeaf8..4c346c0bd40fc727098bf9e72f798d07a848d39c 100644 (file)
@@ -43,6 +43,8 @@ def authenticate():
             for line in f:
                 assert line.endswith('\n')
                 line = line[:-1]
+                if line.startswith("#") or len(line) == 0:
+                    continue
                 (username, salt, correct) = line.split(' ', 2)
                 if username == wanted:
                     return (salt, correct)