monkeysphere-authentication reads ~/.ssh/* not as that user but as root.
That commonly works because root ignores filesystem ACLs, but fails e.g.
when $HOME is served with NFS exported with default root_squash option.
To work properly in environments where ACLs apply also to root,
monkeysphere needs to switch user before reading ~/.ssh/*, as that dir
is private by default.
Dkg wondered on irc if not OpenSSH "cheated" as well, to only switch
user after authentication. But running OpenSSH with DEBUG enabled
reveals that each client connection - before authentication completes -
cuase a log entry like this:
Feb 7 20:15:39 xayide sshd[32641]: debug1: temporarily_use_uid: 1000/1000 (e=0/0)
Attached are proposed patches to fix this issue.
* Perhaps better to switch user only once per account, running all
checks as one single shell script?
* Perhaps better to exec checkperms as account user?
Currently works only with MONKEYSPHERE_STRICT_MODES=false which is
arguably more risky than executing the relatively large checkperms
perl script.
- Jonas