diff options
| author | Seth Vidal <skvidal@fedoraproject.org> | 2008-01-16 10:56:20 -0500 |
|---|---|---|
| committer | Seth Vidal <skvidal@fedoraproject.org> | 2008-01-16 10:56:20 -0500 |
| commit | 821760d6dc59cfb89dfb90095ebb85fd00307164 (patch) | |
| tree | 54bb70974195f9cd81ddb803dc9c2dcbf8ecc4a2 /func | |
| parent | 0556acbe5ed39c36d38b99dd3ae455691964a1e1 (diff) | |
apply patch from Jan Pazdziora to fix rather stupid permissions problem
Diffstat (limited to 'func')
| -rw-r--r-- | func/certs.py | 6 | ||||
| -rwxr-xr-x | func/minion/utils.py | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/func/certs.py b/func/certs.py index e454cc4..bb44b0d 100644 --- a/func/certs.py +++ b/func/certs.py @@ -54,9 +54,9 @@ def make_csr(pkey, dest=None, cn=None): req.set_pubkey(pkey) req.sign(pkey, 'md5') if dest: - destfo = open(dest, 'w') - destfo.write(crypto.dump_certificate_request(crypto.FILETYPE_PEM, req)) - destfo.close() + destfd = os.open(dest, os.O_RDWR|os.O_CREAT, 0644) + os.write(destfd, crypto.dump_certificate_request(crypto.FILETYPE_PEM, req)) + os.close(destfd) return req diff --git a/func/minion/utils.py b/func/minion/utils.py index 4ed0bf4..bb715b3 100755 --- a/func/minion/utils.py +++ b/func/minion/utils.py @@ -109,13 +109,13 @@ def create_minion_keys(): if result: - cert_fo = open(cert_file, 'w') - cert_fo.write(cert_string) - cert_fo.close() + cert_fd = os.open(cert_file, os.O_RDWR|os.O_CREAT, 0644) + os.write(cert_fd, cert_string) + os.close(cert_fd) - ca_cert_fo = open(ca_cert_file, 'w') - ca_cert_fo.write(ca_cert_string) - ca_cert_fo.close() + ca_cert_fd = os.open(ca_cert_file, os.O_RDWR|os.O_CREAT, 0644) + os.write(ca_cert_fd, ca_cert_string) + os.close(ca_cert_fd) def submit_csr_to_master(csr_file, master_uri): """" |
