slim do not switch the user login class

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

slim do not switch the user login class

johnw-3
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>

patch-switchuser_cpp (674 bytes) Download Attachment
patch-switchuser_h (372 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: slim do not switch the user login class

Landry Breuil-5
On Sat, Aug 18, 2012 at 05:01:11PM +0800, johnw wrote:

> 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>

I think you should report this upstream. Also, gnome/gdm 3.2 doesnt seem to
do setlogin/setusercontext either, 2.20 was doing setusercontext/setsid but
with a different set of flags:

setusercontext (NULL, pwent, pwent->pw_uid,
    LOGIN_SETLOGIN | LOGIN_SETPATH |
   LOGIN_SETPRIORITY | LOGIN_SETRESOURCES
   LOGIN_SETUMASK | LOGIN_SETUSER |
   LOGIN_SETENV)

Can you elaborate a bit more on what's mandatory, optional, and why you
choose to add those two calls ?

Landry

Reply | Threaded
Open this post in threaded view
|

Re: slim do not switch the user login class

johnw-3
2012/8/19 Landry Breuil <[hidden email]>

>
> Can you elaborate a bit more on what's mandatory, optional, and why you
> choose to add those two calls ?


The original code did setuid(LOGIN_SETUSER) already,
and the openbsd ports already had the patch do setlogin(LOGIN_SETLOGIN),
LOGIN_SETPATH, LOGIN_SETUMASK, LOGIN_SETENV can set by user itself, after
login to X (.profile/.xinitrc),
but LOGIN_SETPRIORITY, LOGIN_SETRESOURCES can not be set by user itself,
after login to X,
so I want to add those two call, and I think use different login class is
wrong. (is it wrong?)
Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: slim do not switch the user login class

Landry Breuil-5
On Sun, Aug 19, 2012 at 11:01:22PM +0800, johnw wrote:

> 2012/8/19 Landry Breuil <[hidden email]>
>
> >
> > Can you elaborate a bit more on what's mandatory, optional, and why you
> > choose to add those two calls ?
>
>
> The original code did setuid(LOGIN_SETUSER) already,
> and the openbsd ports already had the patch do setlogin(LOGIN_SETLOGIN),
> LOGIN_SETPATH, LOGIN_SETUMASK, LOGIN_SETENV can set by user itself, after
> login to X (.profile/.xinitrc),
> but LOGIN_SETPRIORITY, LOGIN_SETRESOURCES can not be set by user itself,
> after login to X,
> so I want to add those two call, and I think use different login class is
> wrong. (is it wrong?)
> Thank you.

As i said, i think this is something you should bring upstream first, to
see what the slim maintainer thinks about it.

Landry

Reply | Threaded
Open this post in threaded view
|

Re: slim do not switch the user login class

johnw-3
2012/8/20 Landry Breuil <[hidden email]>
>
>
> As i said, i think this is something you should bring upstream first, to
> see what the slim maintainer thinks about it.


Hi, I update it to slim-1.34.
Thank you.

diff -u -urN ./Makefile ../slim/Makefile
--- ./Makefile Mon Aug 20 01:33:07 2012
+++ ../slim/Makefile Mon Aug 20 01:40:38 2012
@@ -2,8 +2,7 @@

 COMMENT= simple login manager

-DISTNAME= slim-1.3.2
-REVISION= 5
+DISTNAME= slim-1.3.4

 CATEGORIES= x11
 HOMEPAGE= http://slim.berlios.de/
@@ -16,18 +15,14 @@
 PERMIT_DISTFILES_CDROM= Yes
 PERMIT_DISTFILES_FTP= Yes

-USE_GMAKE= Yes
-USE_GROFF = Yes
-NO_REGRESS= Yes
+MODULES=     devel/cmake
+
 LIB_DEPENDS= graphics/jpeg \
  graphics/png

 WANTLIB= X11 Xft Xmu Xrender fontconfig c m stdc++ z freetype jpeg png

-MAKE_FILE= Makefile.openbsd
-MAKE_FLAGS+= CFGDIR=${SYSCONFDIR}
-FAKE_FLAGS+= PREFIX=${PREFIX} \
- CFGDIR=${PREFIX}/share/examples/slim
+

 pre-configure:
  ${SUBST_CMD} ${WRKSRC}/slim.1 ${WRKSRC}/slim.conf
diff -u -urN ./distinfo ../slim/distinfo
--- ./distinfo Mon Aug 20 01:33:07 2012
+++ ../slim/distinfo Mon Aug 20 01:40:38 2012
@@ -1,5 +1,2 @@
-MD5 (slim-1.3.2.tar.gz) = yhrmEg5vS0lp8tbPlPR7Qg==
-RMD160 (slim-1.3.2.tar.gz) = HKZQTAfqLUIP3oa22w9M+71mgPw=
-SHA1 (slim-1.3.2.tar.gz) = 5CHVSHcyyDF/j1kZBmYeAUsDY1g=
-SHA256 (slim-1.3.2.tar.gz) = 8VYBJQBfJTubiCIFmP7XqVde9AVxaGLGyj/MctvUgrg=
-SIZE (slim-1.3.2.tar.gz) = 220592
+SHA256 (slim-1.3.4.tar.gz) =
155c26460c98b9f0925624028b4254afc0de4fda33300f3ac45606b2c5cbd501
+SIZE (slim-1.3.4.tar.gz) = 227197
diff -u -urN ./patches/patch-CMakeLists_txt
../slim/patches/patch-CMakeLists_txt
--- ./patches/patch-CMakeLists_txt Thu Jan  1 08:00:00 1970
+++ ../slim/patches/patch-CMakeLists_txt Mon Aug 20 01:40:38 2012
@@ -0,0 +1,36 @@
+--- CMakeLists.txt.orig Tue Jun 26 16:20:14 2012
++++ CMakeLists.txt Mon Aug 20 00:57:57 2012
+@@ -21,10 +21,10 @@
+ set(SLIM_VERSION_PATCH "4")
+ set(SLIM_VERSION
"${SLIM_VERSION_MAJOR}.${SLIM_VERSION_MINOR}.${SLIM_VERSION_PATCH}")
+
+-set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory")
++set(CMAKE_INSTALL_PREFIX "${LOCALBASE}" CACHE PATH "Installation
Directory")
+ set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/slim")
+ set(SYSCONFDIR "/etc")
+-set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
++set(MANDIR "${CMAKE_INSTALL_PREFIX}/man")
+
+ set(SLIM_DEFINITIONS)
+ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
+@@ -131,9 +131,9 @@
+ endif(USE_CONSOLEKIT)
+
+ # system librarys
+-find_library(M_LIB m)
+-find_library(RT_LIB rt)
+-find_library(CRYPTO_LIB crypt)
++#find_library(M_LIB m)
++#find_library(RT_LIB rt)
++#find_library(CRYPTO_LIB crypt)
+
+ add_definitions(${SLIM_DEFINITIONS})
+
+@@ -169,6 +169,6 @@
+ # 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/)
+ # themes directory
+ subdirs(themes)
diff -u -urN ./patches/patch-Makefile_openbsd
../slim/patches/patch-Makefile_openbsd
--- ./patches/patch-Makefile_openbsd Thu Oct 25 07:32:00 2007
+++ ../slim/patches/patch-Makefile_openbsd Thu Jan  1 08:00:00 1970
@@ -1,19 +0,0 @@
-$OpenBSD: patch-Makefile_openbsd,v 1.1.1.1 2007/10/24 23:32:00 landry Exp $
---- Makefile.openbsd.orig Wed Oct 24 19:29:25 2007
-+++ Makefile.openbsd Wed Oct 24 19:31:24 2007
-@@ -5,12 +5,10 @@
- #######################################################
- CXX=/usr/bin/g++
- CC=/usr/bin/gcc
--CFLAGS=-I. -I/usr/X11R6/include -I/usr/X11R6/include/freetype2
-I/usr/X11R6/include/freetype2/config -I/usr/local/include/libpng
-I/usr/local/include -I/usr/include
--LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lXft -lX11 -lfreetype
-lXrender -lfontconfig -lpng -lz -lm -lXmu -lpng -ljpeg
-+CFLAGS=-I. -I${X11BASE}/include -I${X11BASE}/include/freetype2
-I${X11BASE}/include/freetype2/config -I${LOCALBASE}/include/libpng
-I${LOCALBASE}/include -I/usr/include
-+LDFLAGS=-L${X11BASE}/lib -L${LOCALBASE}/lib -lXft -lX11 -lfreetype
-lXrender -lfontconfig -lpng -lz -lm -lXmu -lpng -ljpeg
- CUSTOM=-DNEEDS_BASENAME
--PREFIX=/usr
--CFGDIR=/etc
--MANDIR=/usr/share/man
-+MANDIR=${PREFIX}/man
- DESTDIR=
- #######################################################
-
diff -u -urN ./patches/patch-image_cpp ../slim/patches/patch-image_cpp
--- ./patches/patch-image_cpp Thu Jan  1 08:00:00 1970
+++ ../slim/patches/patch-image_cpp Mon Aug 20 01:40:38 2012
@@ -0,0 +1,11 @@
+--- image.cpp.orig Sun Aug 19 23:23:32 2012
++++ image.cpp Sun Aug 19 23:24:25 2012
+@@ -781,7 +781,7 @@
+                                 (png_infopp) NULL);
+     }
+
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+         goto png_destroy;
+     }
+
diff -u -urN ./patches/patch-png_c ../slim/patches/patch-png_c
--- ./patches/patch-png_c Sat Jul  9 04:38:01 2011
+++ ../slim/patches/patch-png_c Thu Jan  1 08:00:00 1970
@@ -1,15 +0,0 @@
-$OpenBSD: patch-png_c,v 1.1 2011/07/08 20:38:01 naddy Exp $
-
-Fix build with png-1.5.
-
---- png.c.orig Wed Jul  6 17:24:44 2011
-+++ png.c Wed Jul  6 17:25:02 2011
-@@ -57,7 +57,7 @@ read_png(const char *filename, int *width, int *height
-         return(0);
-     }
-
--    if (setjmp(png_ptr->jmpbuf))
-+    if (setjmp(png_jmpbuf(png_ptr)))
-     {
-         png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
-         fclose(infile);
diff -u -urN ./patches/patch-switchuser_cpp
../slim/patches/patch-switchuser_cpp
--- ./patches/patch-switchuser_cpp Tue Aug 24 19:37:50 2010
+++ ../slim/patches/patch-switchuser_cpp Mon Aug 20 01:40:38 2012
@@ -1,10 +1,10 @@
-$OpenBSD: patch-switchuser_cpp,v 1.3 2010/08/24 11:37:50 landry Exp $
---- switchuser.cpp.orig Thu Jul  8 07:04:10 2010
-+++ switchuser.cpp Mon Aug 23 21:36:45 2010
-@@ -39,6 +39,8 @@ void SwitchUser::Login(const char* cmd, const char* mc
+--- 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) ||
diff -u -urN ./patches/patch-switchuser_h ../slim/patches/patch-switchuser_h
--- ./patches/patch-switchuser_h Thu Jan  1 08:00:00 1970
+++ ../slim/patches/patch-switchuser_h Mon Aug 20 01:40:38 2012
@@ -0,0 +1,11 @@
+--- 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>

slim.diff (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: slim do not switch the user login class

Landry Breuil-5
On Mon, Aug 20, 2012 at 01:58:33AM +0800, johnw wrote:
> 2012/8/20 Landry Breuil <[hidden email]>
> >
> >
> > As i said, i think this is something you should bring upstream first, to
> > see what the slim maintainer thinks about it.
>
>
> Hi, I update it to slim-1.34.
> Thank you.

I was planning to look into that update since it adds ckit support (and
you didnt explicitely enable/disable it). One thing at a time, please.
See what upstream thinks about setusercontext() first.

Landry

Reply | Threaded
Open this post in threaded view
|

Re: slim do not switch the user login class

johnw-3
2012/8/20 Landry Breuil <[hidden email]>

> I was planning to look into that update since it adds ckit support (and
> you didnt explicitely enable/disable it). One thing at a time, please.
> See what upstream thinks about setusercontext() first.


Hi, I make a new diff (no setusercontext), just update it to 1.34,
and add a FLAVOR="consolekit".
Thank you.

diff -u -urN ./Makefile ../slim/Makefile
--- ./Makefile Mon Aug 20 18:59:58 2012
+++ ../slim/Makefile Mon Aug 20 19:25:54 2012
@@ -2,8 +2,7 @@

 COMMENT= simple login manager

-DISTNAME= slim-1.3.2
-REVISION= 5
+DISTNAME= slim-1.3.4

 CATEGORIES= x11
 HOMEPAGE= http://slim.berlios.de/
@@ -16,18 +15,24 @@
 PERMIT_DISTFILES_CDROM= Yes
 PERMIT_DISTFILES_FTP= Yes

-USE_GMAKE= Yes
-USE_GROFF = Yes
-NO_REGRESS= Yes
+MODULES=     devel/cmake
+
 LIB_DEPENDS= graphics/jpeg \
  graphics/png

-WANTLIB= X11 Xft Xmu Xrender fontconfig c m stdc++ z freetype jpeg png
+WANTLIB= fontconfig X11 Xft Xrender Xmu freetype jpeg png z
+WANTLIB+= stdc++ m c expat xcb Xt SM ICE Xext pthread-stubs
+WANTLIB+= Xau Xdmcp

-MAKE_FILE= Makefile.openbsd
-MAKE_FLAGS+= CFGDIR=${SYSCONFDIR}
-FAKE_FLAGS+= PREFIX=${PREFIX} \
- CFGDIR=${PREFIX}/share/examples/slim
+FLAVORS= consolekit
+FLAVOR?=
+
+.if ${FLAVOR:L:Mconsolekit}
+LIB_DEPENDS+=           sysutils/consolekit x11/dbus
+WANTLIB+=               pthread dbus-1 ck-connector
+CONFIGURE_ARGS= -DUSE_CONSOLEKIT="yes"
+.endif
+

 pre-configure:
  ${SUBST_CMD} ${WRKSRC}/slim.1 ${WRKSRC}/slim.conf
diff -u -urN ./distinfo ../slim/distinfo
--- ./distinfo Mon Aug 20 18:59:58 2012
+++ ../slim/distinfo Mon Aug 20 19:13:50 2012
@@ -1,5 +1,2 @@
-MD5 (slim-1.3.2.tar.gz) = yhrmEg5vS0lp8tbPlPR7Qg==
-RMD160 (slim-1.3.2.tar.gz) = HKZQTAfqLUIP3oa22w9M+71mgPw=
-SHA1 (slim-1.3.2.tar.gz) = 5CHVSHcyyDF/j1kZBmYeAUsDY1g=
-SHA256 (slim-1.3.2.tar.gz) = 8VYBJQBfJTubiCIFmP7XqVde9AVxaGLGyj/MctvUgrg=
-SIZE (slim-1.3.2.tar.gz) = 220592
+SHA256 (slim-1.3.4.tar.gz) =
155c26460c98b9f0925624028b4254afc0de4fda33300f3ac45606b2c5cbd501
+SIZE (slim-1.3.4.tar.gz) = 227197
diff -u -urN ./patches/patch-CMakeLists_txt
../slim/patches/patch-CMakeLists_txt
--- ./patches/patch-CMakeLists_txt Thu Jan  1 08:00:00 1970
+++ ../slim/patches/patch-CMakeLists_txt Mon Aug 20 19:13:50 2012
@@ -0,0 +1,54 @@
+--- CMakeLists.txt.orig Tue Jun 26 16:20:14 2012
++++ CMakeLists.txt Mon Aug 20 17:54:26 2012
+@@ -21,10 +21,10 @@
+ set(SLIM_VERSION_PATCH "4")
+ set(SLIM_VERSION
"${SLIM_VERSION_MAJOR}.${SLIM_VERSION_MINOR}.${SLIM_VERSION_PATCH}")
+
+-set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory")
++set(CMAKE_INSTALL_PREFIX "${LOCALBASE}" CACHE PATH "Installation
Directory")
+ set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/slim")
+ set(SYSCONFDIR "/etc")
+-set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
++set(MANDIR "${CMAKE_INSTALL_PREFIX}/man")
+
+ set(SLIM_DEFINITIONS)
+ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
+@@ -122,6 +122,8 @@
+ else(DBUS_FOUND)
+ message("\tDBus Not Found")
+ endif(DBUS_FOUND)
++ find_library(PTHREAD_LIB pthread)
++ target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIB})
+ else(CKCONNECTOR_FOUND)
+ message("\tConsoleKit Not Found")
+ message("\tConsoleKit disabled")
+@@ -130,11 +132,6 @@
+ message("\tConsoleKit disabled")
+ endif(USE_CONSOLEKIT)
+
+-# system librarys
+-find_library(M_LIB m)
+-find_library(RT_LIB rt)
+-find_library(CRYPTO_LIB crypt)
+-
+ add_definitions(${SLIM_DEFINITIONS})
+
+ #Set up include dirs with all found packages
+@@ -151,9 +148,6 @@
+
+ #Set up library with all found packages
+ target_link_libraries(${PROJECT_NAME}
+- ${M_LIB}
+- ${RT_LIB}
+- ${CRYPTO_LIB}
+ ${X11_X11_LIB}
+ ${X11_Xft_LIB}
+ ${X11_Xrender_LIB}
+@@ -169,6 +163,6 @@
+ # 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/)
+ # themes directory
+ subdirs(themes)
diff -u -urN ./patches/patch-Makefile_openbsd
../slim/patches/patch-Makefile_openbsd
--- ./patches/patch-Makefile_openbsd Thu Oct 25 07:32:00 2007
+++ ../slim/patches/patch-Makefile_openbsd Thu Jan  1 08:00:00 1970
@@ -1,19 +0,0 @@
-$OpenBSD: patch-Makefile_openbsd,v 1.1.1.1 2007/10/24 23:32:00 landry Exp $
---- Makefile.openbsd.orig Wed Oct 24 19:29:25 2007
-+++ Makefile.openbsd Wed Oct 24 19:31:24 2007
-@@ -5,12 +5,10 @@
- #######################################################
- CXX=/usr/bin/g++
- CC=/usr/bin/gcc
--CFLAGS=-I. -I/usr/X11R6/include -I/usr/X11R6/include/freetype2
-I/usr/X11R6/include/freetype2/config -I/usr/local/include/libpng
-I/usr/local/include -I/usr/include
--LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lXft -lX11 -lfreetype
-lXrender -lfontconfig -lpng -lz -lm -lXmu -lpng -ljpeg
-+CFLAGS=-I. -I${X11BASE}/include -I${X11BASE}/include/freetype2
-I${X11BASE}/include/freetype2/config -I${LOCALBASE}/include/libpng
-I${LOCALBASE}/include -I/usr/include
-+LDFLAGS=-L${X11BASE}/lib -L${LOCALBASE}/lib -lXft -lX11 -lfreetype
-lXrender -lfontconfig -lpng -lz -lm -lXmu -lpng -ljpeg
- CUSTOM=-DNEEDS_BASENAME
--PREFIX=/usr
--CFGDIR=/etc
--MANDIR=/usr/share/man
-+MANDIR=${PREFIX}/man
- DESTDIR=
- #######################################################
-
diff -u -urN ./patches/patch-image_cpp ../slim/patches/patch-image_cpp
--- ./patches/patch-image_cpp Thu Jan  1 08:00:00 1970
+++ ../slim/patches/patch-image_cpp Mon Aug 20 19:13:50 2012
@@ -0,0 +1,11 @@
+--- image.cpp.orig Sun Aug 19 23:23:32 2012
++++ image.cpp Sun Aug 19 23:24:25 2012
+@@ -781,7 +781,7 @@
+                                 (png_infopp) NULL);
+     }
+
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+         goto png_destroy;
+     }
+
diff -u -urN ./patches/patch-png_c ../slim/patches/patch-png_c
--- ./patches/patch-png_c Sat Jul  9 04:38:01 2011
+++ ../slim/patches/patch-png_c Thu Jan  1 08:00:00 1970
@@ -1,15 +0,0 @@
-$OpenBSD: patch-png_c,v 1.1 2011/07/08 20:38:01 naddy Exp $
-
-Fix build with png-1.5.
-
---- png.c.orig Wed Jul  6 17:24:44 2011
-+++ png.c Wed Jul  6 17:25:02 2011
-@@ -57,7 +57,7 @@ read_png(const char *filename, int *width, int *height
-         return(0);
-     }
-
--    if (setjmp(png_ptr->jmpbuf))
-+    if (setjmp(png_jmpbuf(png_ptr)))
-     {
-         png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
-         fclose(infile);
diff -u -urN ./pkg/MESSAGE ../slim/pkg/MESSAGE
--- ./pkg/MESSAGE Thu Nov 11 17:27:14 2010
+++ ../slim/pkg/MESSAGE Mon Aug 20 19:13:50 2012
@@ -1,3 +1,8 @@
 If you're upgrading from a version older than 1.3.2 and have modified
 ${SYSCONFDIR}/slim.conf, make sure to remove './' from default_path
 configuration directive.
+
+FLAVOR: consolekit
+add this to ~/.xinitrc
+/usr/local/bin/ck-launch-session $YOUR-XSESSION
+(eg: /usr/local/bin/ck-launch-session /usr/local/bin/startxfce4)

slim.diff (8K) Download Attachment