Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Dec 2014 14:21:01 +0100 (MET)
From:      Christian Corti <corticn@informatik.uni-stuttgart.de>
To:        freebsd-stable@freebsd.org
Subject:   New bug with O_CREAT|O_EXCL and NFS?
Message-ID:  <alpine.SUN.2.02.1412191411020.16105@azu.informatik.uni-stuttgart.de>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.SUN.2.02.1412191411020.16105>