Hello community,
here is the log from the commit of package yast2-sudo
checked in at Mon Dec 1 18:15:24 CET 2008.
--------
--- yast2-sudo/yast2-sudo.changes 2008-11-18 17:27:48.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-sudo/yast2-sudo.changes 2008-12-01 13:21:43.332313000 +0100
@@ -1,0 +2,15 @@
+Mon Dec 1 13:11:02 CET 2008 - kmachalkova@suse.cz
+
+- Focusing correct item when changing priority of rules (bnc#449754)
+- Fixed parsing of multi-line rules/aliases (patch by jreidinger)
+ (bnc#449768)
+- 2.17.2
+
+-------------------------------------------------------------------
+Thu Nov 27 17:15:30 CET 2008 - kmachalkova@suse.cz
+
+- Not so strict requirements on return value from SCR::Read
+ ( list <any> instead of list <string> )(bnc#448159)
+- Button re-labelling to comply to style-guide(bnc#448159)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-sudo-2.17.1.tar.bz2
New:
----
yast2-sudo-2.17.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-sudo.spec ++++++
--- /var/tmp/diff_new_pack.f19400/_old 2008-12-01 18:14:15.000000000 +0100
+++ /var/tmp/diff_new_pack.f19400/_new 2008-12-01 18:14:15.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-sudo (Version 2.17.1)
+# spec file for package yast2-sudo (Version 2.17.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-sudo
-Version: 2.17.1
+Version: 2.17.2
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-sudo-2.17.1.tar.bz2
+Source0: yast2-sudo-2.17.2.tar.bz2
Prefix: /usr
Requires: yast2 yast2-users
#ycp::PathComponents
@@ -46,7 +46,7 @@
Katarina Machalkova
%prep
-%setup -n yast2-sudo-2.17.1
+%setup -n yast2-sudo-2.17.2
%build
%{prefix}/bin/y2tool y2autoconf
@@ -80,6 +80,15 @@
/usr/lib/YaST2/servers_non_y2/ag_etc_sudoers
%doc %{prefix}/share/doc/packages/yast2-sudo
%changelog
+* Mon Dec 01 2008 kmachalkova@suse.cz
+- Focusing correct item when changing priority of rules (bnc#449754)
+- Fixed parsing of multi-line rules/aliases (patch by jreidinger)
+ (bnc#449768)
+- 2.17.2
+* Thu Nov 27 2008 kmachalkova@suse.cz
+- Not so strict requirements on return value from SCR::Read
+ ( list <any> instead of list <string> )(bnc#448159)
+- Button re-labelling to comply to style-guide(bnc#448159)
* Tue Nov 18 2008 kmachalkova@suse.cz
- Rewrite of Perl agent to store sudoers data in non-associative
data structure + adapting business logic to use lists, not maps
++++++ yast2-sudo-2.17.1.tar.bz2 -> yast2-sudo-2.17.2.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.17.1/agents/ag_etc_sudoers new/yast2-sudo-2.17.2/agents/ag_etc_sudoers
--- old/yast2-sudo-2.17.1/agents/ag_etc_sudoers 2008-11-18 14:07:40.000000000 +0100
+++ new/yast2-sudo-2.17.2/agents/ag_etc_sudoers 2008-12-01 13:10:08.000000000 +0100
@@ -32,21 +32,32 @@
}
my $comment = "";
+ my $line = "";
while (<INFILE>) {
chomp;
- if (/^\s*$/ || /^#/) {
+ $line .= $_;
+ #a line is a comment
+ if ($line =~ m/^\s*$/ || $line =~ m/^#/) {
$comment .= "$_\n";
+ $line = "";
next;
}
+ #a line is \-terminated multiline rule/alias
+ #save it and continue on the next line
+ if ($line =~ m/^(.*)\\$/){
+ $line = $1;
+ next;
+ }
+
my $alias = "";
my @entry2 = ();
- if (/^(\S+)\s+(\S+)\s*=\s*([^#]*)/) {
+ if ($line =~ m/^(\S+)\s+(\S+)\s*=\s*([^#]*)/) {
$alias =$1;
push(@entry2, $comment, $alias, $2, $3);
}
- elsif (/^(\S+)\s+(\S+)/) {
+ elsif ($line =~ m/^(\S+)\s+(\S+)/) {
$alias =$1;
push(@entry2, $comment, $alias, $2);
}
@@ -54,6 +65,7 @@
push (@data2, \@entry2);
$comment = "";
+ $line = "";
}
close (INFILE);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.17.1/src/dialog-cmnd.ycp new/yast2-sudo-2.17.2/src/dialog-cmnd.ycp
--- old/yast2-sudo-2.17.1/src/dialog-cmnd.ycp 2008-11-18 10:41:31.000000000 +0100
+++ new/yast2-sudo-2.17.2/src/dialog-cmnd.ycp 2008-11-27 17:15:25.000000000 +0100
@@ -53,7 +53,8 @@
))
);
- Wizard::SetContentsButtons(caption, contents,HELPS["command_alias"]:"",Label::BackButton(), Label::OKButton());
+ Wizard::SetContentsButtons(caption, contents,HELPS["command_alias"]:"",Label::CancelButton(), Label::OKButton());
+ Wizard::HideAbortButton();
UI::ChangeWidget (`id("cmnd_alias_name"), `ValidChars, "_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
RedrawCmndAlias(name, alias_members);
@@ -62,12 +63,8 @@
while(true) {
ret = UI::UserInput();
- /* abort? */
- if(ret == `abort) {
- if(Sudo::Abort()) break;
- else continue;
/* next */
- } else if(ret == `next) {
+ if(ret == `next) {
string new_alias = toupper ((string) UI::QueryWidget(`id("cmnd_alias_name"),`Value));
if (new_alias == "") {
Popup::Error(_("Alias name must not be empty."));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.17.1/src/dialog-host.ycp new/yast2-sudo-2.17.2/src/dialog-host.ycp
--- old/yast2-sudo-2.17.1/src/dialog-host.ycp 2008-11-18 10:41:36.000000000 +0100
+++ new/yast2-sudo-2.17.2/src/dialog-host.ycp 2008-11-27 17:15:25.000000000 +0100
@@ -53,7 +53,8 @@
))
);
- Wizard::SetContentsButtons(caption, contents, HELPS["host_alias"]:"",Label::BackButton(), Label::OKButton());
+ Wizard::SetContentsButtons(caption, contents, HELPS["host_alias"]:"",Label::CancelButton(), Label::OKButton());
+ Wizard::HideAbortButton();
UI::ChangeWidget (`id("host_alias_name"), `ValidChars, "_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
RedrawHostAlias( name, alias_members );
@@ -62,14 +63,8 @@
while(true) {
ret = UI::UserInput();
- /* abort? */
- if(ret == `abort) {
- if(Sudo::Abort())
- break;
- else
- continue;
/* next */
- } else if(ret == `next) {
+ if(ret == `next) {
string new_alias = toupper((string) UI::QueryWidget(`id("host_alias_name"),`Value));
if (new_alias == "") {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.17.1/src/dialog-runas.ycp new/yast2-sudo-2.17.2/src/dialog-runas.ycp
--- old/yast2-sudo-2.17.1/src/dialog-runas.ycp 2008-11-18 10:45:04.000000000 +0100
+++ new/yast2-sudo-2.17.2/src/dialog-runas.ycp 2008-11-27 17:15:25.000000000 +0100
@@ -72,7 +72,8 @@
)
);
- Wizard::SetContentsButtons(caption, contents,HELPS["runas_alias"]:"",Label::BackButton(), Label::OKButton());
+ Wizard::SetContentsButtons(caption, contents,HELPS["runas_alias"]:"",Label::CancelButton(), Label::OKButton());
+ Wizard::HideAbortButton();
UI::ChangeWidget (`id("runas_alias_name"), `ValidChars, "_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
RedrawRunAsAlias(name, alias_members,users);
@@ -81,12 +82,8 @@
while(true) {
ret = UI::UserInput();
- /* abort? */
- if(ret == `abort) {
- if(Sudo::Abort()) break;
- else continue;
/* next */
- }else if(ret == `next) {
+ if(ret == `next) {
string new_alias = toupper((string) UI::QueryWidget(`id("runas_alias_name"),`Value));
if (new_alias == "") {
Popup::Error(_("Alias name must not be empty."));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.17.1/src/dialog-spec.ycp new/yast2-sudo-2.17.2/src/dialog-spec.ycp
--- old/yast2-sudo-2.17.1/src/dialog-spec.ycp 2008-11-18 10:41:20.000000000 +0100
+++ new/yast2-sudo-2.17.2/src/dialog-spec.ycp 2008-11-27 17:15:25.000000000 +0100
@@ -64,7 +64,8 @@
);
- Wizard::SetContentsButtons(caption, contents,HELPS["spec_single"]:"",Label::BackButton(), Label::OKButton());
+ Wizard::SetContentsButtons(caption, contents,HELPS["spec_single"]:"",Label::CancelButton(), Label::OKButton());
+ Wizard::HideAbortButton();
UI::ChangeWidget(`id("user_name"),`ValidChars, Sudo::ValidCharsUsername);
UI::ChangeWidget(`id("run_as"),`ValidChars, Sudo::ValidCharsUsername);
@@ -80,12 +81,8 @@
while(true) {
ret = UI::UserInput();
- /* abort? */
- if(ret == `abort) {
- if(Sudo::Abort()) break;
- else continue;
/* next */
- } else if(ret == `next) {
+ if(ret == `next) {
spec["user"] = UI::QueryWidget(`id("user_name"),`Value);
spec["host"] = UI::QueryWidget(`id("host_name"),`Value);
spec["run_as"] = (string)UI::QueryWidget(`id("run_as"),`Value);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.17.1/src/dialogs.ycp new/yast2-sudo-2.17.2/src/dialogs.ycp
--- old/yast2-sudo-2.17.1/src/dialogs.ycp 2008-11-18 14:02:32.000000000 +0100
+++ new/yast2-sudo-2.17.2/src/dialogs.ycp 2008-12-01 12:18:56.000000000 +0100
@@ -112,12 +112,14 @@
if (idx != 0) {
SwapItems( idx, idx - 1);
SwapUIItems( idx, idx - 1 );
+ UI::ChangeWidget(`id("table_user_spec"), `CurrentItem, idx-1);
}
} else if ( ret == "down"){
integer idx = (integer) UI::QueryWidget(`id("table_user_spec"), `CurrentItem);
if ( idx != (size( Sudo::GetRules())-1) ) {
SwapItems( idx, idx + 1 );
SwapUIItems( idx, idx + 1 );
+ UI::ChangeWidget(`id("table_user_spec"), `CurrentItem, idx+1);
}
}
}
@@ -489,9 +491,9 @@
"initial_screen" : initial_screen,
"screens" : tabs,
"widget_descr" : widgets_handling,
- "back_button" : Label::BackButton(),
- "abort_button" : Label::AbortButton(),
- "next_button" : Label::FinishButton(),
+ "back_button" : nil, //Label::BackButton(),
+ "abort_button" : Label::CancelButton(),
+ "next_button" : Label::OKButton(),
"functions" : functions,
]);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.17.1/src/dialog-user.ycp new/yast2-sudo-2.17.2/src/dialog-user.ycp
--- old/yast2-sudo-2.17.1/src/dialog-user.ycp 2008-11-18 10:59:46.000000000 +0100
+++ new/yast2-sudo-2.17.2/src/dialog-user.ycp 2008-11-27 17:15:25.000000000 +0100
@@ -71,7 +71,8 @@
)
);
- Wizard::SetContentsButtons(caption, contents,HELPS["user_alias"]:"",Label::BackButton(), Label::OKButton());
+ Wizard::SetContentsButtons(caption, contents,HELPS["user_alias"]:"",Label::CancelButton(), Label::OKButton());
+ Wizard::HideAbortButton();
UI::ChangeWidget (`id("user_alias_name"), `ValidChars, "_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
RedrawUserAlias(name, alias_members,users);
@@ -80,12 +81,8 @@
while(true) {
ret = UI::UserInput();
- /* abort? */
- if(ret == `abort) {
- if(Sudo::Abort()) break;
- else continue;
/* next */
- }else if(ret == `next) {
+ if(ret == `next) {
string new_alias = toupper ((string) UI::QueryWidget(`id("user_alias_name"),`Value));
if (new_alias == "") {
Popup::Error(_("Alias name must not be empty."));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.17.1/src/Sudo.ycp new/yast2-sudo-2.17.2/src/Sudo.ycp
--- old/yast2-sudo-2.17.1/src/Sudo.ycp 2008-11-18 14:05:31.000000000 +0100
+++ new/yast2-sudo-2.17.2/src/Sudo.ycp 2008-11-27 17:15:25.000000000 +0100
@@ -66,26 +66,20 @@
global string ValidCharsUsername = deletechars (String::CGraph (), "'\"") + " ";
-list < list <string> > settings2 = [];
-map host_aliases = $[];
+list < list <any> > settings2 = [];
list< map > host_aliases2 = [];
-map user_aliases = $[];
list< map > user_aliases2 = [];
-map cmnd_aliases = $[];
list< map > cmnd_aliases2 = [];
-map runas_aliases = $[];
list< map > runas_aliases2 = [];
-list defaults = [];
-list < map > user_specs = [];
+list < list <any> > defaults = [];
list < map > rules = [];
-list <string> deleted_specs = [];
global list <string> all_users = [];
boolean ReadSudoSettings2() {
- settings2 = ( list < list <string> >)SCR::Read(.sudo);
+ settings2 = ( list < list <any> >)SCR::Read(.sudo);
y2milestone("Sudo settings %1", settings2);
- foreach( list <string> line, settings2, {
+ foreach( list line, settings2, {
string type = line[1]:"";
switch (type) {
@@ -111,13 +105,13 @@
runas_aliases2 = add( runas_aliases2, $[ "c": line[0]: "", "name": line[2]:"", "mem": lst ] );
break;
}
- case "Defaults": {
- //do nothing, keep defaults untouched
- defaults = add(defaults,line);
- break;
- }
- //rules remained
+ //rules + defaults remained
default: {
+ if ( regexpmatch(type, "^Defaults.*$") ) {
+ //do nothing, keep defaults untouched
+ defaults = add(defaults,line);
+ }
+ else {
map m = $[];
list <string> cmd = [];
@@ -150,6 +144,7 @@
break;
}
+ }
}
});
@@ -194,7 +189,7 @@
global boolean WriteSudoSettings2()
{
- list set = [];
+ list set = [];
foreach(map a, host_aliases2,{
list <string> line = [ a["c"]:"", "Host_Alias", a["name"]:"", mergestring(a["mem"]:[],",") ];
@@ -208,7 +203,7 @@
list <string> line = [ a["c"]:"", "Cmnd_Alias", a["name"]:"", mergestring(a["mem"]:[],",")];
set = add(set, line);
});
- set = ( list < list <string> > ) merge(set, defaults);
+ set = ( list < list <any> > ) merge(set, defaults);
foreach(map a, runas_aliases2,{
list <string> line = [ a["c"]:"", "Runas_Alias", a["name"]:"", mergestring(a["mem"]:[],",")];
set = add(set, line);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.17.1/VERSION new/yast2-sudo-2.17.2/VERSION
--- old/yast2-sudo-2.17.1/VERSION 2008-11-18 17:19:47.000000000 +0100
+++ new/yast2-sudo-2.17.2/VERSION 2008-11-27 17:20:28.000000000 +0100
@@ -1 +1 @@
-2.17.1
+2.17.2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org