rpms/lxdm/devel lxdm-0.2.0-selinux.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 lxdm-0.2.0-config.patch, 1.2, 1.3 lxdm.spec, 1.10, 1.11 sources, 1.6, 1.7
Christoph Wickert
cwickert at fedoraproject.org
Sun May 9 20:49:24 UTC 2010
- Previous message: rpms/lxdm/F-13 .cvsignore, 1.5, 1.6 lxdm-0.2.0-config.patch, 1.2, 1.3 lxdm.spec, 1.9, 1.10 sources, 1.5, 1.6
- Next message: rpms/mojito/F-13 mojito.spec,1.29,1.30
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cwickert
Update of /cvs/pkgs/rpms/lxdm/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv9845/devel
Modified Files:
.cvsignore lxdm-0.2.0-config.patch lxdm.spec sources
Added Files:
lxdm-0.2.0-selinux.patch
Log Message:
* Sun May 09 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-2
- Patch for SELinux problems (#564320)
lxdm-0.2.0-selinux.patch:
greeter.c | 25 +++++++++++++++++++------
lxdm.c | 51 ++++++++++++++++++++++++++++++++++++---------------
ui.c | 4 ++--
3 files changed, 57 insertions(+), 23 deletions(-)
--- NEW FILE lxdm-0.2.0-selinux.patch ---
>From 00eb4d081b0f5638ffef41c379db104aa6f80915 Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa at gmail.com>
Date: Sat, 8 May 2010 20:44:30 +0800
Subject: [PATCH] I hate selinux
---
src/greeter.c | 25 +++++++++++++++++++------
src/lxdm.c | 51 ++++++++++++++++++++++++++++++++++++---------------
src/ui.c | 3 ++-
3 files changed, 57 insertions(+), 22 deletions(-)
diff --git a/src/greeter.c b/src/greeter.c
index 8321452..761082e 100644
--- a/src/greeter.c
+++ b/src/greeter.c
@@ -29,6 +29,8 @@
#include "lang.h"
#include <time.h>
+#include <stdlib.h>
+#include <sys/stat.h>
enum {
COL_SESSION_NAME,
@@ -43,9 +45,8 @@ enum {
N_LANG_COLS
};
-#ifndef VCONFIG_FILE
-#define VCONFIG_FILE "/etc/lxdm/lxdm.conf"
-#endif
+#define VCONFIG_PATH "/var/lib/lxdm"
+#define VCONFIG_FILE "/var/lib/lxdm/lxdm.conf"
static gboolean config_changed = FALSE;
static GKeyFile *config;
@@ -58,7 +59,7 @@ static GtkWidget* prompt;
static GtkWidget* sessions;
static GtkWidget* lang;
-static GtkWidget* exit;
+static GtkWidget* exit_btn;
static GtkWidget* exit_menu;
static GtkWidget *lang_menu;
@@ -445,7 +446,7 @@ static void load_exit()
gtk_menu_shell_append(GTK_MENU_SHELL(exit_menu), item);
gtk_widget_show_all(exit_menu);
- g_signal_connect(exit, "clicked", G_CALLBACK(on_exit_clicked), NULL);
+ g_signal_connect(exit_btn, "clicked", G_CALLBACK(on_exit_clicked), NULL);
}
static gboolean on_expose(GtkWidget* widget, GdkEventExpose* evt, gpointer user_data)
@@ -595,7 +596,7 @@ static void create_win()
on_timeout((GtkLabel*)w);
}
- exit = (GtkWidget*)gtk_builder_get_object(builder, "exit");
+ exit_btn = (GtkWidget*)gtk_builder_get_object(builder, "exit");
load_exit();
g_object_unref(builder);
@@ -735,6 +736,7 @@ static void apply_theme(const char* theme_name)
int main(int arc, char *arg[])
{
char* theme_name;
+ GtkSettings*p;
gtk_set_locale();
bindtextdomain("lxdm", "/usr/share/locale");
@@ -749,6 +751,14 @@ int main(int arc, char *arg[])
gtk_init(&arc, &arg);
+ p=gtk_settings_get_default();
+ if(p)
+ {
+ putenv("GTK_IM_MODULE=gtk-im-context-simple");
+ gtk_settings_set_string_property(p,"gtk-im-module","gtk-im-context-simple",0);
+ gtk_settings_set_long_property(p,"gtk-show-input-method-menu",0,0);
+ }
+
set_background();
set_root_background();
@@ -782,6 +792,9 @@ int main(int arc, char *arg[])
{
gsize len;
char* data = g_key_file_to_data(var_config, &len, NULL);
+#ifdef VCONFIG_PATH
+ mkdir(VCONFIG_PATH,0700);
+#endif
g_file_set_contents(VCONFIG_FILE, data, len, NULL);
g_free(data);
}
diff --git a/src/lxdm.c b/src/lxdm.c
index ff4d362..6065e95 100644
--- a/src/lxdm.c
+++ b/src/lxdm.c
@@ -84,6 +84,7 @@ static Window *my_xid;
static unsigned int my_xid_n;
static char *self;
static pid_t child;
+static guint child_watch;
static int reason;
static int old_tty=1,tty = 7;
@@ -311,7 +312,6 @@ void create_server_auth(void)
GRand *h;
int i;
char *authfile;
- char *tmp;
h = g_rand_new();
#if HAVE_LIBXAU
@@ -342,9 +342,7 @@ void create_server_auth(void)
mkdir("/var/run/lxdm",0700);
authfile = g_strdup("/var/run/lxdm/lxdm.auth");
}
- tmp = g_strdup_printf("XAUTHORITY=%s", authfile);
- putenv(tmp);
- g_free(tmp);
+ setenv("XAUTHORITY",authfile,0);
remove(authfile);
#if HAVE_LIBXAU
FILE *fp=fopen(authfile,"wb");
@@ -370,7 +368,7 @@ void create_server_auth(void)
fclose(fp);
}
#else
- tmp = g_strdup_printf("xauth -q -f %s add %s . %s",
+ char *tmp = g_strdup_printf("xauth -q -f %s add %s . %s",
authfile, getenv("DISPLAY"), mcookie);
system(tmp);
g_free(tmp);
@@ -415,12 +413,17 @@ static int do_conv(int num, const struct pam_message **msg,struct pam_response *
*resp = (struct pam_response *) calloc(num, sizeof(struct pam_response));
for(i=0;i<num;i++)
{
+ //printf("MSG: %d %s\n",msg[i]->msg_style,msg[i]->msg);
switch(msg[i]->msg_style){
case PAM_PROMPT_ECHO_ON:
- resp[i]->resp=strdup(user_pass[0]);
+ resp[i]->resp=strdup(user_pass[0]?user_pass[0]:"");
break;
case PAM_PROMPT_ECHO_OFF:
- resp[i]->resp=strdup(user_pass[1]);
+ resp[i]->resp=strdup(user_pass[1]?user_pass[1]:"");
+ break;
+ case PAM_ERROR_MSG:
+ case PAM_TEXT_INFO:
+ //printf("PAM: %s\n",msg[i]->msg);
break;
default:
break;
@@ -436,9 +439,11 @@ static struct pam_conv conv={.conv=do_conv,.appdata_ptr=user_pass};
int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
{
struct passwd *pw;
+#if !HAVE_LIBPAM
struct spwd *sp;
char *real;
char *enc;
+#endif
if( !user )
return AUTH_ERROR;
if( !user[0] )
@@ -452,6 +457,7 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
*ppw = pw;
return AUTH_SUCCESS;
}
+#if !HAVE_LIBPAM
sp = getspnam(user);
if( !sp )
return AUTH_FAIL;
@@ -472,18 +478,25 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
return AUTH_FAIL;
if( strstr(pw->pw_shell, "nologin") )
return AUTH_PRIV;
- *ppw = pw;
-#if HAVE_LIBPAM
+#else
if(pamh) pam_end(pamh,0);
if(PAM_SUCCESS != pam_start("lxdm", pw->pw_name, &conv, &pamh))
+ {
pamh=NULL;
+ return AUTH_FAIL;
+ }
else
{
+ int ret;
user_pass[0]=user;user_pass[1]=pass;
- pam_authenticate(pamh,PAM_SILENT);
- user_pass[0]=0;user_pass[1]=0;
+ ret=pam_authenticate(pamh,PAM_SILENT);
+ user_pass[0]=0;user_pass[1]=0;
+ if(ret!=PAM_SUCCESS)
+ return AUTH_FAIL;
+ //ret=pam_setcred(pamh, PAM_ESTABLISH_CRED);
}
#endif
+ *ppw = pw;
return AUTH_SUCCESS;
}
@@ -502,7 +515,7 @@ void setup_pam_session(struct passwd *pw,char *session_name)
sprintf(x, "tty%d", tty);
pam_set_item(pamh, PAM_TTY, x);
#ifdef PAM_XDISPLAY
- pam_set_item( pamh, PAM_XDISPLAY, getenv("DISPLAY") );
+ pam_set_item( pamh, PAM_XDISPLAY, getenv("DISPLAY") );
#endif
if(session_name && session_name[0])
@@ -514,7 +527,7 @@ void setup_pam_session(struct passwd *pw,char *session_name)
}
err = pam_open_session(pamh, 0); /* FIXME pam session failed */
if( err != PAM_SUCCESS )
- log_print( "pam open session error \"%s\"\n", pam_strerror(pamh, err) );
+ log_print( "pam open session error \"%s\"\n", pam_strerror(pamh, err));
}
void close_pam_session(void)
@@ -522,6 +535,7 @@ void close_pam_session(void)
int err;
if( !pamh ) return;
err = pam_close_session(pamh, 0);
+ //err=pam_setcred(pamh, PAM_DELETE_CRED);
pam_end(pamh, err);
pamh = NULL;
}
@@ -666,6 +680,7 @@ static void on_xserver_stop(GPid pid, gint status, gpointer data)
//log_print("xserver stop, restart. return status %x\n",status);
stop_pid(server);
server = -1;
+ server_watch=0;
lxdm_restart_self();
}
@@ -705,7 +720,7 @@ void startx(void)
char *arg;
char **args;
- if( !getenv("DISPLAY") )
+ if(!getenv("DISPLAY"))
putenv("DISPLAY=:0");
#ifndef DISABLE_XAUTH
@@ -753,6 +768,7 @@ void exit_cb(void)
if(server_watch>0)
{
g_source_remove(server_watch);
+ server_watch=0;
}
if( server > 0 )
{
@@ -871,6 +887,8 @@ static void on_session_stop(GPid pid, gint status, gpointer data)
}
ui_prepare();
g_spawn_command_line_async("/etc/lxdm/PostLogout",NULL);
+
+ child_watch=0;
}
static void replace_env(char** env, const char* name, const char* new_val)
@@ -1051,7 +1069,10 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang)
g_free(session);
if(alloc_lang)
g_free(lang);
- g_child_watch_add(pid, on_session_stop, 0);
+ child_watch=g_child_watch_add(pid, on_session_stop, 0);
+
+ printf("xserver %d\n",server_watch);
+ printf("session %d\n",child_watch);
}
void lxdm_do_reboot(void)
diff --git a/src/ui.c b/src/ui.c
index 1eb11f5..1ca7b50 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -274,6 +274,7 @@ void ui_drop(void)
close(greeter_pipe[0]);
g_source_remove(greeter_watch);
+ greeter_watch=0;
waitpid(greeter, 0, 0) ;
greeter=-1;
}
@@ -455,7 +456,7 @@ static void on_greeter_exit(GPid pid, gint status, gpointer data)
if( pid != greeter )
return;
greeter = -1;
- g_source_remove(greeter_watch);
+ greeter_watch=0;
}
void ui_prepare(void)
--
1.6.3
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/lxdm/devel/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- .cvsignore 5 Apr 2010 20:38:57 -0000 1.6
+++ .cvsignore 9 May 2010 20:49:23 -0000 1.7
@@ -1 +1 @@
-lxdm-20100405gitd65ce94.tar.bz2
+lxdm-0.2.0.tar.gz
lxdm-0.2.0-config.patch:
lxdm.conf.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: lxdm-0.2.0-config.patch
===================================================================
RCS file: /cvs/pkgs/rpms/lxdm/devel/lxdm-0.2.0-config.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- lxdm-0.2.0-config.patch 17 Apr 2010 09:22:31 -0000 1.2
+++ lxdm-0.2.0-config.patch 9 May 2010 20:49:24 -0000 1.3
@@ -1,7 +1,7 @@
--- lxdm.orig/data/lxdm.conf.in 2010-02-23 23:32:31.000000000 +0100
+++ lxdm/data/lxdm.conf.in 2010-02-24 00:52:27.000000000 +0100
@@ -5,11 +5,11 @@
- greeter=@libexecdir@/lxdm-greeter-gtk
+ greeter=@FULL_LIBEXECDIR@/lxdm-greeter-gtk
[server]
-# arg=/usr/bin/X -nr vt1
Index: lxdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lxdm/devel/lxdm.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- lxdm.spec 17 Apr 2010 09:22:31 -0000 1.10
+++ lxdm.spec 9 May 2010 20:49:24 -0000 1.11
@@ -1,24 +1,18 @@
# Review at https://bugzilla.redhat.com/show_bug.cgi?id=540034
-%global gitdate 20100405
-%global gitversion d65ce94
-%global alphatag .%{gitdate}git%{gitversion}
-
Name: lxdm
Version: 0.2.0
-Release: 0.3%{?alphatag}%{?dist}
+Release: 2%{?dist}
Summary: Lightweight X11 Display Manager
Group: User Interface/Desktops
License: GPLv2+ and LGPLv2+
URL: http://lxde.org
-#Source0: http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz
-# Source0 was generated as follows:
-# git clone git://lxde.git.sourceforge.net/gitroot/lxde/lxdm
-# cd lxdm
-# git archive --format=tar --prefix=%{name}/ %{gitversion} | bzip2 > %{name}-%{gitdate}git%{gitversion}.tar.bz2
-Source0: %{name}-%{gitdate}git%{gitversion}.tar.bz2
-## distro specific patches ##
+Source0: http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=00eb4d081b0f5638ffef41c379db104aa6f80915
+Patch0: lxdm-0.2.0-selinux.patch
+## Distro specific patches ##
+# Distro artwork, start on vt1
Patch10: lxdm-0.2.0-config.patch
# SELinux, permit graphical root login etc.
Patch11: lxdm-svn2262-pam.patch
@@ -29,11 +23,6 @@ BuildRequires: iso-codes-devel
BuildRequires: ConsoleKit-devel
BuildRequires: pam-devel
BuildRequires: intltool >= 0.40.0
-
-# for autogen.sh
-BuildRequires: automake
-BuildRequires: libtool
-
Requires: pam
Requires: /sbin/shutdown
Requires: desktop-backgrounds-compat
@@ -48,17 +37,14 @@ KDM in LXDE distros. It's still in very
%prep
-%setup -qn lxdm
-
-export NOCONFIGURE=yes
-sh autogen.sh
-
+%setup -q
+%patch0 -p1 -b .selinux
+#%patch1 -p1 -b .var-lib
%patch10 -p1 -b .config
%patch11 -p1 -b .orig
%build
-./autogen.sh
%configure
make %{?_smp_mflags} V=1
@@ -75,6 +61,8 @@ touch %{buildroot}%{_localstatedir}/run/
mkdir -p %{buildroot}%{_localstatedir}/log
touch %{buildroot}%{_localstatedir}/log/%{name}.log
+mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
+
%clean
rm -rf %{buildroot}
@@ -102,7 +90,15 @@ rm -rf %{buildroot}
%ghost %{_localstatedir}/run/%{name}.pid
%ghost %{_localstatedir}/log/%{name}.log
+%dir %{_localstatedir}/lib/%{name}
+
%changelog
+* Sun May 09 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-2
+- Patch for SELinux problems (#564320)
+
+* Wed May 05 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-1
+- Update to 0.2.0
+
* Sat Apr 17 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-0.3.20100405gitd65ce94
- Adjustments for recent Goddard artwork changes
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/lxdm/devel/sources,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- sources 5 Apr 2010 20:38:57 -0000 1.6
+++ sources 9 May 2010 20:49:24 -0000 1.7
@@ -1 +1 @@
-3f3de11c5503af1c156674c6f4b2095f lxdm-20100405gitd65ce94.tar.bz2
+e539f81ba691f2b0cb2017b82dfee58f lxdm-0.2.0.tar.gz
- Previous message: rpms/lxdm/F-13 .cvsignore, 1.5, 1.6 lxdm-0.2.0-config.patch, 1.2, 1.3 lxdm.spec, 1.9, 1.10 sources, 1.5, 1.6
- Next message: rpms/mojito/F-13 mojito.spec,1.29,1.30
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list