Author: jsuchome Date: Wed Apr 6 10:56:44 2011 New Revision: 63728 URL: http://svn.opensuse.org/viewcvs/yast?rev=63728&view=rev Log: - UI option to set kerberos method (bnc#673982) - 2.21.2 Modified: trunk/samba-client/VERSION trunk/samba-client/package/yast2-samba-client.changes trunk/samba-client/src/Samba.ycp trunk/samba-client/src/dialogs.ycp trunk/samba-client/src/routines.ycp Modified: trunk/samba-client/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/VERSION?rev=63728&r1=63727&r2=63728&view=diff ============================================================================== --- trunk/samba-client/VERSION (original) +++ trunk/samba-client/VERSION Wed Apr 6 10:56:44 2011 @@ -1 +1 @@ -2.21.1 +2.21.2 Modified: trunk/samba-client/package/yast2-samba-client.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/package/yast2-samba-client.changes?rev=63728&r1=63727&r2=63728&view=diff ============================================================================== --- trunk/samba-client/package/yast2-samba-client.changes (original) +++ trunk/samba-client/package/yast2-samba-client.changes Wed Apr 6 10:56:44 2011 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Apr 6 10:56:08 CEST 2011 - jsuchome@suse.cz + +- UI option to set kerberos method (bnc#673982) +- 2.21.2 + +------------------------------------------------------------------- Mon Apr 4 14:55:00 CEST 2011 - jsuchome@suse.cz - set the value of 'kerberos method' option for single sign on, Modified: trunk/samba-client/src/Samba.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/Samba.ycp?rev=63728&r1=63727&r2=63728&view=diff ============================================================================== --- trunk/samba-client/src/Samba.ycp (original) +++ trunk/samba-client/src/Samba.ycp Wed Apr 6 10:56:44 2011 @@ -132,9 +132,6 @@ // original value of pam_mount_volumes, for detecting changes list<map> pam_mount_volumes_orig = nil; -// value of kerberos_method, if not empty (bnc#673982) -string kerberos_method = "secrets and keytab"; - // network configuration (to be read from NetworkConfig module) global map network_setup = NetworkConfig::Export (); @@ -476,7 +473,6 @@ ssh_was_enabled = (ssh == true); sshd_was_enabled = sshd; ssh_support = ssh_was_enabled && sshd_was_enabled; - kerberos_method = SambaConfig::GlobalGetStr ("kerberos method", kerberos_method); return ssh_support; } @@ -493,8 +489,13 @@ global define boolean SetSSHSupport (boolean enable) { ssh_support = enable; ssh_modified = (enable != (ssh_was_enabled && sshd_was_enabled)); - // bnc#673982 - SambaConfig::GlobalSetStr ("kerberos method", enable? kerberos_method : nil); + string kerberos_method = SambaConfig::GlobalGetStr ("kerberos method", ""); + // bnc#673982, use "secrets and keytab" as default (=when not set otherwise) + if (ssh_support && kerberos_method == "") + { + kerberos_method = "secrets and keytab"; + SambaConfig::GlobalSetStr ("kerberos method", kerberos_method); + } return enable; } @@ -528,26 +529,6 @@ } /** - * Get the value of kerberos-method option - */ -global define string GetKerberosMethod () { - return kerberos_method; -} - -/** - * Set the new value for kerberos-method option - * return true if the value was changed - */ -global define boolean SetKerberosMethod (string new) { - if (new != kerberos_method) - { - kerberos_method = new; - return true; - } - return false; -} - -/** * Start/Stop and FAM service according to current settings * @param write_only do not start/stop services * @return success Modified: trunk/samba-client/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/dialogs.ycp?rev=63728&r1=63727&r2=63728&view=diff ============================================================================== --- trunk/samba-client/src/dialogs.ycp (original) +++ trunk/samba-client/src/dialogs.ycp Wed Apr 6 10:56:44 2011 @@ -132,12 +132,14 @@ integer gid_max = tointeger (l[1]:"20000"); if (gid_max == nil) gid_max = 20000; boolean dhcp_support = Samba::GetDHCP (); + string kerberos_method = SambaConfig::GlobalGetStr ("kerberos method", ""); // help text, do not translate 'winbind uid', 'winbind gid' string help_text = _("<p>Specify the <b>Range</b> for Samba user and group IDs (<tt>winbind uid</tt> and <tt>winbind gid</tt> values).</p>") + HostsResolutionHelp () + DHCPSupportHelp () + + KerberosMethodHelp () + PAMMountHelp (); boolean hosts_resolution = Samba::GetHostsResolution (); @@ -170,6 +172,10 @@ }); return mount_items; } + list<term> kerberos_methods = maplist (string method, + [ "secrets only", "system keytab", "dedicated keytab", "secrets and keytab"], { + return `item (`id (method), method, method == kerberos_method); + }); term contents = `HBox (`HSpacing (3), `VBox ( `VSpacing (0.4), @@ -188,7 +194,10 @@ // int field label `IntField (`id (`gid_max), _("M&aximum"), 0, 99999, gid_max) )), - `VSpacing (), + `VSpacing (0.2), + // combobox label + `Left (`ComboBox (`id (`kerberos_method), _("&Kerberos Method"), kerberos_methods)), + `VSpacing (0.2), // frame label `Frame (_("Windows Internet Name Service"), `VBox ( HostsResolutionTerm (hosts_resolution), @@ -286,6 +295,9 @@ Samba::SetHostsResolution ( (boolean)UI::QueryWidget (`id (`hosts_resolution), `Value)); + kerberos_method = (string) UI::QueryWidget (`id (`kerberos_method), `Value); + SambaConfig::GlobalSetStr ("kerberos method", kerberos_method == "secrets only" ? nil : kerberos_method); + list<map> updated_volumes = non_cifs_volumes; foreach (integer id, map volume, mount_map, { updated_volumes = add (updated_volumes, volume); @@ -438,7 +450,7 @@ ), `Left ( // checkbox label - `CheckBox (`id(`ssh),_("&Single Sign-On for SSH"), + `CheckBox (`id(`ssh), `opt (`notify), _("&Single Sign-On for SSH"), Samba::GetSSHSupport ()) ), `VSpacing (0.2) Modified: trunk/samba-client/src/routines.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/routines.ycp?rev=63728&r1=63727&r2=63728&view=diff ============================================================================== --- trunk/samba-client/src/routines.ycp (original) +++ trunk/samba-client/src/routines.ycp Wed Apr 6 10:56:44 2011 @@ -428,5 +428,11 @@ _("<p>For example, you may use <tt>/home/%(DOMAIN_USER)</tt> value for <b>Remote Path</b>, <tt>~/</tt> value for <b>Local Mount Point</b> to mount the home directory, together with a value <tt>user=%(DOMAIN_USER)</tt> as a part of <b>Options</b>.</p>"); } +// return help for Kerberos Method +string KerberosMethodHelp () { + // help text for kerberos method option + return _("<p>The value of <b>Kerberos Method</b> sets how kerberos tickets are verified. When <b>Single Sing-on for SSH</b> is used, the default Kerberos Method set by YaST is <tt>secrets and keytab</tt>. See smb.conf manual page for details.</p>"); +} + /* EOF */ } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org