New bug with O_CREAT|O_EXCL and NFS?
Christian Corti
corticn at informatik.uni-stuttgart.de
Fri Dec 19 13:28:06 UTC 2014
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
More information about the freebsd-stable
mailing list