David Steele <david@pgmasters.net> writes:
> [ client-key-perm-003.patch ]
Pushed with a bit of copy-editing of the comments.
> So, to test the new functionality, just add this snippet on line 57 of
> 001_ssltests.pl:
> chmod 0640, "$cert_tempdir/client.key"
> or die "failed to change permissions on $cert_tempdir/client.key: $!";
> system_or_bail("sudo chown root $cert_tempdir/client.key");
> If you can think of a way to add this to the tests I'm all ears. Perhaps
> we could add these lines commented out and explain what they are for?
I believe we have some precedents for invoking this sort of test
optionally if an appropriate environment variable is set. However,
I'm having a pretty hard time seeing that there's any real use-case
for a test set up like this. The TAP tests are meant for automatic
testing, and nobody is going to run automatic tests in an environment
where they'd be allowed to sudo. (Or at least I sure hope nobody
working on this project is that naive.)
If somebody wants to put this in despite that, I'd merely suggest
that the server-side logic ought to get exercised too.
regards, tom lane