From owner-freebsd-stable@FreeBSD.ORG Fri Dec 19 13:28:06 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD6E2706 for ; Fri, 19 Dec 2014 13:28:06 +0000 (UTC) Received: from mx1.informatik.uni-stuttgart.de (mailgw.informatik.uni-stuttgart.de [129.69.211.41]) by mx1.freebsd.org (Postfix) with ESMTP id 927091639 for ; Fri, 19 Dec 2014 13:28:06 +0000 (UTC) Received: from azu.informatik.uni-stuttgart.de (azu.informatik.uni-stuttgart.de [129.69.218.66]) by mx1.informatik.uni-stuttgart.de (Postfix) with ESMTP id 7D8E87011 for ; Fri, 19 Dec 2014 14:21:11 +0100 (CET) Received: by azu.informatik.uni-stuttgart.de (Postfix, from userid 19691) id 724202E85; Fri, 19 Dec 2014 14:21:02 +0100 (MET) Date: Fri, 19 Dec 2014 14:21:01 +0100 (MET) From: Christian Corti To: freebsd-stable@freebsd.org Subject: New bug with O_CREAT|O_EXCL and NFS? Message-ID: User-Agent: Alpine 2.02 (SUN 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2014 13:28:06 -0000 I've had big headaches finding the problem why "ssh -X host" destroys the permissions of the .Xauthority file in my NFS home directory. 'host' is any of our FreeBSD 10.1-RELEASE servers (sparc64 and amd64) Permissions before login: 0600 Permissions after login: 0000 (ouch!) I've found out that the cause for this lies in the Xau library (AuLock.c) that creates a new file in XauLockAuth: [...] creat_fd = open (creat_name, O_WRONLY | O_CREAT | O_EXCL, 0600); [...] Wrote a small test program that makes just that open call, and the result is the same: the created file has permission 0000. This must be a regression, since I have a FreeBSD 9.0-RELEASE-p4 system (amd64) that does *not* have this problem. Is this a known problem? Any hints on solving that problem? For now, I must add a custom /etc/ssh/sshrc file with "chmod 600 ~/.Xauthority". Christian