summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-install/ipa-client-install
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-09-06 08:39:24 +0200
committerMartin Kosek <mkosek@redhat.com>2011-09-07 13:03:09 +0200
commitf2fd7588e4efea1ad41a60930ca969802fb9ca42 (patch)
tree16047693187e42124e527eab5aa026f6c28fc92a /ipa-client/ipa-install/ipa-client-install
parent6f95ff8a4b87dbc1d5d49c5c7b8c8825ddf284f4 (diff)
downloadfreeipa-f2fd7588e4efea1ad41a60930ca969802fb9ca42.zip
freeipa-f2fd7588e4efea1ad41a60930ca969802fb9ca42.tar.gz
freeipa-f2fd7588e4efea1ad41a60930ca969802fb9ca42.tar.xz
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/ipa-install/ipa-client-install')
-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 5f0c3c9..890a9fb 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