New diffs.- update-patches eats some lines, pointed out by landry@
On Wed, Apr 17, 2013 at 12:13:39PM -0300, Gonzalo L. R. wrote: ; Hi, ; ; Update for Slim to 1.3.5: ; ; * Support UTF8 string. ; * And fix some bugs. ; ; Comments? Ok? ; ; Cheers.- ; ; -- ; Sending from my iFart... ; Index: Makefile ; =================================================================== ; RCS file: /cvs/ports/x11/slim/Makefile,v ; retrieving revision 1.22 ; diff -u -p -r1.22 Makefile ; --- Makefile 11 Mar 2013 11:46:15 -0000 1.22 ; +++ Makefile 17 Apr 2013 15:10:14 -0000 ; @@ -2,7 +2,7 @@ ; ; COMMENT= simple login manager ; ; -DISTNAME= slim-1.3.4 ; +DISTNAME= slim-1.3.5 ; ; CATEGORIES= x11 ; MAINTAINER = Landry Breuil <[email protected]> ; @@ -19,8 +19,8 @@ LIB_DEPENDS= graphics/jpeg \ ; x11/dbus \ ; graphics/png ; ; -WANTLIB= X11 Xft Xmu Xrender fontconfig c m stdc++ z freetype jpeg png ; -WANTLIB += pthread dbus-1 ck-connector ; +WANTLIB += X11 Xft Xmu Xrender c ck-connector dbus-1 fontconfig ; +WANTLIB += freetype jpeg m png pthread stdc++ z ; ; CONFIGURE_ARGS= -DUSE_CONSOLEKIT="yes" ; ; Index: distinfo ; =================================================================== ; RCS file: /cvs/ports/x11/slim/distinfo,v ; retrieving revision 1.4 ; diff -u -p -r1.4 distinfo ; --- distinfo 2 Sep 2012 09:22:59 -0000 1.4 ; +++ distinfo 17 Apr 2013 15:10:14 -0000 ; @@ -1,2 +1,2 @@ ; -SHA256 (slim-1.3.4.tar.gz) = FVwmRgyYufCSViQCi0JUr8DeT9ozMA86xFYGssXL1QE= ; -SIZE (slim-1.3.4.tar.gz) = 227197 ; +SHA256 (slim-1.3.5.tar.gz) = gY0gn1Hi+o1blO91zpCnQVvki0XnltZvgIOpUytlVik= ; +SIZE (slim-1.3.5.tar.gz) = 226413 ; Index: patches/patch-CMakeLists_txt ; =================================================================== ; RCS file: /cvs/ports/x11/slim/patches/patch-CMakeLists_txt,v ; retrieving revision 1.1 ; diff -u -p -r1.1 patch-CMakeLists_txt ; --- patches/patch-CMakeLists_txt 2 Sep 2012 09:22:59 -0000 1.1 ; +++ patches/patch-CMakeLists_txt 17 Apr 2013 15:10:14 -0000 ; @@ -1,6 +1,6 @@ ; $OpenBSD: patch-CMakeLists_txt,v 1.1 2012/09/02 09:22:59 landry Exp $ ; ---- CMakeLists.txt.orig Tue Jun 26 10:20:14 2012 ; -+++ CMakeLists.txt Sat Sep 1 20:39:34 2012 ; +--- CMakeLists.txt.orig Mon Dec 31 10:03:42 2012 ; ++++ CMakeLists.txt Wed Apr 17 11:38:56 2013 ; @@ -24,7 +24,7 @@ set(SLIM_VERSION "${SLIM_VERSION_MAJOR}.${SLIM_VERSION ; set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory") ; set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/slim") ; @@ -28,11 +28,14 @@ $OpenBSD: patch-CMakeLists_txt,v 1.1 201 ; ${X11_X11_LIB} ; ${X11_Xft_LIB} ; ${X11_Xrender_LIB} ; -@@ -169,6 +165,6 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bi ; +@@ -169,8 +165,8 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bi ; # man file ; install(FILES slim.1 DESTINATION ${MANDIR}/man1/) ; # configure ; -install(FILES slim.conf DESTINATION ${SYSCONFDIR}) ; +install(FILES slim.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/share/examples/slim/) ; + # systemd service file ; +-install(FILES slim.service DESTINATION usr/lib/systemd/system) ; ++#install(FILES slim.service DESTINATION usr/lib/systemd/system) ; # themes directory ; subdirs(themes) ; Index: patches/patch-Ck_cpp ; =================================================================== ; RCS file: /cvs/ports/x11/slim/patches/patch-Ck_cpp,v ; retrieving revision 1.1 ; diff -u -p -r1.1 patch-Ck_cpp ; --- patches/patch-Ck_cpp 2 Sep 2012 09:22:59 -0000 1.1 ; +++ patches/patch-Ck_cpp 17 Apr 2013 15:10:14 -0000 ; @@ -1,20 +1,20 @@ ; $OpenBSD: patch-Ck_cpp,v 1.1 2012/09/02 09:22:59 landry Exp $ ; Keep track of the successful consolekit session opening ; ---- Ck.cpp.orig Tue Jun 26 10:20:14 2012 ; -+++ Ck.cpp Sat Sep 1 23:06:17 2012 ; +--- Ck.cpp.orig Mon Dec 31 10:03:42 2012 ; ++++ Ck.cpp Mon Apr 15 12:52:25 2013 ; @@ -101,6 +101,7 @@ namespace Ck { ; ; void Session::open_session(const std::string &display, uid_t uid) ; { ; -+ session = false; ; - ckc = ck_connector_new(); ; ++ session = false; ; + ckc = ck_connector_new(); ; ; - if(!ckc) ; + if(!ckc) ; @@ -113,6 +114,7 @@ namespace Ck { ; - throw Exception(__func__, "cannot open ConsoleKit session: OOM, DBus system bus " ; - " not available or insufficient privileges"); ; - } ; -+ session = true; ; + throw Exception(__func__, "cannot open ConsoleKit session: OOM, DBus system bus " ; + " not available or insufficient privileges"); ; + } ; ++ session = true; ; } ; ; const char * Session::get_xdg_session_cookie() ; Index: patches/patch-Ck_h ; =================================================================== ; RCS file: /cvs/ports/x11/slim/patches/patch-Ck_h,v ; retrieving revision 1.1 ; diff -u -p -r1.1 patch-Ck_h ; --- patches/patch-Ck_h 2 Sep 2012 09:22:59 -0000 1.1 ; +++ patches/patch-Ck_h 17 Apr 2013 15:10:14 -0000 ; @@ -1,19 +1,18 @@ ; $OpenBSD: patch-Ck_h,v 1.1 2012/09/02 09:22:59 landry Exp $ ; Add a boolean to track the consolekit session success ; ---- Ck.h.orig Tue Jun 26 10:20:14 2012 ; -+++ Ck.h Sat Sep 1 23:06:38 2012 ; -@@ -27,12 +27,13 @@ namespace Ck { ; - private: ; - CkConnector *ckc; ; - DBusError error; ; -- ; -+ bool session; ; - const char * get_x11_device(const std::string &display); ; - dbus_bool_t ck_connector_open_graphic_session(const std::string &display, ; - uid_t uid); ; - public: ; - const char * get_xdg_session_cookie(); ; -+ bool has_session() {return session;} ; - void open_session(const std::string &display, uid_t uid); ; - void close_session(); ; +--- Ck.h.orig Mon Dec 31 10:03:42 2012 ; ++++ Ck.h Mon Apr 15 12:50:24 2013 ; +@@ -28,11 +28,13 @@ namespace Ck { ; + CkConnector *ckc; ; + DBusError error; ; + ; ++ bool session; ; + const char * get_x11_device(const std::string &display); ; + dbus_bool_t ck_connector_open_graphic_session(const std::string &display, ; + uid_t uid); ; + public: ; + const char * get_xdg_session_cookie(); ; ++ bool has_session() {return session;} ; + void open_session(const std::string &display, uid_t uid); ; + void close_session(); ; ; Index: patches/patch-app_cpp ; =================================================================== ; RCS file: /cvs/ports/x11/slim/patches/patch-app_cpp,v ; retrieving revision 1.4 ; diff -u -p -r1.4 patch-app_cpp ; --- patches/patch-app_cpp 2 Sep 2012 09:22:59 -0000 1.4 ; +++ patches/patch-app_cpp 17 Apr 2013 15:10:14 -0000 ; @@ -2,9 +2,9 @@ $OpenBSD: patch-app_cpp,v 1.4 2012/09/02 ; add support for bsd_auth/auth_userokay on OpenBSD ; only call the consolekit stuff if the ck session is okay ; don't exit if the ck session fails to start ; ---- app.cpp.orig Tue Jun 26 10:20:14 2012 ; -+++ app.cpp Sat Sep 1 23:04:49 2012 ; -@@ -32,6 +32,11 @@ ; +--- app.cpp.orig Mon Dec 31 10:03:42 2012 ; ++++ app.cpp Wed Apr 17 10:52:18 2013 ; +@@ -30,6 +30,11 @@ ; #include <shadow.h> ; #endif ; ; @@ -16,9 +16,9 @@ don't exit if the ck session fails to st ; using namespace std; ; ; #ifdef USE_PAM ; -@@ -468,6 +473,12 @@ bool App::AuthenticateUser(bool focuspass){ ; - if(pw == 0) ; - return false; ; +@@ -462,6 +467,12 @@ bool App::AuthenticateUser(bool focuspass){ ; + if(pw == 0) ; + return false; ; ; +#ifdef __OpenBSD__ ; + char * pass = strdup(LoginPanel->GetPasswd().c_str()); ; @@ -27,45 +27,5 @@ don't exit if the ck session fails to st ; + return ret; ; +#endif ; #ifdef HAVE_SHADOW ; - struct spwd *sp = getspnam(pw->pw_name); ; - endspent(); ; -@@ -572,7 +583,6 @@ void App::Login() { ; - } ; - catch(Ck::Exception &e) { ; - logStream << APPNAME << ": " << e << endl; ; -- exit(ERR_EXIT); ; - } ; - #endif ; - ; -@@ -585,6 +595,7 @@ void App::Login() { ; - char** child_env = pam.getenvlist(); ; - ; - # ifdef USE_CONSOLEKIT ; -+ if(ck.has_session()) { ; - char** old_env = child_env; ; - ; - // Grow the copy of the environment for the session cookie ; -@@ -597,6 +608,7 @@ void App::Login() { ; - memcpy(child_env, old_env, sizeof(char*)*n); ; - child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); ; - child_env[n] = NULL; ; -+ } ; - # endif /* USE_CONSOLEKIT */ ; - ; - pam.end(); ; -@@ -620,6 +632,7 @@ void App::Login() { ; - child_env[n++]=StrConcat("MAIL=", maildir.c_str()); ; - child_env[n++]=StrConcat("XAUTHORITY=", xauthority.c_str()); ; - # ifdef USE_CONSOLEKIT ; -+ if (ck.has_session()) ; - child_env[n++]=StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); ; - # endif /* USE_CONSOLEKIT */ ; - child_env[n++]=0; ; -@@ -666,6 +679,7 @@ void App::Login() { ; - ; - #ifdef USE_CONSOLEKIT ; - try { ; -+ if (ck.has_session()) ; - ck.close_session(); ; - } ; - catch(Ck::Exception &e) { ; + struct spwd *sp = getspnam(pw->pw_name); ; + endspent(); ; Index: patches/patch-image_cpp ; =================================================================== ; RCS file: patches/patch-image_cpp ; diff -N patches/patch-image_cpp ; --- patches/patch-image_cpp 2 Sep 2012 09:22:59 -0000 1.1 ; +++ /dev/null 1 Jan 1970 00:00:00 -0000 ; @@ -1,12 +0,0 @@ ; -$OpenBSD: patch-image_cpp,v 1.1 2012/09/02 09:22:59 landry Exp $ ; ---- image.cpp.orig Sat Sep 1 19:52:57 2012 ; -+++ image.cpp Sat Sep 1 19:53:20 2012 ; -@@ -781,7 +781,7 @@ Image::readPng(const char *filename, int *width, int * ; - (png_infopp) NULL); ; - } ; - ; -- if (setjmp(png_ptr->jmpbuf)) { ; -+ if (setjmp(png_jmpbuf(png_ptr))) { ; - goto png_destroy; ; - } ; - ; Index: patches/patch-log_h ; =================================================================== ; RCS file: patches/patch-log_h ; diff -N patches/patch-log_h ; --- /dev/null 1 Jan 1970 00:00:00 -0000 ; +++ patches/patch-log_h 17 Apr 2013 15:10:14 -0000 ; @@ -0,0 +1,13 @@ ; +$OpenBSD$ ; +--- log.h.orig Wed Apr 17 11:16:47 2013 ; ++++ log.h Wed Apr 17 11:18:06 2013 ; +@@ -4,9 +4,6 @@ ; + #ifdef USE_CONSOLEKIT ; + #include "Ck.h" ; + #endif ; +-#ifdef USE_CONSOLEKIT ; +-#include "PAM.h" ; +-#endif ; + #include "const.h" ; + #include <fstream> ; + ; Index: patches/patch-switchuser_cpp ; =================================================================== ; RCS file: /cvs/ports/x11/slim/patches/patch-switchuser_cpp,v ; retrieving revision 1.4 ; diff -u -p -r1.4 patch-switchuser_cpp ; --- patches/patch-switchuser_cpp 2 Sep 2012 09:23:00 -0000 1.4 ; +++ patches/patch-switchuser_cpp 17 Apr 2013 15:10:14 -0000 ; @@ -1,7 +1,7 @@ ; $OpenBSD: patch-switchuser_cpp,v 1.4 2012/09/02 09:23:00 landry Exp $ ; add missing setusercontext/setsid/setlogin calls. ; ---- switchuser.cpp.orig Tue Jun 26 10:20:14 2012 ; -+++ switchuser.cpp Sat Sep 1 20:51:44 2012 ; +--- switchuser.cpp.orig Mon Dec 31 10:03:42 2012 ; ++++ switchuser.cpp Wed Apr 17 10:52:21 2013 ; @@ -10,6 +10,10 @@ ; */ ; ; @@ -13,13 +13,3 @@ add missing setusercontext/setsid/setlog ; #include "switchuser.h" ; #include "util.h" ; ; -@@ -36,6 +40,9 @@ void SwitchUser::Login(const char* cmd, const char* mc ; - ; - 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) ) { -- Sending from my iFart...
Index: Makefile =================================================================== RCS file: /cvs/ports/x11/slim/Makefile,v retrieving revision 1.22 diff -u -p -r1.22 Makefile --- Makefile 11 Mar 2013 11:46:15 -0000 1.22 +++ Makefile 17 Apr 2013 16:27:14 -0000 @@ -2,7 +2,7 @@ COMMENT= simple login manager -DISTNAME= slim-1.3.4 +DISTNAME= slim-1.3.5 CATEGORIES= x11 MAINTAINER = Landry Breuil <[email protected]> @@ -19,8 +19,8 @@ LIB_DEPENDS= graphics/jpeg \ x11/dbus \ graphics/png -WANTLIB= X11 Xft Xmu Xrender fontconfig c m stdc++ z freetype jpeg png -WANTLIB += pthread dbus-1 ck-connector +WANTLIB += X11 Xft Xmu Xrender c ck-connector dbus-1 fontconfig +WANTLIB += freetype jpeg m png pthread stdc++ z CONFIGURE_ARGS= -DUSE_CONSOLEKIT="yes" Index: distinfo =================================================================== RCS file: /cvs/ports/x11/slim/distinfo,v retrieving revision 1.4 diff -u -p -r1.4 distinfo --- distinfo 2 Sep 2012 09:22:59 -0000 1.4 +++ distinfo 17 Apr 2013 16:27:14 -0000 @@ -1,2 +1,2 @@ -SHA256 (slim-1.3.4.tar.gz) = FVwmRgyYufCSViQCi0JUr8DeT9ozMA86xFYGssXL1QE= -SIZE (slim-1.3.4.tar.gz) = 227197 +SHA256 (slim-1.3.5.tar.gz) = gY0gn1Hi+o1blO91zpCnQVvki0XnltZvgIOpUytlVik= +SIZE (slim-1.3.5.tar.gz) = 226413 Index: patches/patch-CMakeLists_txt =================================================================== RCS file: /cvs/ports/x11/slim/patches/patch-CMakeLists_txt,v retrieving revision 1.1 diff -u -p -r1.1 patch-CMakeLists_txt --- patches/patch-CMakeLists_txt 2 Sep 2012 09:22:59 -0000 1.1 +++ patches/patch-CMakeLists_txt 17 Apr 2013 16:27:14 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-CMakeLists_txt,v 1.1 2012/09/02 09:22:59 landry Exp $ ---- CMakeLists.txt.orig Tue Jun 26 10:20:14 2012 -+++ CMakeLists.txt Sat Sep 1 20:39:34 2012 +--- CMakeLists.txt.orig Mon Dec 31 10:03:42 2012 ++++ CMakeLists.txt Wed Apr 17 11:38:56 2013 @@ -24,7 +24,7 @@ set(SLIM_VERSION "${SLIM_VERSION_MAJOR}.${SLIM_VERSION set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory") set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/slim") @@ -28,11 +28,14 @@ $OpenBSD: patch-CMakeLists_txt,v 1.1 201 ${X11_X11_LIB} ${X11_Xft_LIB} ${X11_Xrender_LIB} -@@ -169,6 +165,6 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bi +@@ -169,8 +165,8 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bi # man file install(FILES slim.1 DESTINATION ${MANDIR}/man1/) # configure -install(FILES slim.conf DESTINATION ${SYSCONFDIR}) +install(FILES slim.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/share/examples/slim/) + # systemd service file +-install(FILES slim.service DESTINATION usr/lib/systemd/system) ++#install(FILES slim.service DESTINATION usr/lib/systemd/system) # themes directory subdirs(themes) Index: patches/patch-Ck_cpp =================================================================== RCS file: /cvs/ports/x11/slim/patches/patch-Ck_cpp,v retrieving revision 1.1 diff -u -p -r1.1 patch-Ck_cpp --- patches/patch-Ck_cpp 2 Sep 2012 09:22:59 -0000 1.1 +++ patches/patch-Ck_cpp 17 Apr 2013 16:27:14 -0000 @@ -1,20 +1,20 @@ $OpenBSD: patch-Ck_cpp,v 1.1 2012/09/02 09:22:59 landry Exp $ Keep track of the successful consolekit session opening ---- Ck.cpp.orig Tue Jun 26 10:20:14 2012 -+++ Ck.cpp Sat Sep 1 23:06:17 2012 +--- Ck.cpp.orig Mon Dec 31 10:03:42 2012 ++++ Ck.cpp Mon Apr 15 12:52:25 2013 @@ -101,6 +101,7 @@ namespace Ck { void Session::open_session(const std::string &display, uid_t uid) { -+ session = false; - ckc = ck_connector_new(); ++ session = false; + ckc = ck_connector_new(); - if(!ckc) + if(!ckc) @@ -113,6 +114,7 @@ namespace Ck { - throw Exception(__func__, "cannot open ConsoleKit session: OOM, DBus system bus " - " not available or insufficient privileges"); - } -+ session = true; + throw Exception(__func__, "cannot open ConsoleKit session: OOM, DBus system bus " + " not available or insufficient privileges"); + } ++ session = true; } const char * Session::get_xdg_session_cookie() Index: patches/patch-Ck_h =================================================================== RCS file: /cvs/ports/x11/slim/patches/patch-Ck_h,v retrieving revision 1.1 diff -u -p -r1.1 patch-Ck_h --- patches/patch-Ck_h 2 Sep 2012 09:22:59 -0000 1.1 +++ patches/patch-Ck_h 17 Apr 2013 16:27:14 -0000 @@ -1,19 +1,18 @@ $OpenBSD: patch-Ck_h,v 1.1 2012/09/02 09:22:59 landry Exp $ Add a boolean to track the consolekit session success ---- Ck.h.orig Tue Jun 26 10:20:14 2012 -+++ Ck.h Sat Sep 1 23:06:38 2012 -@@ -27,12 +27,13 @@ namespace Ck { - private: - CkConnector *ckc; - DBusError error; -- -+ bool session; - const char * get_x11_device(const std::string &display); - dbus_bool_t ck_connector_open_graphic_session(const std::string &display, - uid_t uid); - public: - const char * get_xdg_session_cookie(); -+ bool has_session() {return session;} - void open_session(const std::string &display, uid_t uid); - void close_session(); +--- Ck.h.orig Mon Dec 31 10:03:42 2012 ++++ Ck.h Mon Apr 15 12:50:24 2013 +@@ -28,11 +28,13 @@ namespace Ck { + CkConnector *ckc; + DBusError error; + ++ bool session; + const char * get_x11_device(const std::string &display); + dbus_bool_t ck_connector_open_graphic_session(const std::string &display, + uid_t uid); + public: + const char * get_xdg_session_cookie(); ++ bool has_session() {return session;} + void open_session(const std::string &display, uid_t uid); + void close_session(); Index: patches/patch-app_cpp =================================================================== RCS file: /cvs/ports/x11/slim/patches/patch-app_cpp,v retrieving revision 1.4 diff -u -p -r1.4 patch-app_cpp --- patches/patch-app_cpp 2 Sep 2012 09:22:59 -0000 1.4 +++ patches/patch-app_cpp 17 Apr 2013 16:27:14 -0000 @@ -2,9 +2,9 @@ $OpenBSD: patch-app_cpp,v 1.4 2012/09/02 add support for bsd_auth/auth_userokay on OpenBSD only call the consolekit stuff if the ck session is okay don't exit if the ck session fails to start ---- app.cpp.orig Tue Jun 26 10:20:14 2012 -+++ app.cpp Sat Sep 1 23:04:49 2012 -@@ -32,6 +32,11 @@ +--- app.cpp.orig Mon Dec 31 10:03:42 2012 ++++ app.cpp Wed Apr 17 13:09:39 2013 +@@ -30,6 +30,11 @@ #include <shadow.h> #endif @@ -16,9 +16,9 @@ don't exit if the ck session fails to st using namespace std; #ifdef USE_PAM -@@ -468,6 +473,12 @@ bool App::AuthenticateUser(bool focuspass){ - if(pw == 0) - return false; +@@ -462,6 +467,12 @@ bool App::AuthenticateUser(bool focuspass){ + if(pw == 0) + return false; +#ifdef __OpenBSD__ + char * pass = strdup(LoginPanel->GetPasswd().c_str()); @@ -27,45 +27,45 @@ don't exit if the ck session fails to st + return ret; +#endif #ifdef HAVE_SHADOW - struct spwd *sp = getspnam(pw->pw_name); - endspent(); -@@ -572,7 +583,6 @@ void App::Login() { - } - catch(Ck::Exception &e) { - logStream << APPNAME << ": " << e << endl; -- exit(ERR_EXIT); - } + struct spwd *sp = getspnam(pw->pw_name); + endspent(); +@@ -565,7 +576,6 @@ void App::Login() { + } + catch(Ck::Exception &e) { + logStream << APPNAME << ": " << e << endl; +- exit(ERR_EXIT); + } #endif -@@ -585,6 +595,7 @@ void App::Login() { - char** child_env = pam.getenvlist(); +@@ -578,6 +588,7 @@ void App::Login() { + char** child_env = pam.getenvlist(); # ifdef USE_CONSOLEKIT -+ if(ck.has_session()) { - char** old_env = child_env; ++ if(ck.has_session()) { + char** old_env = child_env; - // Grow the copy of the environment for the session cookie -@@ -597,6 +608,7 @@ void App::Login() { - memcpy(child_env, old_env, sizeof(char*)*n); - child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); - child_env[n] = NULL; -+ } + /* Grow the copy of the environment for the session cookie */ +@@ -590,6 +601,7 @@ void App::Login() { + memcpy(child_env, old_env, sizeof(char*)*n+1); + child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); + child_env[n] = NULL; ++ } # endif /* USE_CONSOLEKIT */ + #else - pam.end(); -@@ -620,6 +632,7 @@ void App::Login() { - child_env[n++]=StrConcat("MAIL=", maildir.c_str()); - child_env[n++]=StrConcat("XAUTHORITY=", xauthority.c_str()); +@@ -611,6 +623,7 @@ void App::Login() { + child_env[n++]=StrConcat("MAIL=", maildir.c_str()); + child_env[n++]=StrConcat("XAUTHORITY=", xauthority.c_str()); # ifdef USE_CONSOLEKIT -+ if (ck.has_session()) - child_env[n++]=StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); ++ if (ck.has_session()) + child_env[n++]=StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); # endif /* USE_CONSOLEKIT */ - child_env[n++]=0; -@@ -666,6 +679,7 @@ void App::Login() { + child_env[n++]=0; +@@ -657,6 +670,7 @@ void App::Login() { #ifdef USE_CONSOLEKIT - try { -+ if (ck.has_session()) - ck.close_session(); - } - catch(Ck::Exception &e) { + try { ++ if (ck.has_session()) + ck.close_session(); + } + catch(Ck::Exception &e) { Index: patches/patch-image_cpp =================================================================== RCS file: patches/patch-image_cpp diff -N patches/patch-image_cpp --- patches/patch-image_cpp 2 Sep 2012 09:22:59 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-image_cpp,v 1.1 2012/09/02 09:22:59 landry Exp $ ---- image.cpp.orig Sat Sep 1 19:52:57 2012 -+++ image.cpp Sat Sep 1 19:53:20 2012 -@@ -781,7 +781,7 @@ Image::readPng(const char *filename, int *width, int * - (png_infopp) NULL); - } - -- if (setjmp(png_ptr->jmpbuf)) { -+ if (setjmp(png_jmpbuf(png_ptr))) { - goto png_destroy; - } - Index: patches/patch-log_h =================================================================== RCS file: patches/patch-log_h diff -N patches/patch-log_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-log_h 17 Apr 2013 16:27:14 -0000 @@ -0,0 +1,13 @@ +$OpenBSD$ +--- log.h.orig Wed Apr 17 11:16:47 2013 ++++ log.h Wed Apr 17 11:18:06 2013 +@@ -4,9 +4,6 @@ + #ifdef USE_CONSOLEKIT + #include "Ck.h" + #endif +-#ifdef USE_CONSOLEKIT +-#include "PAM.h" +-#endif + #include "const.h" + #include <fstream> + Index: patches/patch-switchuser_cpp =================================================================== RCS file: /cvs/ports/x11/slim/patches/patch-switchuser_cpp,v retrieving revision 1.4 diff -u -p -r1.4 patch-switchuser_cpp --- patches/patch-switchuser_cpp 2 Sep 2012 09:23:00 -0000 1.4 +++ patches/patch-switchuser_cpp 17 Apr 2013 16:27:14 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-switchuser_cpp,v 1.4 2012/09/02 09:23:00 landry Exp $ add missing setusercontext/setsid/setlogin calls. ---- switchuser.cpp.orig Tue Jun 26 10:20:14 2012 -+++ switchuser.cpp Sat Sep 1 20:51:44 2012 +--- switchuser.cpp.orig Mon Dec 31 10:03:42 2012 ++++ switchuser.cpp Wed Apr 17 13:10:36 2013 @@ -10,6 +10,10 @@ */ @@ -16,10 +16,10 @@ add missing setusercontext/setsid/setlog @@ -36,6 +40,9 @@ void SwitchUser::Login(const char* cmd, const char* mc 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) ) { + 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) ) {
