rpms/lxdm/devel lxdm-0.2.0-fix-env-XAUTHORITY.patch, NONE, 1.1 lxdm.spec, 1.12, 1.13
Christoph Wickert
cwickert at fedoraproject.org
Tue May 18 17:24:46 UTC 2010
Author: cwickert
Update of /cvs/pkgs/rpms/lxdm/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv27236/devel
Modified Files:
lxdm.spec
Added Files:
lxdm-0.2.0-fix-env-XAUTHORITY.patch
Log Message:
* Mon May 17 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-4
- Fix env XAUTHORITY bug
lxdm-0.2.0-fix-env-XAUTHORITY.patch:
lxdm.c | 41 +++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)
--- NEW FILE lxdm-0.2.0-fix-env-XAUTHORITY.patch ---
>From 093e79c41ab0276d627af732a45473d3571a689f Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa at gmail.com>
Date: Tue, 18 May 2010 22:41:41 +0800
Subject: [PATCH] fix env XAUTHORITY bug
---
src/lxdm.c | 40 +++++++++++++++++++++-------------------
1 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/src/lxdm.c b/src/lxdm.c
index a6dbb40..908c7c7 100644
--- a/src/lxdm.c
+++ b/src/lxdm.c
@@ -313,6 +313,22 @@ void free_xsessions(GSList *l)
g_slist_free(l);
}
+static void replace_env(char** env, const char* name, const char* new_val)
+{
+ register char** penv;
+ for(penv = env; *penv; ++penv)
+ {
+ if(g_str_has_prefix(*penv, name))
+ {
+ g_free(*penv);
+ *penv = g_strconcat(name, new_val, NULL);
+ return;
+ }
+ }
+ *penv = g_strconcat(name, new_val, NULL);
+ *(penv + 1) = NULL;
+}
+
#ifndef DISABLE_XAUTH
void create_server_auth(void)
{
@@ -384,7 +400,7 @@ void create_server_auth(void)
g_free(authfile);
}
-void create_client_auth(char *home)
+void create_client_auth(char *home,char **env)
{
char *authfile;
@@ -406,6 +422,7 @@ void create_client_auth(char *home)
system(tmp);
g_free(tmp);
#endif
+ replace_env(env,"XAUTHORITY=",authfile);
g_free(authfile);
}
#endif
@@ -618,7 +635,7 @@ void switch_user(struct passwd *pw, char *run, char **env)
close(fd);
}
#ifndef DISABLE_XAUTH
- create_client_auth(pw->pw_dir);
+ create_client_auth(pw->pw_dir,env);
#endif
g_spawn_command_line_async ("/etc/lxdm/PostLogin",NULL);
execle("/etc/lxdm/Xsession", "/etc/lxdm/Xsession", run, NULL, env);
@@ -923,22 +940,6 @@ static void on_session_stop(GPid pid, gint status, gpointer data)
child_watch=0;
}
-static void replace_env(char** env, const char* name, const char* new_val)
-{
- register char** penv;
- for(penv = env; *penv; ++penv)
- {
- if(g_str_has_prefix(*penv, name))
- {
- g_free(*penv);
- *penv = g_strconcat(name, new_val, NULL);
- return;
- }
- }
- *penv = g_strconcat(name, new_val, NULL);
- *(penv + 1) = NULL;
-}
-
gboolean lxdm_get_session_info(char *session,char **pname,char **pexec)
{
char *name=NULL,*exec=NULL;
@@ -1065,7 +1066,8 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang)
if( child == 0 )
{
char** env, *path;
- int n_env = g_strv_length(environ), i;
+ int n_env,i;
+ n_env = g_strv_length(environ);
/* copy all environment variables and override some of them */
env = g_new(char*, n_env + 1 + 13);
for( i = 0; i < n_env; ++i )
--
1.6.3
Index: lxdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lxdm/devel/lxdm.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -p -r1.12 -r1.13
--- lxdm.spec 17 May 2010 16:45:56 -0000 1.12
+++ lxdm.spec 18 May 2010 17:24:45 -0000 1.13
@@ -2,7 +2,7 @@
Name: lxdm
Version: 0.2.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Lightweight X11 Display Manager
Group: User Interface/Desktops
@@ -17,6 +17,8 @@ Patch1: lxdm-0.2.0-fix-some-env-
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
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=093e79c41ab0276d627af732a45473d3571a689f
+Patch4: lxdm-0.2.0-fix-env-XAUTHORITY.patch
## Distro specific patches ##
# Distro artwork, start on vt1
Patch10: lxdm-0.2.0-config.patch
@@ -48,6 +50,7 @@ KDM in LXDE distros. It's still in very
%patch1 -p1 -b .some-env-set-bug
%patch2 -p1 -b .fix-left-env-bug
%patch3 -p1 -b .add-debug-option
+%patch4 -p1 -b .fix-env-XAUTHORITY
%patch10 -p1 -b .config
%patch11 -p1 -b .orig
@@ -98,6 +101,9 @@ rm -rf %{buildroot}
%changelog
+* Mon May 17 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-4
+- Fix env XAUTHORITY bug
+
* 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
More information about the scm-commits
mailing list