[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssh-bugs
Subject:    [Bug 2440] X11 connection will fail if user's home directory is read-only
From:       bugzilla-daemon () bugzilla ! mindrot ! org
Date:       2016-04-26 0:08:23
Message-ID: bug-2440-705-3cpSoHYwaH () https ! bugzilla ! mindrot ! org/
[Download RAW message or body]

https://bugzilla.mindrot.org/show_bug.cgi?id=2440

--- Comment #4 from huieying.lee@oracle.com ---
Recently, we discovered that the original code changes for this
enhancement would not work if UsePrivilegeSeparation is set to NO.  

We fixed the problem with the following code changes:

--------------------------------------------------------------------
--- old/session.c       Mon Apr 25 15:33:39 2016
+++ new/session.c       Mon Apr 25 15:37:31 2016
@@ -2241,6 +2241,7 @@
         * means that we won't set XAUTHORITY variable in child's
environment
         * and xauth(1) will use the default location for the authority
file.
         */
+       temporarily_use_uid(s->pw);
        if (mkdtemp(xauthdir) != NULL) {
                s->auth_file = xmalloc(MAXPATHLEN);
                snprintf(s->auth_file, MAXPATHLEN, "%s/xauthfile",
@@ -2273,6 +2274,7 @@
                    "authority file: %.100s; will use the default xauth
file",
                    strerror(errno));
        }
+       restore_uid();
 #endif
        return success;
 }
-----------------------------------------------------------------------

A new patch file was attached also, which applies to OpenSSH 7.2p2.

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic