From f819f964e2e54969d9f657ec7ae84b5e9654e1b9 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 22 Feb 2008 15:11:28 +0000 Subject: [PATCH] Updated file writing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9084 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/client/events/corefunctions.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gosa-si/client/events/corefunctions.pm b/gosa-si/client/events/corefunctions.pm index 740467a6f..99d0547d6 100644 --- a/gosa-si/client/events/corefunctions.pm +++ b/gosa-si/client/events/corefunctions.pm @@ -213,7 +213,7 @@ sub new_ldap_config { # Setup ldap.conf my $file1; my $file2; - open(file1, "> $ldap_config"); + open(file1, ">:utf8", "$ldap_config"); print file1 "# This file was automatically generated by gosa-si-client. Do not change.\n"; print file1 "URI"; foreach $element (@ldap_uris) { @@ -227,8 +227,8 @@ sub new_ldap_config { daemon_log("wrote $ldap_config", 5); # Setup pam_ldap.conf / libnss_ldap.conf - open(file1, "> $pam_config"); - open(file2, "> $nss_config"); + open(file1, ">:utf8", "$pam_config"); + open(file2, ">:utf8", "$nss_config"); print file1 "# This file was automatically generated by gosa-si-client. Do not change.\n"; print file2 "# This file was automatically generated by gosa-si-client. Do not change.\n"; print file1 "uri"; @@ -252,11 +252,11 @@ sub new_ldap_config { # Create goto.secrets if told so - for compatibility reasons if (defined $goto_admin){ - open(file1, "> /etc/goto/secret"); + open(file1, ">:utf8", "/etc/goto/secret"); close(file1); chown(0,0, "/etc/goto/secret"); chmod(0600, "/etc/goto/secret"); - open(file1, "> /etc/goto/secret"); + open(file1, ">:utf8", "/etc/goto/secret"); print file1 "GOTOADMIN=\"$goto_admin\"\nGOTOSECRET=\"$goto_secret\"\n"; close(file1); daemon_log("wrote /etc/goto/secret", 5); @@ -269,7 +269,7 @@ sub new_ldap_config { my $ldap_server= $ldap_uris[0]; $ldap_server=~ s/^ldap:\/\/([^:]+).*$/$1/; - open(file1, "> $cfg_name"); + open(file1, ">:utf8", "$cfg_name"); print file1 "LDAP_BASE=\"$ldap_base\"\n"; print file1 "LDAP_SERVER=\"$ldap_server\"\n"; print file1 "ADMIN_BASE=\"$admin_base\"\n"; -- 2.30.2