WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] 1. Set the UID and EUID of the process when trying to sw

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] 1. Set the UID and EUID of the process when trying to switch to a
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 08 Nov 2005 13:00:12 +0000
Delivery-date: Tue, 08 Nov 2005 13:00:49 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID f79854882e1f8c29b04c92e96ea9d65b1b8b9473
# Parent  40f3ce3516cb675103de21b22c75af7e34668a63
1. Set the UID and EUID of the process when trying to switch to a
   non-root user.
2. Better handle the debug-printing inside the console

Signed-off-by: Dan Smith <danms@xxxxxxxxxx>

diff -r 40f3ce3516cb -r f79854882e1f tools/xm-test/lib/XmTestLib/Console.py
--- a/tools/xm-test/lib/XmTestLib/Console.py    Tue Nov  8 10:56:55 2005
+++ b/tools/xm-test/lib/XmTestLib/Console.py    Tue Nov  8 11:00:23 2005
@@ -167,6 +167,8 @@
             if self.consoleFd in i:
                 try:
                     str = os.read(self.consoleFd, 1)
+                    if self.debugMe:
+                        sys.stdout.write(str)
                     bytes += 1
                 except:
                     raise ConsoleError("Failed to read from console (fd=%i)"
@@ -179,8 +181,6 @@
                                    % self.limit)
 
             if str == "\n":
-                if self.debugMe:
-                    print "%s\n" % line
                 if lines > 0:
                     output += line + "\n"
                     if saveHistory:
diff -r 40f3ce3516cb -r f79854882e1f tools/xm-test/lib/XmTestLib/Test.py
--- a/tools/xm-test/lib/XmTestLib/Test.py       Tue Nov  8 10:56:55 2005
+++ b/tools/xm-test/lib/XmTestLib/Test.py       Tue Nov  8 11:00:23 2005
@@ -125,7 +125,7 @@
         allusers = pwd.getpwall()
         for u in allusers:
             if u[0] == "nobody":
-                os.seteuid(u[2])
+                os.setreuid(u[2], u[2])
                 break
         if os.geteuid() == 0:
             FAIL("Could not become a non-root user")

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] 1. Set the UID and EUID of the process when trying to switch to a, Xen patchbot -unstable <=