Hi, when I use slim to login X, slim do not switch the user login class.

replace patch-switchuser_cpp and add patch-switchuser_h

--- switchuser.cpp.orig Thu Jul  8 13:04:10 2010
+++ switchuser.cpp Sat Aug 18 16:11:36 2012
@@ -39,6 +39,9 @@

 void SwitchUser::SetUserId() {
     if( (Pw == 0) ||
+            (setusercontext(NULL, Pw, Pw->pw_uid,
LOGIN_SETPRIORITY|LOGIN_SETRESOURCES) == -1) ||
+            (setsid() == -1) ||
+            (setlogin(Pw->pw_name) != 0) ||
             (initgroups(Pw->pw_name, Pw->pw_gid) != 0) ||
             (setgid(Pw->pw_gid) != 0) ||
             (setuid(Pw->pw_uid) != 0) ) {


--- switchuser.h.orig Sat Aug 18 16:27:19 2012
+++ switchuser.h Sat Aug 18 16:02:22 2012
@@ -12,6 +12,8 @@
 #ifndef _SWITCHUSER_H_
 #define _SWITCHUSER_H_

+#include <sys/types.h>
+#include <login_cap.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>

Attachment: patch-switchuser_cpp
Description: Binary data

Attachment: patch-switchuser_h
Description: Binary data

Reply via email to