commit yast2-sudo for openSUSE:Factory
Hello community, here is the log from the commit of package yast2-sudo for openSUSE:Factory checked in at Fri Feb 27 16:51:02 CET 2009. -------- --- yast2-sudo/yast2-sudo.changes 2009-01-14 17:53:13.000000000 +0100 +++ /mounts/work_src_done/STABLE/yast2-sudo/yast2-sudo.changes 2009-02-27 16:04:05.311550000 +0100 @@ -1,0 +2,9 @@ +Fri Feb 27 15:03:57 CET 2009 - kmachalkova@suse.cz + +- Do not add extra space to command parameters (bnc#473683) +- Move user selection into pop-up dialog in user/run-as alias config + (bnc#421053) +- Some compatibility fixes (ButtonBoxes, InputFields usage) +- 2.18.1 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-sudo-2.18.0.tar.bz2 New: ---- yast2-sudo-2.18.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-sudo.spec ++++++ --- /var/tmp/diff_new_pack.a26959/_old 2009-02-27 16:50:51.000000000 +0100 +++ /var/tmp/diff_new_pack.a26959/_new 2009-02-27 16:50:51.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package yast2-sudo (Version 2.18.0) +# spec file for package yast2-sudo (Version 2.18.1) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,12 +19,12 @@ Name: yast2-sudo -Version: 2.18.0 +Version: 2.18.1 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-sudo-2.18.0.tar.bz2 +Source0: yast2-sudo-2.18.1.tar.bz2 Prefix: /usr Requires: yast2 yast2-users #ycp::PathComponents @@ -46,7 +46,7 @@ Katarina Machalkova <kmachalkova@suse.cz> %prep -%setup -n yast2-sudo-2.18.0 +%setup -n yast2-sudo-2.18.1 %build %{prefix}/bin/y2tool y2autoconf @@ -80,6 +80,12 @@ /usr/lib/YaST2/servers_non_y2/ag_etc_sudoers %doc %{prefix}/share/doc/packages/yast2-sudo %changelog +* Fri Feb 27 2009 kmachalkova@suse.cz +- Do not add extra space to command parameters (bnc#473683) +- Move user selection into pop-up dialog in user/run-as alias config + (bnc#421053) +- Some compatibility fixes (ButtonBoxes, InputFields usage) +- 2.18.1 * Wed Jan 14 2009 kmachalkova@suse.cz - Show "Really abort?" message only if there is something to save (bnc#458328) ++++++ yast2-sudo-2.18.0.tar.bz2 -> yast2-sudo-2.18.1.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/complex.ycp new/yast2-sudo-2.18.1/src/complex.ycp --- old/yast2-sudo-2.18.0/src/complex.ycp 2009-01-14 16:35:32.000000000 +0100 +++ new/yast2-sudo-2.18.1/src/complex.ycp 2009-02-27 15:03:46.000000000 +0100 @@ -83,17 +83,13 @@ UI::OpenDialog(`opt(`decorated), `VBox( `Frame( _("Add New Host to the Alias"), - `VBox( - `HSpacing(40), - `VSpacing(0.5), - `TextEntry(`id("host_name"),_("Hostname or Network"), new_host), - `VSpacing(0.5) + `MarginBox(1,1, + `InputField(`id("host_name"),_("Hostname or Network"), new_host) ) ), - `HBox( - `PushButton(`id(`ok), Label::OKButton()), - `HSpacing(1), - `PushButton(`id(`cancel), Label::CancelButton()) + `ButtonBox( + `PushButton(`id(`ok), `opt(`default, `okButton), Label::OKButton()), + `PushButton(`id(`cancel), `opt(`cancelButton), Label::CancelButton()) ) )); @@ -116,6 +112,36 @@ return (new_host) ; } +string AddUserDialog( list <string> users ) { + string new_user =""; + + UI::OpenDialog(`opt(`decorated), `VBox( + `Frame( + _("Add New User to the Alias"), + `MarginBox(1,1, + `ComboBox(`id("user_name"),_("Local and System Users (Groups)"), users) + ) + ), + `ButtonBox( + `PushButton(`id(`ok), `opt(`default, `okButton), Label::OKButton()), + `PushButton(`id(`cancel), `opt(`cancelButton), Label::CancelButton()) + ) + )); + + any ret = nil; + while (true) { + ret = UI::UserInput(); + if (ret == `ok) { + new_user = (string) UI::QueryWidget(`id("user_name"), `Value); + break; + } else if (ret == `cancel) { + break; + } + } + UI::CloseDialog(); + return (new_user) ; +} + boolean ValidateCommand(string cmd){ if(FileUtils::Exists(cmd) || contains(Sudo::GetAliasNames("command"), cmd) || cmd == "ALL" ) return true; @@ -126,7 +152,7 @@ } string AddCommandDialog(string c, string p) { - string new_command = c + p; + string new_command = ""; list <string> items = Sudo::GetAliasNames("command"); @@ -151,10 +177,9 @@ ) ), `VSpacing(0.5), - `HBox( - `PushButton(`id(`ok), Label::OKButton()), - `HSpacing(1), - `PushButton(`id(`cancel), Label::CancelButton()) + `ButtonBox( + `PushButton(`id(`ok), `opt(`default, `okButton), Label::OKButton()), + `PushButton(`id(`cancel), `opt(`cancelButton), Label::CancelButton()) ) )); @@ -199,7 +224,7 @@ if(pos != nil) { cmd = substring(it,0, pos); - param = substring(it,pos); + param = substring(it,pos+1); } else { cmd = it; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/dialog-cmnd.ycp new/yast2-sudo-2.18.1/src/dialog-cmnd.ycp --- old/yast2-sudo-2.18.0/src/dialog-cmnd.ycp 2008-11-27 17:15:25.000000000 +0100 +++ new/yast2-sudo-2.18.1/src/dialog-cmnd.ycp 2009-02-27 15:03:46.000000000 +0100 @@ -39,7 +39,7 @@ } term contents = `VBox ( - `TextEntry(`id("cmnd_alias_name"),_("Alias Name (in CAPITALS)")), + `Left(`InputField(`id("cmnd_alias_name"),_("Alias Name (in CAPITALS)"))), `Left(`Label(_("Command Names or Directories in the Alias"))), `Table(`id("cmnd_alias_members"),`header( _("Command"), diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/dialog-host.ycp new/yast2-sudo-2.18.1/src/dialog-host.ycp --- old/yast2-sudo-2.18.0/src/dialog-host.ycp 2008-12-16 17:33:19.000000000 +0100 +++ new/yast2-sudo-2.18.1/src/dialog-host.ycp 2009-02-27 15:03:46.000000000 +0100 @@ -43,7 +43,7 @@ } term contents = `VBox ( - `TextEntry(`id("host_alias_name"),_("Alias Name (in CAPITALS)")), + `Left( `InputField(`id("host_alias_name"),_("Alias Name (in CAPITALS)"))), `Left(`Label(_("Hostnames or Networks in the Alias"))), `Table(`id("host_alias_members"),`header(_("Host Names/Networks")),[]), `Left(`HBox( diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/dialog-runas.ycp new/yast2-sudo-2.18.1/src/dialog-runas.ycp --- old/yast2-sudo-2.18.0/src/dialog-runas.ycp 2008-12-16 17:33:19.000000000 +0100 +++ new/yast2-sudo-2.18.1/src/dialog-runas.ycp 2009-02-27 15:03:46.000000000 +0100 @@ -9,13 +9,9 @@ include "sudo/complex.ycp"; include "sudo/helps.ycp"; -any RedrawRunAsAlias(string name, list <string> members, list <string> users) { +void RedrawRunAsAlias( list <string> members ) { list <term> items = []; - if (name != "") { - UI::ChangeWidget(`id("runas_alias_name"), `Value, name); - } - foreach(string it, members, { items = add(items, `item(`id(it),it)); }); @@ -23,9 +19,6 @@ UI::ChangeWidget(`id("runas_alias_members"),`Items, items); UI::ChangeWidget(`id("remove_member"), `Enabled, (items != [])); - UI::ReplaceWidget(`id("all_run_as_replace"), - `ComboBox(`id("all_run_as"),_("Local and System Users"),sort(string s, string t, users, ``( s < t)))); - } any AddEditRunAsAliasDialog (string what) { @@ -50,33 +43,25 @@ } term contents = `VBox ( - `TextEntry(`id("runas_alias_name"),_("Alias Name (in CAPITALS)")), + `Left(`InputField(`id("runas_alias_name"),_("Alias Name (in CAPITALS)"))), `VSpacing(1), - `HBox( - `VBox( - `opt(`hstretch), - `Left(`ReplacePoint(`id("all_run_as_replace"), - `ComboBox(`id("all_run_as"),_("Local and System Users"), []) - )), - `Table(`id("runas_alias_members"), `opt(`hstretch,`vstretch), `header(_("Alias Members")),[]) - ), - `HSquash( - `VBox ( - `VSpacing(1.1), - `PushButton ( `id ( "add_member" ), `opt ( `hstretch, `key_F3), " " + Label::AddButton() + " "), - `PushButton ( `id ( "remove_member" ), `opt ( `hstretch , `key_F5), " " + Label::DeleteButton() + " "), - `Empty(`opt(`vstretch)) + `VBox( + `Table(`id("runas_alias_members"), `opt(`hstretch,`vstretch), `header(_("Alias Members")),[]), + `HBox( + `PushButton ( `id ( "add_member" ), `opt ( `key_F3), " " + Label::AddButton() + " "), + `PushButton ( `id ( "remove_member" ), `opt ( `key_F5), " " + Label::DeleteButton() + " "), + `HStretch() ) - ) + ) - ) - ); + ); Wizard::SetContentsButtons(caption, contents,HELPS["runas_alias"]:"",Label::CancelButton(), Label::OKButton()); Wizard::HideAbortButton(); UI::ChangeWidget (`id("runas_alias_name"), `ValidChars, "_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + UI::ChangeWidget (`id("runas_alias_name"), `Value, name); - RedrawRunAsAlias(name, alias_members,users); + RedrawRunAsAlias(alias_members); any ret = nil; while(true) { @@ -109,23 +94,24 @@ Sudo::SetModified(); break; /* back */ - }else if(ret == `back) { + }else if(ret == `back) { break; /* add users*/ - }else if(ret == "add_member"){ - string new_member = (string) UI::QueryWidget(`id("all_run_as"),`Value); + } else if(ret == "add_member"){ + string new_member = AddUserDialog( users ); - alias_members = add(alias_members, new_member); - users = filter(string s, users, ``(s != new_member)); - RedrawRunAsAlias("",alias_members, users); + if (new_member != "") + { + alias_members = add(alias_members, new_member); + users = filter(string s, users, ``(s != new_member)); + RedrawRunAsAlias(alias_members); + } /* delete users */ - }else if (ret == "remove_member"){ - string current_item = (string) UI::QueryWidget(`id("runas_alias_members"), `CurrentItem); - alias_members = filter(string s, alias_members, ``(s != current_item)); - users = add(users, current_item); - UI::ReplaceWidget(`id("all_run_as_replace"), - `ComboBox(`id("all_run_as"),_("Local and System Users"),users)); - RedrawRunAsAlias("",alias_members, users); + } else if (ret == "remove_member"){ + string current_item = (string) UI::QueryWidget(`id("runas_alias_members"), `CurrentItem); + alias_members = filter(string s, alias_members, ``(s != current_item)); + users = add(users, current_item); + RedrawRunAsAlias(alias_members); /* unknown */ } else { y2error("unexpected retcode: %1", ret); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/dialog-spec.ycp new/yast2-sudo-2.18.1/src/dialog-spec.ycp --- old/yast2-sudo-2.18.0/src/dialog-spec.ycp 2008-12-16 17:33:19.000000000 +0100 +++ new/yast2-sudo-2.18.1/src/dialog-spec.ycp 2009-02-27 15:03:46.000000000 +0100 @@ -11,12 +11,10 @@ include "sudo/complex.ycp"; void RedrawCmndTable (list <string> commands) { - if (commands != []) { - list <term> items = UpdateCmdList(commands); + list <term> items = UpdateCmdList(commands); - UI::ChangeWidget(`id("commands"),`Items, items); - EnableDisableButtons("command_edit", "command_remove", items); - } + UI::ChangeWidget(`id("commands"),`Items, items); + EnableDisableButtons("command_edit", "command_remove", items); } @@ -128,6 +126,7 @@ string new_command = AddCommandDialog("",""); if(new_command != "" && !contains(commands, new_command)) { + y2milestone("%1", new_command); commands = add(commands, new_command); RedrawCmndTable(commands); } @@ -137,8 +136,11 @@ term it = (term) UI::QueryWidget(`id("commands"), `Item(current_item)); string new_command = AddCommandDialog(it[1]:"", it[2]:""); - commands[current_item] = new_command; - RedrawCmndTable(commands); + if( new_command !="") + { + commands[current_item] = new_command; + RedrawCmndTable(commands); + } /* remove command */ } else if (ret == "command_remove") { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/dialog-user.ycp new/yast2-sudo-2.18.1/src/dialog-user.ycp --- old/yast2-sudo-2.18.0/src/dialog-user.ycp 2008-12-16 17:33:19.000000000 +0100 +++ new/yast2-sudo-2.18.1/src/dialog-user.ycp 2009-02-27 15:03:46.000000000 +0100 @@ -9,22 +9,15 @@ include "sudo/complex.ycp"; include "sudo/helps.ycp"; -any RedrawUserAlias(string name, list <string> members, list <string> users) { +void RedrawUserAlias( list <string> members ) { list <term> items = []; - if (name != "") { - UI::ChangeWidget(`id("user_alias_name"), `Value, name); - } - foreach(string it, members, { items = add(items, `item(`id(it),it)); }); + UI::ChangeWidget(`id("user_alias_members"),`Items, items); UI::ChangeWidget(`id("remove_member"), `Enabled, (items != [])); - - UI::ReplaceWidget(`id("all_users_replace"), - `ComboBox(`id("all_users"),_("Local and System Users"), sort(string s, string t, users, ``( s < t)))); - } any AddEditUserAliasDialog (string what) { @@ -47,35 +40,25 @@ name = (string) it["name"]:""; caption = _("Existing User Alias"); } + users = (list <string>) sort( string s1, string s2, users, ``( s1 < s2 ) ); term contents = `VBox ( - `TextEntry(`id("user_alias_name"),_("Alias Name (in CAPITALS)")), + `Left( `InputField(`id("user_alias_name"),_("Alias Name (in CAPITALS)"))), `VSpacing(1), - `HBox( - `VBox( - `opt(`hstretch), - `Left(`ReplacePoint(`id("all_users_replace"), - `ComboBox(`id("all_users"),_("Local and System Users"), []) - )), - `Table(`id("user_alias_members"), `opt(`hstretch,`vstretch), `header(_("Alias Members")),[]) - ), - `HSquash( - `VBox ( - `VSpacing(1.1), - `PushButton ( `id ( "add_member" ), `opt ( `hstretch, `key_F3 ), " " + Label::AddButton() + " "), - `PushButton ( `id ( "remove_member" ), `opt ( `hstretch, `key_F5 ), " " + Label::DeleteButton() + " "), - `Empty(`opt(`vstretch)) - ) - ) - - ) + `Table(`id("user_alias_members"), `opt(`hstretch,`vstretch), `header(_("Alias Members")),[]), + `HBox ( + `PushButton ( `id ( "add_member" ), `opt ( `key_F3 ), " " + Label::AddButton() + " "), + `PushButton ( `id ( "remove_member" ), `opt ( `key_F5 ), " " + Label::DeleteButton() + " "), + `HStretch() + ) ); Wizard::SetContentsButtons(caption, contents,HELPS["user_alias"]:"",Label::CancelButton(), Label::OKButton()); Wizard::HideAbortButton(); UI::ChangeWidget (`id("user_alias_name"), `ValidChars, "_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + UI::ChangeWidget(`id("user_alias_name"), `Value, name); - RedrawUserAlias(name, alias_members,users); + RedrawUserAlias( alias_members ); any ret = nil; while(true) { @@ -112,23 +95,24 @@ break; /* add users*/ }else if(ret == "add_member"){ - string new_member = (string) UI::QueryWidget(`id("all_users"),`Value); + string new_member = AddUserDialog( users ); - alias_members = add(alias_members, new_member); - users = filter(string s, users, ``(s != new_member)); - RedrawUserAlias("",alias_members, users); + if (new_member != "") + { + alias_members = add(alias_members, new_member); + users = filter(string s, users, ``(s != new_member)); + RedrawUserAlias( alias_members ); + } /* delete users */ - }else if (ret == "remove_member"){ + }else if (ret == "remove_member"){ string current_item = (string) UI::QueryWidget(`id("user_alias_members"), `CurrentItem); alias_members = filter(string s, alias_members, ``(s != current_item)); users = add(users, current_item); - UI::ReplaceWidget(`id("all_users_replace"), - `ComboBox(`id("all_users"),_("Local and System Users"),users)); - RedrawUserAlias("",alias_members, users); + RedrawUserAlias(alias_members); /* unknown */ } else { y2error("unexpected retcode: %1", ret); - continue; + continue; } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/VERSION new/yast2-sudo-2.18.1/VERSION --- old/yast2-sudo-2.18.0/VERSION 2009-01-14 16:39:05.000000000 +0100 +++ new/yast2-sudo-2.18.1/VERSION 2009-02-27 15:59:47.000000000 +0100 @@ -1 +1 @@ -2.18.0 +2.18.1 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de