new macro in users.te
In my policy tree I have the following in users.te:
define(in_user_role',
role user_r types $1;
#role second_user_r types $1;
')
Then I replace this:
role user_r types foo_t;
with this:in_user_role(foo_t)
I want to have multiple user roles that each have their own primary domain, but can change to other domains within their role, but can't access the primary domain for other roles.
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
You have received this message because you are subscribed to the selinux 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 · Russell Coker
In my policy tree I have the following in users.te:
define(
in_user_role',
roleuser_rtypes $1;
#rolesecond_user_rtypes $1;
')
Quoted 8 lines
Then I replace this:
roleuser_rtypesfoo_t;
with this:in_user_role(foo_t)I want to have multiple user roles that each have their own primary domain, but can change to other domains within their role, but can't access the primary domain for other roles.
You might want to put the macro definition in user_macros.te instead of users.te. My preference would be to keep all macros (or at least any macros that are not completely private to a single .te file) in the separate macros hierarchy. In this case, ordering shouldn't be a problem, since users.te is read before any of the program domains, but I'd rather not rely on such ordering among the domain .te files.
If you permit the different user domains to share program domains (rather than instantiating separate program domains for each user domain using a macro), then be careful that you don't end up with unexpected interactions among the user domains through these shared program domains.
Is the diff for this change available? I've merged up through your 2002053110-3.diff.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 17 lines · Stephen Smalley
Quoted 7 lines · Russell Coker
In my policy tree I have the following in users.te:
define(
in_user_role',
roleuser_rtypes $1;
#rolesecond_user_rtypes $1;
')Quoted 8 lines
Then I replace this:
roleuser_rtypesfoo_t;
with this:in_user_role(foo_t)I want to have multiple user roles that each have their own primary domain, but can change to other domains within their role, but can't access the primary domain for other roles.
Quoted 6 lines
You might want to put the macro definition in user_macros.te instead of users.te. My preference would be to keep all macros (or at least any macros that are not completely private to a single .te file) in the separate macros hierarchy. In this case, ordering shouldn't be a problem, since users.te is read before any of the program domains, but I'd rather not rely on such ordering among the domain .te files.
I've already done that as the next step of the same work, now user.te has hardly any code in it.
Quoted 4 lines
If you permit the different user domains to share program domains (rather than instantiating separate program domains for each user domain using a macro), then be careful that you don't end up with unexpected interactions among the user domains through these shared program domains.
Yes. The idea is to do this for things that don't have such problems. For example pppd, once the user starts it they have no control over it other than (possibly) stopping it anyway.
Quoted 2 lines
Is the diff for this change available? I've merged up through your 2002053110-3.diff.
It's not coherent enough to be worth releasing. I won't release something (even to you) until it's in a better state than my -4 version is currently.
Also the following was sent to me in a private message in response to this discussion on the list, I feel that I am not able to comment on it, Stephen, could you respond?
Quoted 4 lines
You've probably already considered this. Would this situation be a candidate for role dominance? Tie the primary domain to the dominate role and the "sharable" domains to dominated roles. I don't have the practical experience to recognize the impact of this setup.
NB I have intentionally not mentioned the person's name, as I presume that they would have posted to the list if they wanted it known.
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
You have received this message because you are subscribed to the selinux 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 · Russell Coker
Also the following was sent to me in a private message in response to this discussion on the list, I feel that I am not able to comment on it, Stephen, could you respond?
Quoted 4 lines
You've probably already considered this. �Would this situation be a candidate for role dominance? �Tie the primary domain to the dominate role and the "sharable" domains to dominated roles. �I don't have the practical experience to recognize the impact of this setup.
I think that this approach (using role dominance) would work, but I don't know whether it is really preferable. The "dominated" roles for the shared programs domains would not be useful by themselves, only for defining the hierarchy. There would be no reason to specify such roles in any user declarations or role allow statements.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.