Author: jsuchome Date: Thu Apr 10 15:56:53 2008 New Revision: 46360 URL: http://svn.opensuse.org/viewcvs/yast?rev=46360&view=rev Log: - if no KDC is defined, try to propose reasonable one (fate#302863) - 2.16.7 Modified: trunk/kerberos-client/VERSION trunk/kerberos-client/package/yast2-kerberos-client.changes trunk/kerberos-client/src/Kerberos.ycp trunk/kerberos-client/testsuite/tests/Read.out trunk/kerberos-client/yast2-kerberos-client.spec.in Modified: trunk/kerberos-client/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/kerberos-client/VERSION?rev=46360&r1=46359&r2=46360&view=diff ============================================================================== --- trunk/kerberos-client/VERSION (original) +++ trunk/kerberos-client/VERSION Thu Apr 10 15:56:53 2008 @@ -1 +1 @@ -2.16.6 +2.16.7 Modified: trunk/kerberos-client/package/yast2-kerberos-client.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/kerberos-client/package/yast2-kerberos-client.changes?rev=46360&r1=46359&r2=46360&view=diff ============================================================================== --- trunk/kerberos-client/package/yast2-kerberos-client.changes (original) +++ trunk/kerberos-client/package/yast2-kerberos-client.changes Thu Apr 10 15:56:53 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Apr 10 15:42:32 CEST 2008 - jsuchome@suse.cz + +- if no KDC is defined, try to propose reasonable one (fate#302863) +- 2.16.7 + +------------------------------------------------------------------- Wed Apr 2 15:42:01 CEST 2008 - ug@suse.de - rnc file fixed Modified: trunk/kerberos-client/src/Kerberos.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/kerberos-client/src/Kerberos.ycp?rev=46360&r1=46359&r2=46360&view=diff ============================================================================== --- trunk/kerberos-client/src/Kerberos.ycp (original) +++ trunk/kerberos-client/src/Kerberos.ycp Thu Apr 10 15:56:53 2008 @@ -18,6 +18,7 @@ import "Arch"; import "FileUtils"; +import "Hostname"; import "Label"; import "Mode"; import "Package"; @@ -334,19 +335,13 @@ SCR::Execute (.target.bash, sformat("/usr/bin/touch /etc/krb5.conf")); // propose some good values, if there are install defaults - if (default_domain == "" && FileUtils::Exists ("/bin/ypdomainname")) + if (default_domain == "") { - map out = (map) SCR::Execute (.target.bash_output, "/bin/ypdomainname"); - default_domain = deletechars (out["stdout"]:"", "\n"); - } - if (default_domain == "" && FileUtils::Exists ("/bin/domainname")) - { - map out = (map) SCR::Execute (.target.bash_output, "/bin/domainname"); - default_domain = deletechars (out["stdout"]:"", "\n"); + default_domain = Hostname::CurrentDomain (); } // now, check DNS status (Fate 301812) - if (FileUtils::Exists ("/usr/bin/dig") && default_domain != "" && + if (FileUtils::Exists ("/usr/bin/dig") && default_domain != "" && !Mode::test ()) { map out = (map) SCR::Execute (.target.bash_output, sformat ("dig TXT _kerberos.%1 +short", default_domain)); @@ -389,13 +384,20 @@ map out = (map) SCR::Execute (.target.bash_output, "/usr/bin/ypwhich"); kdc = deletechars (out["stdout"]:"", "\n"); } + if ((kdc == "" || kdc == "MY.COMPUTER" || kdc == "kerberos.example.com") && + FileUtils::Exists ("/usr/bin/host")) + { + string proposed = "kdc." + Hostname::CurrentDomain (); + map m = (map)SCR::Execute (.target.bash_output, + sformat ("LANG=C /usr/bin/host %1 | /bin/grep address", proposed)); + if (m["exit"]:1 == 0) + kdc = proposed; + y2milestone ("no kdc defined, proposing: %1", kdc); + } // read ssh support y2debug ("ssh_config sections: %1", SCR::Dir (.etc.ssh.ssh_config.s)); - string hostname = "*"; - map out = (map) SCR::Execute (.target.bash_output, "LANG=C /bin/hostname"); - if (out["stderr"]:nil == "") - hostname = deletechars(out["stdout"]:"", "\n"); + string hostname = Hostname::CurrentHostname (); ssh_support = nil; foreach (string sec, SCR::Dir (.etc.ssh.ssh_config.s), ``{ Modified: trunk/kerberos-client/testsuite/tests/Read.out URL: http://svn.opensuse.org/viewcvs/yast/trunk/kerberos-client/testsuite/tests/Read.out?rev=46360&r1=46359&r2=46360&view=diff ============================================================================== --- trunk/kerberos-client/testsuite/tests/Read.out (original) +++ trunk/kerberos-client/testsuite/tests/Read.out Thu Apr 10 15:56:53 2008 @@ -26,9 +26,7 @@ Read .etc.krb5_conf.v.pam."subsequent_prompt" nil Read .etc.krb5_conf.v.pam."banner" ["haha"] Read .etc.krb5_conf.v.pkinit.trusted_servers nil -Execute .target.bash_output "/bin/ypdomainname" $["stdout":"password: "] Dir .etc.ssh.ssh_config.s: ["*"] -Execute .target.bash_output "LANG=C /bin/hostname" $["stdout":"password: "] Dir .etc.ssh.ssh_config.s: ["*"] Dir .etc.ssh.ssh_config.v."*": ["GSSAPIAuthentication", "GSSAPIDelegateCredentials"] Read .etc.ssh.ssh_config.v."*"."GSSAPIAuthentication" "yes" @@ -45,7 +43,6 @@ Execute .target.bash_output "pam-config -q --krb5" $["stdout":"password: "] Execute .target.bash "/usr/bin/touch /etc/krb5.conf" 0 Dir .etc.ssh.ssh_config.s: ["*"] -Execute .target.bash_output "LANG=C /bin/hostname" $["stdout":"password: "] Dir .etc.ssh.ssh_config.s: ["*"] Dir .etc.ssh.ssh_config.v."*": ["GSSAPIAuthentication", "GSSAPIDelegateCredentials"] Read .etc.ssh.ssh_config.v."*"."GSSAPIAuthentication" "yes" Modified: trunk/kerberos-client/yast2-kerberos-client.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/kerberos-client/yast2-kerberos-client.spec.in?rev=46360&r1=46359&r2=46360&view=diff ============================================================================== --- trunk/kerberos-client/yast2-kerberos-client.spec.in (original) +++ trunk/kerberos-client/yast2-kerberos-client.spec.in Thu Apr 10 15:56:53 2008 @@ -4,7 +4,10 @@ BuildRequires: doxygen perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-pam yast2-testsuite # new Pam.ycp API -Requires: yast2 yast2-pam >= 2.14.0 +Requires: yast2-pam >= 2.14.0 + +# Hostname::CurrentDomain, CurrentHostname +Requires: yast2 >= 2.16.48 BuildArchitectures: noarch -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org