rpms/lxdm/F-13 lxdm-0.2.0-add-debug-option.patch, NONE, 1.1 lxdm-0.2.0-fix-left-env-bug.patch, NONE, 1.1 lxdm-0.2.0-fix-some-env-set-bug.patch, NONE, 1.1 lxdm.spec, 1.10, 1.11
Christoph Wickert
cwickert at fedoraproject.org
Mon May 17 16:45:56 UTC 2010
Author: cwickert
Update of /cvs/pkgs/rpms/lxdm/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv10630/F-13
Modified Files:
lxdm.spec
Added Files:
lxdm-0.2.0-add-debug-option.patch
lxdm-0.2.0-fix-left-env-bug.patch
lxdm-0.2.0-fix-some-env-set-bug.patch
Log Message:
* Sun May 16 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-3
- Fix permissions of /var/run/lxdm
- Add patches to fix some env settings
- Add --debug option
lxdm-0.2.0-add-debug-option.patch:
configure.ac | 9 +++++++++
src/lxdm.c | 40 +++++++++++++++++++++++++++++++++++++---
2 files changed, 46 insertions(+), 3 deletions(-)
--- NEW FILE lxdm-0.2.0-add-debug-option.patch ---
>From 3c6502affe326777d6ce481f9bb04ce7f3223ea6 Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa at gmail.com>
Date: Mon, 17 May 2010 21:59:31 +0800
Subject: [PATCH 12/12] add debug option
---
configure.ac | 9 +++++++++
src/lxdm.c | 39 +++++++++++++++++++++++++++++++++++++--
2 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7a7bea4..88b08ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,6 +84,15 @@ else
AC_CHECK_LIB([Xau],[XauWriteAuth])
fi
+AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--enable-debug],[enable detailed debug]),
+ [enable_debug=$enablevar],
+ [enable_debug=yes]
+)
+if test "x$enable_debug" = "x$yes" ; then
+ CFLAGS="$CFLAGS -DLXDM_DEBUG"
+fi
+
GETTEXT_PACKAGE=lxdm
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
diff --git a/src/lxdm.c b/src/lxdm.c
index e34b20b..a6dbb40 100644
--- a/src/lxdm.c
+++ b/src/lxdm.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdarg.h>
#include <ctype.h>
#include <unistd.h>
#include <stdarg.h>
@@ -239,6 +240,12 @@ void log_print(char *fmt, ...)
fclose(log);
}
+#ifdef LXDM_DEBUG
+#define dbg_printf log_print
+#else
+#define dbg_printf(fmt,...)
+#endif
+
GSList *do_scan_xsessions(void)
{
GSList *xsessions = NULL;
@@ -445,18 +452,33 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
char *enc;
#endif
if( !user )
+ {
+ dbg_printf("user==NULL\n");
return AUTH_ERROR;
+ }
if( !user[0] )
+ {
+ dbg_printf("user[0]==0\n");
return AUTH_BAD_USER;
+ }
pw = getpwnam(user);
endpwent();
if( !pw )
+ {
+ dbg_printf("user %s not found\n",user);
return AUTH_BAD_USER;
+ }
if( !pass )
{
*ppw = pw;
+ dbg_printf("user %s auth ok\n",user);
return AUTH_SUCCESS;
}
+ if(strstr(pw->pw_shell, "nologin"))
+ {
+ dbg_printf("user %s have nologin shell\n");
+ return AUTH_PRIV;
+ }
#if !HAVE_LIBPAM
sp = getspnam(user);
if( !sp )
@@ -468,21 +490,27 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
if( !pass[0] )
{
*ppw = pw;
+ dbg_printf("user %s auth with no password ok\n",user);
return AUTH_SUCCESS;
}
else
+ {
+ dbg_printf("user %s password not match\n");
return AUTH_FAIL;
+ }
}
enc = crypt(pass, real);
if( strcmp(real, enc) )
+ {
+ dbg_printf("user %s password not match\n");
return AUTH_FAIL;
- if( strstr(pw->pw_shell, "nologin") )
- return AUTH_PRIV;
+ }
#else
if(pamh) pam_end(pamh,0);
if(PAM_SUCCESS != pam_start("lxdm", pw->pw_name, &conv, &pamh))
{
pamh=NULL;
+ dbg_printf("user %s start pam fail\n",user);
return AUTH_FAIL;
}
else
@@ -492,11 +520,15 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
ret=pam_authenticate(pamh,PAM_SILENT);
user_pass[0]=0;user_pass[1]=0;
if(ret!=PAM_SUCCESS)
+ {
+ dbg_printf("user %s auth fail with %d\n",user,ret);
return AUTH_FAIL;
+ }
//ret=pam_setcred(pamh, PAM_ESTABLISH_CRED);
}
#endif
*ppw = pw;
+ dbg_printf("user %s auth ok\n",pw->pw_name);
return AUTH_SUCCESS;
}
@@ -995,9 +1027,12 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang)
if(alloc_lang)
g_free(lang);
ui_prepare();
+ dbg_printf("get session %s info fail\n",session);
return;
}
+ dbg_printf("login user %s session %s lang %s\n",pw->pw_name,session_exec,lang);
+
if( pw->pw_shell[0] == '\0' )
{
setusershell();
--
1.7.0.1
lxdm-0.2.0-fix-left-env-bug.patch:
greeter.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- NEW FILE lxdm-0.2.0-fix-left-env-bug.patch ---
>From 3cf91b090c7ba78eefc2e530e9ea50ac6c6dbd2c Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa at gmail.com>
Date: Tue, 11 May 2010 21:48:50 +0800
Subject: [PATCH 08/12] fix left env bug
---
src/greeter.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/greeter.c b/src/greeter.c
index 761082e..21e31d4 100644
--- a/src/greeter.c
+++ b/src/greeter.c
@@ -754,7 +754,7 @@ int main(int arc, char *arg[])
p=gtk_settings_get_default();
if(p)
{
- putenv("GTK_IM_MODULE=gtk-im-context-simple");
+ setenv("GTK_IM_MODULE","gtk-im-context-simple",1);
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);
}
--
1.7.0.1
lxdm-0.2.0-fix-some-env-set-bug.patch:
lxdm.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
--- NEW FILE lxdm-0.2.0-fix-some-env-set-bug.patch ---
>From 08bc773ed867bd65c8b36f16795193afebe4a77e Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa at gmail.com>
Date: Tue, 11 May 2010 21:27:21 +0800
Subject: [PATCH 07/12] fix some env set bug
---
src/lxdm.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/lxdm.c b/src/lxdm.c
index 6065e95..e34b20b 100644
--- a/src/lxdm.c
+++ b/src/lxdm.c
@@ -342,7 +342,7 @@ void create_server_auth(void)
mkdir("/var/run/lxdm",0700);
authfile = g_strdup("/var/run/lxdm/lxdm.auth");
}
- setenv("XAUTHORITY",authfile,0);
+ setenv("XAUTHORITY",authfile,1);
remove(authfile);
#if HAVE_LIBXAU
FILE *fp=fopen(authfile,"wb");
@@ -721,7 +721,7 @@ void startx(void)
char **args;
if(!getenv("DISPLAY"))
- putenv("DISPLAY=:0");
+ setenv("DISPLAY",":0",1);
#ifndef DISABLE_XAUTH
create_server_auth();
@@ -1070,9 +1070,6 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang)
if(alloc_lang)
g_free(lang);
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)
--
1.7.0.1
Index: lxdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lxdm/F-13/lxdm.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- lxdm.spec 9 May 2010 20:49:23 -0000 1.10
+++ lxdm.spec 17 May 2010 16:45:56 -0000 1.11
@@ -2,7 +2,7 @@
Name: lxdm
Version: 0.2.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Lightweight X11 Display Manager
Group: User Interface/Desktops
@@ -11,6 +11,12 @@ URL: http://lxde.org
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
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=08bc773ed867bd65c8b36f16795193afebe4a77e
+Patch1: lxdm-0.2.0-fix-some-env-set-bug.patch
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=3cf91b090c7ba78eefc2e530e9ea50ac6c6dbd2c
+Patch2: lxdm-0.2.0-fix-left-env-bug.patch
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=3c6502affe326777d6ce481f9bb04ce7f3223ea6
+Patch3: lxdm-0.2.0-add-debug-option.patch
## Distro specific patches ##
# Distro artwork, start on vt1
Patch10: lxdm-0.2.0-config.patch
@@ -39,7 +45,9 @@ KDM in LXDE distros. It's still in very
%prep
%setup -q
%patch0 -p1 -b .selinux
-#%patch1 -p1 -b .var-lib
+%patch1 -p1 -b .some-env-set-bug
+%patch2 -p1 -b .fix-left-env-bug
+%patch3 -p1 -b .add-debug-option
%patch10 -p1 -b .config
%patch11 -p1 -b .orig
@@ -56,12 +64,9 @@ make install DESTDIR=%{buildroot} INSTAL
# these files are not in the package, but should be owned by lxdm
touch %{buildroot}%{_sysconfdir}/%{name}/xinitrc
-mkdir -p %{buildroot}%{_localstatedir}/run
-touch %{buildroot}%{_localstatedir}/run/%{name}.pid
-mkdir -p %{buildroot}%{_localstatedir}/log
-touch %{buildroot}%{_localstatedir}/log/%{name}.log
-
+mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
+touch %{buildroot}%{_localstatedir}/lib/%{name}.conf
%clean
@@ -87,12 +92,17 @@ rm -rf %{buildroot}
%{_sbindir}/lxdm-binary
%{_libexecdir}/lxdm-greeter-gtk
%{_datadir}/%{name}/
-%ghost %{_localstatedir}/run/%{name}.pid
-%ghost %{_localstatedir}/log/%{name}.log
-
+%dir %{_localstatedir}/run/%{name}
%dir %{_localstatedir}/lib/%{name}
+%ghost %{_localstatedir}/lib/%{name}.conf
+
%changelog
+* Sun May 16 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-3
+- Fix permissions of /var/run/lxdm
+- Add patches to fix some env settings
+- Add --debug option
+
* Sun May 09 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-2
- Patch for SELinux problems (#564320)
More information about the scm-commits
mailing list