James W. Mills has posted comments on this change.

Change subject: packaging: setup: legacy: db: parse pgpass file with escapes
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.ovirt.org/#/c/24407/3/packaging/setup/plugins/ovirt-engine-setup/legacy/database.py
File packaging/setup/plugins/ovirt-engine-setup/legacy/database.py:

Line 68:                 'r',
Line 69:             ) as f:
Line 70:                 for l in f:
Line 71:                     # There are four ":" field seperators.  Anything
Line 72:                     # else is part of a password.
> are you sure? it is not based on documentation[1]
Though the documentation states that ':' should be escapred, I can verify from 
this installation that the .pgpass file is not escaping them when creating this 
file.
Line 73:                     colon_counter = 0
Line 74:                     if l and l[-1] != '\n':
Line 75:                         l += '\n'
Line 76:                     d = []


Line 80:                         if escape:
Line 81:                             escape = False
Line 82:                             s += c
Line 83:                         else:
Line 84:                             if (c == ':' and colon_counter < 4) or c 
== '\n':
> please replace counter with len(d) ?
OK.  Updated patch coming.
Line 85:                                 if c == ':':
Line 86:                                     colon_counter += 1
Line 87:                                 d.append(s)
Line 88:                                 s = ''


-- 
To view, visit http://gerrit.ovirt.org/24407
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4727d1c926cefa44c3a98382983126b8f9873051
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: James W. Mills <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to