LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File kdm-relaxed-auth.diff of Package kdebase4-workspace (Project openSUSE:11.4)

Index: kdm/backend/auth.c
===================================================================
--- kdm/backend/auth.c.orig	2010-07-06 08:54:30.000000000 +0200
+++ kdm/backend/auth.c	2010-11-21 20:47:03.478727336 +0100
@@ -610,6 +610,7 @@ defineLocal(FILE *file, Xauth *auth, int
     writeAddr(FamilyLocal, strlen(name.nodename), (CARD8 *)name.nodename,
               file, auth, ok);
 #endif
+    setenv("XAUTHLOCALHOSTNAME", name.nodename, 1);
 
     /*
      * For HP-UX, HP's Xlib expects a fully-qualified domain name, which
@@ -1277,6 +1278,9 @@ setUserAuthorization(struct display *d)
             userEnviron = setEnv(userEnviron, "XAUTHORITY", envname);
             systemEnviron = setEnv(systemEnviron, "XAUTHORITY", envname);
         }
+        name = getenv("XAUTHLOCALHOSTNAME");
+        if (name)
+            userEnviron = setEnv( userEnviron, "XAUTHLOCALHOSTNAME", name);
         /* a chown() used to be here, but this code runs as user anyway */
     }
     debug("done setUserAuthorization\n");