SElinux nss/nscd service
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 30 lines
Quoted 4 lines
The plan is to have pam and other login programs use this interface for reading, and useradd and libuser for writing in the flat file case (put interface).
Put interfaces never have been in nss. So the total number of programs and DSOs which need this functionality is what? 2, 3?
This does not warrant adding so much code into glibc.
Quoted 4 lines
We could put this code in libselinux. In fact, that's what I did originally, and that generated complaints that libselinux wouldn't be able to handle all the future backends, and that it would be better if it shared code with nss to communicate with ldap.
Why thinking about different backends? The reason for nss is not that it is hip and cool to have a gazillion services. The reason is that there are many preexisting installations and cross-platform considerations which make it impossible to use one service only.
This isn't the case here. You can very well demand that there are exactly two formats: flat file (optional) and an LDAP map. I don't see there being NIS/NIS+ maps, Hesiod is not really important (or even extensible, I think). Which leaves LDAP.
And how often do login apps run? It is not really absolutely necessary to have caching.
Quoted 6 lines
So, what I suggest is that you add some code to libselinux. Use flat file and LDAP. Try using it in the programs which need the information.
If there are real problems with this approach, e.g., the number of
programs is really higher or the performance is really bad, then we can talk about this again. But adding this code without any real justification isn't going to fly.
What are other people's thoughts on this subject (cc-ed selinux list). I'd like to reach some level of agreement here. What you're saying makes sense to me, but again, I started looking at adding an nss service in response to an upstream request/discussion - we want our code for user management to be accepted upstream.
Karl? Steven?
The alternative is to put this code into libsemanage, for which I already have most of the implementation. I think from RedHat's point of view LDAP is important, since we'd like to better integrate SELinux with the directory server. I'm not sure about other backends.
--
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 22 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ivan Gyurdiev
Sent: Tuesday, July 19, 2005 1:36 PM
To: Ulrich Drepper
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: SElinux nss/nscd serviceQuoted 7 lines
So, what I suggest is that you add some code to libselinux. Use flat file and LDAP. Try using it in the programs which need the information.
If there are real problems with this approach, e.g., the number of
programs is really higher or the performance is really bad, then we can talk about this again. But adding this code without any real justification isn't going to fly.What are other people's thoughts on this subject (cc-ed selinux list). I'd like to reach some level of agreement here. What you're saying makes sense to me, but again, I started looking at adding an nss service in response to an upstream request/discussion - we want our code for user management to be accepted upstream.
Quoted 4 lines
Karl? Steven?
The alternative is to put this code into libsemanage, for which I already have most of the implementation.
Libsemanage is the wrong place for this - if login and ssh have to link to libsemanage we have failed to properly separate the functionality of these libraries.
Quoted 5 lines
I think from RedHat's point
of view LDAP is important, since we'd like to better integrate SELinux with the directory server. I'm not sure about other backends.
Well, as I've said before I think that it is ridiculous to have to add backend code into libselinux. The number of backends considered important now might be small, but that might not always be true. I'm concerned about:
1) Duplicating code with PAM / NSS (and general feature / size creep of libselinux).
2) Forcing configuration of PAM, NSS, and libselinux to switch from one backend to another.
I'm trying to draw a strong conceptual line here: SELinux should not know about specific Linux users. We may have to back down from this, but hopefully not yet. I'm _not_ concerned about performance - this will probably only be done at login so it won't happen often. Is PAM really so pitiful that it can't return arbitrary extra data about a user at authentication that login can use? If there is no other place to put this, then I'm not going to object to putting it into libselinux, but I think it is a pragmatic hack at best.
Karl
---
Karl MacMillan
Tresys Technology
http://www.tresys.com
(410) 290-1411 ext 134
Quoted 5 lines
--
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.
--
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 54 lines · Karl MacMillan
Quoted 24 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ivan Gyurdiev
Sent: Tuesday, July 19, 2005 1:36 PM
To: Ulrich Drepper
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: SElinux nss/nscd serviceQuoted 8 lines
So, what I suggest is that you add some code to libselinux. Use flat file and LDAP. Try using it in the programs which need the information. If there are real problems with this approach, e.g., the number of programs is really higher or the performance is really bad, then we can talk about this again. But adding this code without any real justification isn't going to fly.
What are other people's thoughts on this subject (cc-ed selinux list). I'd like to reach some level of agreement here. What you're saying makes sense to me, but again, I started looking at adding an nss service in response to an upstream request/discussion - we want our code for user management to be accepted upstream.
Quoted 6 lines
Karl? Steven?
The alternative is to put this code into libsemanage, for which I already have most of the implementation.
Libsemanage is the wrong place for this - if login and ssh have to link to libsemanage we have failed to properly separate the functionality of these libraries.
Quoted 7 lines
I think from RedHat's point
of view LDAP is important, since we'd like to better integrate SELinux with the directory server. I'm not sure about other backends.Well, as I've said before I think that it is ridiculous to have to add backend code into libselinux. The number of backends considered important now might be small, but that might not always be true. I'm concerned about:
1) Duplicating code with PAM / NSS (and general feature / size creep of libselinux).
2) Forcing configuration of PAM, NSS, and libselinux to switch from one backend to another.
Quoted 9 lines
I'm trying to draw a strong conceptual line here: SELinux should not know about specific Linux users. We may have to back down from this, but hopefully not yet. I'm _not_ concerned about performance - this will probably only be done at login so it won't happen often. Is PAM really so pitiful that it can't return arbitrary extra data about a user at authentication that login can use? If there is no other place to put this, then I'm not going to object to putting it into libselinux, but I think it is a pragmatic hack at best.
So you want the pam_selinux module to implement all the potential backends? What happens if an app does not use pam but needs this info?
Quoted 20 lines
Karl
---
Karl MacMillan
Tresys Technology
http://www.tresys.com
(410) 290-1411 ext 134Quoted 6 lines
--
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.
Signature · 4 lines
-- 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 74 lines
-----Original Message-----
From: Daniel J Walsh [mailto:[email protected]]
Sent: Tuesday, July 19, 2005 2:31 PM
To: Karl MacMillan
Cc: [email protected]; 'Ulrich Drepper'; [email protected]
Subject: Re: SElinux nss/nscd serviceQuoted 45 lines · Karl MacMillan
Quoted 24 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ivan Gyurdiev
Sent: Tuesday, July 19, 2005 1:36 PM
To: Ulrich Drepper
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: SElinux nss/nscd serviceQuoted 8 lines
So, what I suggest is that you add some code to libselinux. Use flat file and LDAP. Try using it in the programs which need the information. If there are real problems with this approach, e.g., the number of programs is really higher or the performance is really bad, then we can talk about this again. But adding this code without any real justification isn't going to fly.
What are other people's thoughts on this subject (cc-ed selinux list). I'd like to reach some level of agreement here. What you're saying makes sense to me, but again, I started looking at adding an nss service in response to an upstream request/discussion - we want our code for user management to be accepted upstream.
Quoted 6 lines
Karl? Steven?
The alternative is to put this code into libsemanage, for which I already have most of the implementation.
Libsemanage is the wrong place for this - if login and ssh have to link to libsemanage we have failed to properly separate the functionality of these libraries.
Quoted 7 lines
I think from RedHat's point
of view LDAP is important, since we'd like to better integrate SELinux with the directory server. I'm not sure about other backends.Quoted 1 line
Well, as I've said before I think that it is ridiculous to have to add
backend
Quoted 1 line
code into libselinux. The number of backends considered important now might
be
Quoted 5 lines
small, but that might not always be true. I'm concerned about:
1) Duplicating code with PAM / NSS (and general feature / size creep of libselinux).
2) Forcing configuration of PAM, NSS, and libselinux to switch from onebackend
Quoted 3 lines
to another.
I'm trying to draw a strong conceptual line here: SELinux should not know
about
Quoted 1 line
specific Linux users. We may have to back down from this, but hopefully not
yet.
Quoted 1 line
I'm _not_ concerned about performance - this will probably only be done at
login
Quoted 2 lines
so it won't happen often. Is PAM really so pitiful that it can't return arbitrary extra data about a user at authentication that login can use? If
Quoted 9 lines
there
Quoted 1 line
is no other place to put this, then I'm not going to object to putting it
into
Quoted 3 lines
libselinux, but I think it is a pragmatic hack at best.
So you want the
pam_selinuxmodule to implement all the potential backends? What happens if an app does not use pam but needs this info?
No - I want pam_ldap to be able to provide arbitrary data (the SELinux user mapping) to pam_selinux which uses it to obtain the login context. Again, don't know if this is possible, but it seems like it should be. An app that doesn't want to use pam can directly obtain the data from ldap or whatever - is this a big worry? There should be a single authentication method for a system - there's a reason no one uses slackware :)
Karl
---
Karl MacMillan
Tresys Technology
http://www.tresys.com
(410) 290-1411 ext 134
Quoted 23 lines
Quoted 13 lines
Karl
---
Karl MacMillan
Tresys Technology
http://www.tresys.com
(410) 290-1411 ext 134Quoted 3 lines
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected]with
Quoted 7 lines
Quoted 3 lines
the words "unsubscribe selinux" without quotes as the message.
Quoted 1 line
--
--
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 7 lines
No - I want
pam_ldapto be able to provide arbitrary data (the SELinux user mapping) topam_selinuxwhich uses it to obtain the login context. Again, don't know if this is possible, but it seems like it should be. An app that doesn't want to use pam can directly obtain the data from ldap or whatever - is this a big worry? There should be a single authentication method for a system - there's a reason no one uses slackware :)
This is not possible, because this information is necessary for things other than login programs:
- displaying information (system-config-users?)
- modifying the mapping (usermod? useradd? libuser? userdel?)
- obtaining the the mapping data for other purposes (genhomedircon)
So, there are plenty of reasons why the admin requires access to other users' mapping data, so this code should be placed in a library. By Ulrich's arguments it would seem glibc is not that library...
--
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 22 lines
-----Original Message-----
From: Ivan Gyurdiev [mailto:[email protected]]
Sent: Tuesday, July 19, 2005 2:52 PM
To: Karl MacMillan
Cc: 'Daniel J Walsh'; 'Ulrich Drepper'; [email protected]
Subject: RE: SElinux nss/nscd serviceQuoted 2 lines
No - I want
pam_ldapto be able to provide arbitrary data (the SELinux user mapping) topam_selinuxwhich uses it to obtain the login context. Again,don't
Quoted 1 line
know if this is possible, but it seems like it should be. An app that
doesn't
Quoted 1 line
want to use pam can directly obtain the data from ldap or whatever - is this
a
Quoted 1 line
big worry? There should be a single authentication method for a system -
there's
Quoted 1 line
a reason no one uses slackware :)
This is not possible, because this information is necessary for things other than login programs:
Quoted 7 lines
- displaying information (system-config-users?)
- modifying the mapping (usermod? useradd? libuser? userdel?)
- obtaining the the mapping data for other purposes (genhomedircon)So, there are plenty of reasons why the admin requires access to other users' mapping data, so this code should be placed in a library. By Ulrich's arguments it would seem glibc is not that library...
This is different - managing the users as an admin is going to be backend specific. Everything that you list is local files specific, right? If an ldap backend is used the SELinux information should be stored in ldap - nothing else is remotely manageable. So the pam_* code is only for authentication. Again, the reason not to put this in a single library is that library will always fail to work for arbitrary backends - this is the same reason that pam has modules.
Karl
---
Karl MacMillan
Tresys Technology
http://www.tresys.com
(410) 290-1411 ext 134
--
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 3 lines
This is different - managing the users as an admin is going to be backend specific. Everything that you list is local files specific, right?
Just because passwords are done that way doesn't necessary mean we want the selinux map to work that way. I don't see why it has to be backend specific (but then again, I'm sure there's probably a reason, or glibc would provide a backend independent write interface for pwd).
In any case, backend specific or not, I don't plan to reimplement the read/write code in 10 places, so it should go in a library, not in pam.
--
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
-----Original Message-----
From: Ivan Gyurdiev [mailto:[email protected]]
Sent: Tuesday, July 19, 2005 3:25 PM
To: Karl MacMillan
Cc: 'Daniel J Walsh'; 'Ulrich Drepper'; [email protected]
Subject: RE: SElinux nss/nscd service
Quoted 5 lines
Quoted 2 lines
This is different - managing the users as an admin is going to be backend specific. Everything that you list is local files specific, right?
Just because passwords are done that way doesn't necessary mean we want the selinux map to work that way.
Yes it does - the whole goal of this is to enable user information to be managed however the backend wants. Centralized user management means that it is centralized completely. Admins aren't going to be very happy when their ldap directory manages users just great except they have to go to every selinux machine and run some program or edit some random text file. One of the main points of this user suggestion is that user information _must_ be able to be centralized or we will break things like ldap.
I don't see why it has to be backend
Quoted 7 lines
specific (but then again, I'm sure there's probably a reason, or glibc would provide a backend independent write interface for pwd).
In any case, backend specific or not, I don't plan to reimplement the read/write code in 10 places, so it should go in a library, not in pam.
It doesn't matter whether it is a library or not, it matters whether this is a public api upon which applications will start to depend. Putting this in libselinux means that we are stuck with the api for _years_.
Karl
---
Karl MacMillan
Tresys Technology
http://www.tresys.com
(410) 290-1411 ext 134
--
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 2 lines
It doesn't matter whether it is a library or not,
Only it does, because that determines whether the same code has to be written everywhere, or only once.
Quoted 2 lines
it matters whether this is a
public api upon which applications will start to depend.
Well, there would have to be, unless you want each caller to do its own thing, instead of using common code.
Quoted 2 lines
Putting this in
libselinux means that we are stuck with the api for _years_.
Putting this in glibc means the same thing.
--
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.
could someone do me a large favour, and point me at a URL which contains a description of JUST the requirements - formal or informal specification, i don't mind which - and a brief contextual outline or references to archives.
much appreciated,
l.
Signature · 8 lines
-- <a href="http://lkcl.net">http://lkcl.net</a> -- -- 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 4 lines · Luke Kenneth Casson Leighton
could someone do me a large favour, and point me at a URL which contains a description of JUST the requirements - formal or informal specification, i don't mind which - and a brief contextual outline or references to archives.
Luke, there is no specification at the moment. We're simply following up on Karl's idea to map Unix users to SElinux users in a different fashion than 1:1 with user_u fallback. Instead we will be mapping many Unix users to few SElinux users, which may also be called security "classes". The default class would also be configurable (not hardcoded on user_u).
This is a good idea, because it improves scalability - the users no longer need to be stored in the kernel and eat up memory. Instead, we will only store users (classes) that have different security properties. Additionally, we will no longer need to reload the security policy to change the roles for a user - instead we'd just remap her to a different security class.
--
The discussion here is about how exactly to accomplish that - where would the code be placed that interprets this map (which will store user, selinux user, and mls categories for the user, which we decided are important to keep per user)
Originally I wrote some code for libselinux/libsemanage, but Karl didn't like that (and still doesn't) so an alternative was explored to provide a standard glibc interface, similar to getpwnam() that makes use of nsswitch.conf. However, it now seems that this is a mistake. It is also being proposed to place this code in pam, but I don't see how this will work at all - if you place code in pam, than all the code that doesn't use pam (and there's already a few planned callers - admin programs) cannot make use of it, and has to write its own interface.
--
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 7 lines · Ivan Gyurdiev
Quoted 4 lines · Luke Kenneth Casson Leighton
could someone do me a large favour, and point me at a URL which contains a description of JUST the requirements - formal or informal specification, i don't mind which - and a brief contextual outline or references to archives.
Luke, there is no specification at the moment.
... that's one of the reasons why i asked :)
i've been skimming the posts coming in, and the ones with "eek, we're giving up and backing out" caught my attention.
i started re-reading, and i am thinking that this whole thing looks very "winbindd" like, which i helped design (i had to bypass andrew in order for the design to be correct. it's a long story). tim potter implemented it, using samba-tng's rpcclient libraries.
yes, there were discussions about enhancing nsswitch with NT-like domain functionality: these ideas were abandoned on the grounds that they were unlikely to be accepted.
okay, am switching mentally to formal "PITA" mode [like i have any other...]
Quoted 3 lines
We're simply
following up on Karl's idea to map Unix users to SElinux users in a different fashion than 1:1 withuser_ufallback.
okay. that still doesn't quite feel like "requirements spec" material to me: the bit with "idea" says to me that it's been proposed but not formally accepted as "required".
also the sentence is ambiguous, missing a comma.
do you mean map unix users to selinux users in different fashion than "1:1 with user_u fallback"
or
do you mean map unix users to selinux users "in different fashion than 1:1", with user_u fallback.
Quoted 4 lines
Instead
we will be mapping many Unix users to few SElinux users, which may also be called security "classes". The default class would also be configurable (not hardcoded onuser_u).
sounds good (and also after a bit of thought for 10 mins it clears up the abiguity above)
is this "requirements specification" or "functional spec"?
okay.
so a better way to put this is:
we will be mapping many Unix users to few SElinux users, which may also be called security "classes".
all users not explicitly mapped will be given the default "class", which itself will be configurable, and itself defaults to "user_u".
Quoted 6 lines
This is a good idea, because it improves scalability - the users no longer need to be stored in the kernel and eat up memory. Instead, we will only store users (classes) that have different security properties. Additionally, we will no longer need to reload the security policy to change the roles for a user - instead we'd just remap her to a different security class.
still sounding eminently sensible.
Quoted 6 lines
--
The discussion here is about how exactly to accomplish that - where would the code be placed that interprets this map (which will store user, selinux user, and mls categories for the user, which we decided are important to keep per user)
this is where things are sounding eminently winbindd-like.
winbindd keeps (actually, generates according to some config options in smb.conf and then persistently keeps) a map between unix users and NT Domain Users, and also a map between unix groups and NT Domain Groups (both local and global).
then there's pam_winbindd which communicates with winbindd and reads that map.
and there's nss_winbind which does likewise.
Quoted 5 lines
Originally I wrote some code for libselinux/libsemanage, but Karl didn't like that (and still doesn't) so an alternative was explored to provide a standard glibc interface, similar to
getpwnam()that makes use of nsswitch.conf. However, it now seems that this is a mistake.
based on the experience of winbindd, i believe / predict that you will find that the only mistake was to imagine that this can all be done as a library rather than a service.
... but i'm not that good at priddidictions.
Quoted 6 lines
It is also being proposed to
place this code in pam, but I don't see how this will work at all - if you place code in pam, than all the code that doesn't use pam (and there's already a few planned callers - admin programs) cannot make use of it, and has to write its own interface.
again: the provision of a winbindd-like service will allow you to write a pam module that reads the persistent information from the service.
winbindd has a unix domain socket over which communication is carried out - pam_winbindd, nss_winbindd and, in the version of winbindd present in samba tng, freedce's ntlmsspauth.so as well.
no, this unix domain socket should not be accessible by anything other than root.
the only key difference i can see between winbindd and what you are proposing is that winbindd's "mapping" system is one-to-one and onto (i know there's a special word for that but i can't remember what it is).
whereas what _you_ require is many to one mapping - from unix users to security "classes".
... you're implementing groups :)
wot i noticed was missing and asked about, when i first looked at selinux :)
l.
--
<a href="http://lkcl.net">http://lkcl.net</a>
--
--
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 10 lines
Quoted 5 lines
Instead
we will be mapping many Unix users to few SElinux users, which may also be called security "classes". The default class would also be configurable (not hardcoded onuser_u).sounds good (and also after a bit of thought for 10 mins it clears up the abiguity above)
is this "requirements specification" or "functional spec"?
Like I said, no formal specification or requirements exist at this time. The project I am working on is to integrate shadow-utils and similar code with selinux user management. The requirements we have are basically that we want useradd to be able to configure selinux parameters (whatever those are) for the user, usermod to modify those, and userdel to remove selinux data relating to the user being deleted.
Based on discussions, it seems appropriate to implement this map-to-security class idea as part of reaching this objective.
Quoted 9 lines
Quoted 6 lines
It is also being proposed to
place this code in pam, but I don't see how this will work at all - if you place code in pam, than all the code that doesn't use pam (and there's already a few planned callers - admin programs) cannot make use of it, and has to write its own interface.again: the provision of a winbindd-like service will allow you to write a pam module that reads the persistent information from the service.
Pam modules are for authentication and login issues.
This mapping is used for other purposes as well, and also needs to be modified from multiple programs and/or shared libraries, which should not replicate the necessary code.
Quoted 3 lines
winbindd has a unix domain socket over which communication is carried out -
pam_winbindd,nss_winbinddand, in the version of winbindd present in samba tng, freedce's ntlmsspauth.so as well.
We don't have a daemon, so our code has to go in a shared library (unless you're proposing writing a daemon, which sounds crazy to me).
Quoted 1 line
... you're implementing groups :)
Essentially... groups for MAC, which have associated role sets and MLS sensitivity (so they're not very similar to groups for DAC).
--
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 6 lines · Ivan Gyurdiev
Quoted 6 lines
Quoted 5 lines
Instead
we will be mapping many Unix users to few SElinux users, which may also be called security "classes". The default class would also be configurable (not hardcoded onuser_u).
Quoted 7 lines
Quoted 4 lines
sounds good (and also after a bit of thought for 10 mins it clears up the abiguity above)
is this "requirements specification" or "functional spec"?
Like I said, no formal specification or requirements exist at this time.
i invited people to point me at something formal or informal.
Quoted 17 lines
The project I am working on is to integrate shadow-utils and similar code with selinux user management. The requirements we have are basically that we want useradd to be able to configure selinux parameters (whatever those are) for the user, usermod to modify those, and userdel to remove selinux data relating to the user being deleted.
Based on discussions, it seems appropriate to implement this map-to-security class idea as part of reaching this objective.
Quoted 7 lines
Quoted 6 lines
It is also being proposed to
place this code in pam, but I don't see how this will work at all - if you place code in pam, than all the code that doesn't use pam (and there's already a few planned callers - admin programs) cannot make use of it, and has to write its own interface.
Quoted 7 lines
Quoted 2 lines
again: the provision of a winbindd-like service will allow you to write a pam module that reads the persistent information from the service.
Pam modules are for authentication and login issues.
This mapping is used for other purposes as well, and also needs to be modified from multiple programs and/or shared libraries, which should not replicate the necessary code.
then you almost undoubtedly need something like winbindd in order to "centralise" the management of the security "classes", and to provide a simple RPC mechanism for communicating over a unix domain socket (or other IPC mechanism - but _please_ don't put dbus on the list of options to explore).
i think you will find that a very simple RPC mechanism will be _much_ more palatable than "multiple programs and/or shared libraries resulting in replicated necessary code".
the anticipated complexity [of these proposed selinux "classes" and their management] is then "hidden" behind a simple RPC-based API that pam_winbindlikeselinuxservice, nss_winbindlinesexlinuxservice etc. call all use, WITHOUT knowing OR CARING how it's implemented.
aside from anything, as long as you get the simple RPC mechanism correct and well-defined, you can CHANGE the implementation [of selinux "classes"] behind the RPC mechanism - and it's _not going to matter_.
Quoted 6 lines
Quoted 3 lines
winbindd has a unix domain socket over which communication is carried out -
pam_winbindd,nss_winbinddand, in the version of winbindd present in samba tng, freedce's ntlmsspauth.so as well.We don't have a daemon, so our code has to go in a shared library (unless you're proposing writing a daemon, which sounds crazy to me).
see above.
before you go criticising the reasons why i recommended a winbindd-like solution, can i invite you to examine its source code (or better yet the nss_winbindd source code because it's simpler) and also ask questions about why winbindd was created?
aside from anything, a second [and more importantly, redhat-funded] person examining a solution recommended by an external source [who isn't funded to work on selinux] means that this proposed area to explore can be properly evaluated: it might _not_ be a good way forward.
all i can say is that winbindd in combination with its nsswitch and pam service works _extremely_ well at providing "the holy grail" single-sign-on, in a mixed NT and Unix environment.
... and very few people actually know about it.
(ironically and as off-topic side note: winbindd cannot be used to join a unix workstation to a samba 3 primary domain controller, whereas it _can_ be used to join a unix workstation to a samba tng controlled domain. oh well.)
Quoted 5 lines
Quoted 1 line
... you're implementing groups :)
Essentially... groups for MAC, which have associated role sets and MLS sensitivity (so they're not very similar to groups for DAC).
ack.
Signature · 8 lines
-- <a href="http://lkcl.net">http://lkcl.net</a> -- -- 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
Quoted 5 lines
Pam modules are for authentication and login issues.
This mapping is used for other purposes as well, and also needs to be modified from multiple programs and/or shared libraries, which should not replicate the necessary code.then you almost undoubtedly need something like winbindd in order to "centralise" the management of the security "classes",
Management can be centralized just fine with a shared library.
Quoted 3 lines
and to provide a simple RPC mechanism for communicating over a unix domain socket (or other IPC mechanism - but _please_ don't put dbus on the list of options to explore).
RPC? Before we write something incredibly complex here, please remember that at the present time we only support flat files, and we don't even support those very well. Sure, we'd like that to change, but I'm not sure such extra complexity is warranted at the present time.
Quoted 4 lines
aside from anything, as long as you get the simple RPC mechanism correct and well-defined, you can CHANGE the implementation [of selinux "classes"] behind the RPC mechanism - and it's
_notgoing tomatter_.
I think that's true for any well-defined API, regardless of whether it's a daemon or a shared library.
I also have my doubts about whether we can set an API in stone and never change it, regardless of where it's placed. I think that's probably not going to work, and we should not overdesign things yet.
Quoted 4 lines
before you go criticising the reasons why i recommended a winbindd-like solution, can i invite you to examine its source code (or better yet the
nss_winbinddsource code because it's simpler) and also ask questions about why winbindd was created?
Ok. Why was winbindd created?
Quoted 5 lines
aside from anything, a second [and more importantly, redhat-funded] person examining a solution recommended by an external source [who isn't funded to work on selinux] means that this proposed area to explore can be properly evaluated: it might _not_ be a good way forward.
I am confused by this statement - does not quite parse...
Quoted 3 lines
all i can say is that winbindd in combination with its nsswitch and pam service works _extremely_ well at providing "the holy grail" single-sign-on, in a mixed NT and Unix environment.
That's great, but we're not doing single-sign-on authentication.
The primary question I have is - why should we have a daemon that runs in the background, when we currently have very few callers that will be using it, and at particularly rare circumstances (when you're administering user accounts). So, what's the justification for using up system resources with a daemon program.
I see this issue largely equivalent to libuser - we should do the same thing that libuser does, and put it in libsemanage (or another library, but not glibc yet).
--
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 1 line · Ivan Gyurdiev
Ok. Why was winbindd created?
:)
for several reasons.
1) to hide the awful mess of NT-style MSRPC-based function calls behind a drastically simplified API that basically involved sending uint8 opcode, char* username, char* this, char* that down a unix domain socket.
2) to cache NT user and group information (e.g. group membership) for a period of several minutes (definable by the config file) due to the horribly large number of MSRPC-based function calls
(rpcclient in samba tng implements Lsa, Samr _undocumented_
win32 function calls...)
3) to provide (and then hide - from those programs utilising the API!) a one-to-one _persistent_ mapping between NT users&groups and unix users&groups.
so.
the most crucial question to consider:
- is the functionality behind the selinux "classes" likely to be complex or require cacheing of any kind?
if the answer is a most definite "no" then yes, i agree with you:
providing a daemon similar to winbindd isn't justifiable.
l.
--
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 9 lines · Ivan Gyurdiev
Quoted 8 lines
Quoted 5 lines
Pam modules are for authentication and login issues.
This mapping is used for other purposes as well, and also needs to be modified from multiple programs and/or shared libraries, which should not replicate the necessary code.then you almost undoubtedly need something like winbindd in order to "centralise" the management of the security "classes",
Quoted 7 lines
Management can be centralized just fine with a shared library.
Quoted 3 lines
and to provide a simple RPC mechanism for communicating over a unix domain socket (or other IPC mechanism - but _please_ don't put dbus on the list of options to explore).
RPC? Before we write something incredibly complex here, please
remote procedure calls don't need to be complex. winbindd's RPC API comprises some statically sized structs, a uint8 to specify an opcode (saying which of the structs are to be sent), and a really big switch statement.
l.
--
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.
Re: SElinux nss/nscd serviceg
In reply to Ivan GyurdievQuoted 5 lines · Ivan Gyurdiev
The primary question I have is - why should we have a daemon that runs in the background, when we currently have very few callers that will be using it, and at particularly rare circumstances (when you're administering user accounts). So, what's the justification for using up system resources with a daemon program.
nsswitch was mentioned at some point, hence reason why i recommended idea.
l.
--
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.