Skip to content

Commit

Permalink
- check UID after evaluating command line arguments (#269909)
Browse files Browse the repository at this point in the history
- 2.15.3

svn path=/trunk/sysconfig/; revision=38151
  • Loading branch information
lslezak committed May 28, 2007
1 parent 6cbb5d4 commit 45d9a1d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.15.2
2.15.3
6 changes: 6 additions & 0 deletions package/yast2-sysconfig.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon May 28 07:16:57 CEST 2007 - lslezak@suse.cz

- check UID after evaluating command line arguments (#269909)
- 2.15.3

-------------------------------------------------------------------
Fri May 25 13:30:04 CEST 2007 - jsrain@suse.cz

Expand Down
6 changes: 0 additions & 6 deletions src/sysconfig.ycp
Expand Up @@ -23,7 +23,6 @@ y2milestone ("Sysconfig module started");

import "Sysconfig";
import "CommandLine";
import "Confirm";

include "sysconfig/wizards.ycp";
include "sysconfig/cmdline.ycp";
Expand Down Expand Up @@ -97,11 +96,6 @@ include "sysconfig/cmdline.ycp";
]
];

if (!Confirm::MustBeRoot())
{
return (any)`abort;
}

/* main ui function */
any ret = CommandLine::Run(cmdline);

Expand Down
19 changes: 18 additions & 1 deletion src/wizards.ycp
Expand Up @@ -17,6 +17,7 @@ import "Sysconfig";
import "Popup";
import "Label";
import "Sequencer";
import "Confirm";

include "sysconfig/complex.ycp";
include "sysconfig/dialogs.ycp";
Expand Down Expand Up @@ -65,20 +66,36 @@ include "sysconfig/dialogs.ycp";
return ret;
}

define symbol CheckRoot()
{
if (!Confirm::MustBeRoot())
{
return `abort;
}

return `next;
}


/**
* Whole configuration of sysconfig
* @return sequence result
*/
define boolean SysconfigSequence() ``{

map aliases = $[
"check" : [ ``( CheckRoot() ), true ],
"read" : [ ``( ReadDialog() ), true ],
"main" : ``( MainSequence() ),
"write" : [ ``( WriteDialog() ), true ]
];

map sequence = $[
"ws_start" : "read",
"ws_start" : "check",
"check" : $[
`next : "read",
`abort : `abort
],
"read" : $[
`abort : `abort,
`next : "main"
Expand Down

0 comments on commit 45d9a1d

Please sign in to comment.