[pulseaudio-commits] r2102 - /trunk/src/daemon/caps.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Jan 24 01:35:53 PST 2008


Author: flameeyes
Date: Thu Jan 24 10:35:50 2008
New Revision: 2102

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2102&root=pulseaudio&view=rev
Log:
Apply the fix for CVE-2008-0008 from 0.9.9 release on trunk.

Modified:
    trunk/src/daemon/caps.c

Modified: trunk/src/daemon/caps.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/daemon/caps.c?rev=2102&root=pulseaudio&r1=2101&r2=2102&view=diff
==============================================================================
--- trunk/src/daemon/caps.c (original)
+++ trunk/src/daemon/caps.c Thu Jan 24 10:35:50 2008
@@ -63,13 +63,16 @@
     pa_log_info("Dropping root priviliges.");
 
 #if defined(HAVE_SETRESUID)
-    setresuid(uid, uid, uid);
+    pa_assert_se(setresuid(uid, uid, uid) >= 0);
 #elif defined(HAVE_SETREUID)
-    setreuid(uid, uid);
+    pa_assert_se(setreuid(uid, uid) >= 0);
 #else
-    setuid(uid);
-    seteuid(uid);
+    pa_assert_se(setuid(uid) >= 0);
+    pa_assert_se(seteuid(uid) >= 0);
 #endif
+
+    pa_assert_se(getuid() == uid);
+    pa_assert_se(geteuid() == uid);
 }
 
 #else
@@ -147,4 +150,3 @@
 }
 
 #endif
-




More information about the pulseaudio-commits mailing list