summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-08-30 16:32:40 +0200
committerMartin Kosek <mkosek@redhat.com>2011-09-07 13:02:43 +0200
commitd0ce604b4d69d7f6fa5e0bb81647f839abd6291d (patch)
treee26f64ecdf6335410fe588eb8601a522943aeed8 /ipa-client
parent95beb84464b59813c050aa87fb39aea5a0bf6c39 (diff)
downloadfreeipa.git-d0ce604b4d69d7f6fa5e0bb81647f839abd6291d.tar.gz
freeipa.git-d0ce604b4d69d7f6fa5e0bb81647f839abd6291d.tar.xz
freeipa.git-d0ce604b4d69d7f6fa5e0bb81647f839abd6291d.zip
Fix permissions in installers
Fix permissions for (configuration) files produced by ipa-server-install or ipa-client-install. This patch is needed when root has a umask preventing files from being world readable. https://fedorahosted.org/freeipa/ticket/1644
Diffstat (limited to 'ipa-client')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install9
1 files changed, 6 insertions, 3 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 5f0c3c92..890a9fb9 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -345,8 +345,10 @@ def configure_ipa_conf(fstore, cli_basedn, cli_realm, cli_domain, cli_server):
opts.append({'name':'global', 'type':'section', 'value':defopts})
opts.append({'name':'empty', 'type':'empty'})
- fstore.backup_file("/etc/ipa/default.conf")
- ipaconf.newConf("/etc/ipa/default.conf", opts)
+ target_fname = '/etc/ipa/default.conf'
+ fstore.backup_file(target_fname)
+ ipaconf.newConf(target_fname, opts)
+ os.chmod(target_fname, 0644)
return 0
@@ -519,7 +521,8 @@ def configure_krb5_conf(fstore, cli_basedn, cli_realm, cli_domain, cli_server, c
logging.debug("Writing Kerberos configuration to %s:\n%s"
% (filename, krbconf.dump(opts)))
- krbconf.newConf(filename, opts);
+ krbconf.newConf(filename, opts)
+ os.chmod(filename, 0644)
return 0