+++ This bug was initially created as a clone of Bug #786957 +++
I know we are late for this as a security feature, but I have been running with this for a while and I think it is the right thing to do.
Change sssd default to put the cc file in /run/user. If this is accepted we will have to change rpc.gssd to look in this new location.
If you want I will write up a feature page for this.
--- Additional comment from email@example.com on 2012-02-02 13:54:31 EST ---
It's probably too late for a feature submission, but can you open a dialog with the rpc.gssd folks about changing this? Find out whether it can be done within the F17 alpha timeframe (read: by Feb 13).
Steve how much work would it be to get rpc.gssd to search /run/user/USERNAME/
before searching /tmp?
As Stephen and Simo have noted elsewhere, when we do that we might as well have SSSD drop the unique-suffix-via-mkstemp() logic, as it's only being done to avoid a DoS that's possible in a shared /tmp, and not to ensure that ccaches are per-session.
At any rate, rpc.gssd would want to be able to search the ccache with a name along the lines of "DIR:/run/user/$LOGIN/blahblah" or "FILE:/run/user/$LOGIN/blahblah", depending on whether the agreed-upon location was a directory or a file (the exact name under /run/user/$LOGIN is not set yet). The libraries should know the specifics of how to deal with the contents of the ccache, so long as rpc.gssd tells them to look there.
(In reply to comment #1)
> Steve how much work would it be to get rpc.gssd to search /run/user/USERNAME/
> before searching /tmp?
Changing the default path probably will not be too bad but getting the user name might be a bit time consuming since uids are passed up from the kernel. Doing that uid to username conversion very time consuming...
/run/usr/<uid>/ would be better from rpc.gssd's perceptive
This would be very easy to accomplish from SSSD's perspective, but I defer to Dan to tell us how feasible this is from SELinux's (and systemd's) point of view. I got the impression that /var/run/user/username was automatically created (and its permissions managed) by systemd.
(In reply to comment #3)
> (In reply to comment #1)
> > Steve how much work would it be to get rpc.gssd to search /run/user/USERNAME/
> > before searching /tmp?
> Changing the default path probably will not be too bad but getting the user
> name might be a bit time consuming since uids are passed up from the kernel.
> Doing that uid to username conversion very time consuming...
> /run/usr/<uid>/ would be better from rpc.gssd's perceptive
Maybe we can have a symlink with the userid.
The kernel can't pass up any uids, all it has to pass up is a gss init_sec_context token, which svcgssd uses the gss/krb5 libraries to turn into some kind of gss name, which is mapped to numeric id's by libnfsidmap--see nfs-utils/utils/gssd/svcgssd_proc.c:get_ids(). (I don't really know if that's the best way to do it, but that's how it works right now.)
So if there's an easy way to map the gss name to the right form then getting the username shouldn't be too bad....
But it still might be simplest if we could continue doing the lookup by id.
I think you are describing the case of a NFS server.
Ccaches are used in the case of an NFS client. In that case the uid is the only information the kernel has about the process trying to access a specific mount point.
In gss-proxy I can do the uid->name lookup (which is very fast with either nscd or sssd+memcache patches so I don't think you should worry too much about the speed of that lookup.
(In reply to comment #7)
> I think you are describing the case of a NFS server.
> Ccaches are used in the case of an NFS client. In that case the uid is the only
> information the kernel has about the process trying to access a specific mount
Bah, you're right, sorry for not following carefully!
> In gss-proxy I can do the uid->name lookup (which is very fast with either nscd
> or sssd+memcache patches so I don't think you should worry too much about the
> speed of that lookup.
sssd-1.8.0-5.fc17.beta3 has been submitted as an update for Fedora 17.
Sorry, selected the wrong BZ for this update. It has now been correct.
But you're at least now aware that the SSSD side of this change is now in updates-testing. Please look into the nfs-utils changes ASAP.
nfs-utils-1.2.5-14.fc17 has been submitted as an update for Fedora 17.
Wasn't this supposed to go only in rawhide ?
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nfs-utils-1.2.5-14.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
This change shouldn't be pushed to F17, it should only be in Rawhide. It's too potentially disruptive.
nfs-utils-1.2.5-14.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.