Author: jsrain
Date: Wed Sep 5 12:51:08 2007
New Revision: 40759
URL: http://svn.opensuse.org/viewcvs/yast?rev=40759&view=rev
Log:
handle missing /usr/bin/id properly (#307375)
Modified:
trunk/yast2/library/wizard/src/Confirm.ycp
trunk/yast2/package/yast2.changes
Modified: trunk/yast2/library/wizard/src/Confirm.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/wizard/src/Confirm.ycp?rev=40759&r1=40758&r2=40759&view=diff
==============================================================================
--- trunk/yast2/library/wizard/src/Confirm.ycp (original)
+++ trunk/yast2/library/wizard/src/Confirm.ycp Wed Sep 5 12:51:08 2007
@@ -22,6 +22,7 @@
import "Mode";
import "Popup";
import "Linuxrc";
+import "Stage";
// #TODO bug number
map detection_cache = $[];
@@ -105,6 +106,13 @@
*/
global define boolean MustBeRoot()
{
+ if ((integer)SCR::Read (.target.size, "/usr/bin/id") <= 0)
+ {
+ if (! Stage::initial ())
+ y2warning ("/usr/bin/id not existing, supposing to be root");
+ return true;
+ }
+
map out = (map) SCR::Execute (.target.bash_output, "/usr/bin/id --user");
boolean root = out["stdout"]:"" == "0\n";
if(root) return true;
Modified: trunk/yast2/package/yast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=40759&r1=40758&r2=40759&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Wed Sep 5 12:51:08 2007
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Wed Sep 5 12:48:58 CEST 2007 - jsrain@suse.cz
+
+- handle missing /usr/bin/id properly (#307375)
+
+-------------------------------------------------------------------
Mon Sep 3 14:25:19 CEST 2007 - mvidner@suse.cz
- Mail via AutoYaST: do not omit the colon separator in /etc/aliases;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org