SElinux nss/nscd service
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines
-----Original Message-----
From: Ulrich Drepper [mailto:[email protected]]
Sent: Tuesday, July 19, 2005 4:25 PM
To: Karl MacMillan
Cc: [email protected]; 'Daniel J Walsh'; [email protected]
Subject: Re: SElinux nss/nscd service
Quoted 8 lines
Quoted 1 line · Karl MacMillan
It doesn't matter whether it is a library or not, it matters whether this is
a
Quoted 1 line
public api upon which applications will start to depend.
There are only a handful of apps and all come with the system.
Somewhere the context of this discussion was lost or I was just being unclear - I was referring the administrative code for adding / modifying users. Not for authentication / retrieving user information. For the admin interfaces there can be an arbitrary number of applications.
Quoted 7 lines
Quoted 3 lines
Putting this in
libselinux means that we are stuck with the api for _years_.And putting the interface with these half-cooked ideas in the central library is OK since you don't have to deal with it, right?
See above - I was never suggesting this go in libc.
Quoted 6 lines
Gee. Especially since, now that I spend a second thinking about this, the whole approach proposed so far is bogus. The extra "username" is just an additional piece of information for a user as represented by the passwd structure. Therefore adding such an additional database makes no sense at all. What should happen is that the information is added to the user database.
Umm - this is exactly what I have been suggesting for user authentication. The selinux user information (which is more than just a name, btw) should be stored along with the other information. This should be in a flat file, ldap, or whatever database you store your user information in.
Quoted 5 lines
struct passwd cannot be changed but it isn't
necessary since there is no requirement to provide the information this way. Just create a function or three which take either a user name, UID, or passwd pointer as the parameter and return the selinux user name.
Fine - but the implementation of this depends on how the user information is stored. Again, I don't think it makes sense for libselinux to duplicate code that is already part of PAM. I don't think it makes sense for libc to do that either, but that is already what happens with nscd. This also comes with an increased configuration overhead (you now have to point PAM, nscd, _and_ libselinux at the correct user database).
Look, this discussion is just going in circles. I suggest that we agree that this code won't go into libc and Steve can make the final decision about whether it goes into libselinux when he is connected to the internet again.
Karl
---
Karl MacMillan
Tresys Technology
http://www.tresys.com
(410) 290-1411 ext 134
Quoted 2 lines
--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 8 lines
Somewhere the context of this discussion was lost or I was just being unclear -
I was referring the administrative code for adding / modifying users. Not for
authentication / retrieving user information. For the admin interfaces there
can be an arbitrary number of applications.
This is probably my fault, because I didn't mention admin apps when presenting this issue to Ulrich. Nevertheless, the number of applications is still small, and his point about us not needing all those backends is valid.
On the other hand I think we can get better integration of this data with selinux if it is in libselinux/manage. You're trying to distance those libraries from Unix users, but they're not completely separate. You're storing things like selinux categories, for example, as an opaque string, which has to be caller-validated. If this code was in libselinux/manage we could take care of validation internally, and do other things like manage file contexts internally (an issue you and Joshua keep ignoring as an implementation detail). So, my point is - there are some benefits to putting the code in libselinux, while placing anything in glibc is inherently risky - high exposure, supposed to stay very stable, plus I have to integrate with those awful macros (I'm sorry Ulrich..)
I don't see the problem with writing a relatively stable api, and adding it to libselinux.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Putting this in
libselinux means that we are stuck with the api for _years_.And putting the interface with these half-cooked ideas in the central library is OK since you don't have to deal with it, right?
See above - I was never suggesting this go in libc.
That was my impression of our discussion - the code would have to go into libnss_files, which is part of libc. Now you're saying it should go into pam, and I don't understand how that would work, because this code has to go into a shared library, if it is to be linked by shadow-utils, and libuser, and the various other admin utilities in question.
Quoted 9 lines
Quoted 6 lines
Gee. Especially since, now that I spend a second thinking about this, the whole approach proposed so far is bogus. The extra "username" is just an additional piece of information for a user as represented by the passwd structure. Therefore adding such an additional database makes no sense at all. What should happen is that the information is added to the user database.
Umm - this is exactly what I have been suggesting for user authentication.
The selinux user information (which is more than just a name, btw) should be stored along with the other information.
It can't be stored with the other information, because you can't change the passwd format. Yes, it is information that is very related to the user, but that doesn't help us.
Quoted 8 lines
Quoted 5 lines
struct passwd cannot be changed but it isn't
necessary since there is no requirement to provide the information this way. Just create a function or three which take either a user name, UID, or passwd pointer as the parameter and return the selinux user name.Fine - but the implementation of this depends on how the user information is stored. Again, I don't think it makes sense for libselinux to duplicate code that is already part of PAM.
Pam has to do with information that's needed only at login time by login programs, which is not the case here (I'm sorry if I've confused Ulrich).
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.