Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 197133 | Differences between
and this patch

Collapse All | Expand All

(-)kdebase-3.5.8.orig/kdmlib/dmctl.cpp (-2 / +8 lines)
Lines 44-49 Link Here
44
{
44
{
45
	const char *ptr;
45
	const char *ptr;
46
	struct sockaddr_un sa;
46
	struct sockaddr_un sa;
47
	struct stat ststat;
47
48
48
	if (DMType == Dunno) {
49
	if (DMType == Dunno) {
49
		if (!(dpy = ::getenv( "DISPLAY" )))
50
		if (!(dpy = ::getenv( "DISPLAY" )))
Lines 65-72 Link Here
65
		if ((fd = ::socket( PF_UNIX, SOCK_STREAM, 0 )) < 0)
66
		if ((fd = ::socket( PF_UNIX, SOCK_STREAM, 0 )) < 0)
66
			return;
67
			return;
67
		sa.sun_family = AF_UNIX;
68
		sa.sun_family = AF_UNIX;
68
		if (DMType == GDM)
69
		if (DMType == GDM) {
69
			strcpy( sa.sun_path, "/tmp/.gdm_socket" );
70
			if (stat("/var/run/gdm_socket"i, ststat)==0) {
71
				strcpy( sa.sun_path, "/var/run/gdm_socket");
72
			} else {
73
				strcpy( sa.sun_path, "/tmp/.gdm_socket" );
74
			}
75
		}
70
		else {
76
		else {
71
			if ((ptr = strchr( dpy, ':' )))
77
			if ((ptr = strchr( dpy, ':' )))
72
				ptr = strchr( ptr, '.' );
78
				ptr = strchr( ptr, '.' );

Return to bug 197133