summaryrefslogtreecommitdiffstats
path: root/kdm/backend/client.c
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
commit10e41144596fc9ced40fc349d9ecd099b1c2ea19 (patch)
tree88ab04e475ff5a4cd889cb082f5760b6e0bf5e4e /kdm/backend/client.c
parent4aed2c8219774f5d797760606b8489a92ddc5163 (diff)
downloadtdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.tar.gz
tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.zip
Initial import of Trinity 3.5.11 to kdebase
Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdm/backend/client.c')
-rw-r--r--kdm/backend/client.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/kdm/backend/client.c b/kdm/backend/client.c
index c807b6e15..b2e7ebbc7 100644
--- a/kdm/backend/client.c
+++ b/kdm/backend/client.c
@@ -83,6 +83,10 @@ extern int loginsuccess( const char *User, const char *Host, const char *Tty, ch
#endif
#include <signal.h>
+#ifdef WITH_CONSOLE_KIT
+#include "consolekit.h"
+#endif
+
/*
* Session data, mostly what struct verify_info was for
*/
@@ -310,7 +314,7 @@ doPAMAuth( const char *psrv, struct pam_data *pdata )
V_RET_FAIL( 0 );
}
if ((td->displayType & d_location) == dForeign) {
- char *cp = strchr( td->name, ':' );
+ char *cp = (char*)strchr( td->name, ':' );
*cp = 0;
pretc = pam_set_item( pamh, PAM_RHOST, td->name );
*cp = ':';
@@ -495,7 +499,7 @@ Verify( GConvFunc gconv, int rootok )
char *tmpch;
strncpy( hostname, td->name, sizeof(hostname) - 1 );
hostname[sizeof(hostname)-1] = '\0';
- if ((tmpch = strchr( hostname, ':' )))
+ if ((tmpch = (char*)strchr( hostname, ':' )))
*tmpch = '\0';
} else
hostname[0] = '\0';
@@ -1121,8 +1125,13 @@ static int removeSession;
static int removeCreds;
#endif
+#ifdef WITH_CONSOLE_KIT
+int
+StartClient( const char *ck_session_cookie )
+#else
int
StartClient()
+#endif
{
const char *home, *sessargs, *desksess;
char **env, *xma;
@@ -1218,6 +1227,11 @@ StartClient()
if (krbtkfile[0] != '\0')
env = setEnv( env, "KRBTKFILE", krbtkfile );
#endif
+#ifdef WITH_CONSOLE_KIT
+ if (ck_session_cookie != NULL) {
+ env = setEnv ( env, "XDG_SESSION_COOKIE", ck_session_cookie );
+ }
+#endif
userEnviron = inheritEnv( env, envvars );
env = systemEnv( p->pw_name );
systemEnviron = setEnv( env, "HOME", p->pw_dir );