Skip to contentSkip to conversation

Identification of Attribute values within the Security Server

DISCUSSION JanuGerman 1 participant 1 message Apr 3, 2007 SELinux security module

lore
Share & tools
lore

JanuGerman

author
#0 lore raw

Hi Every one,

1) Can constraint(s) be specified in the "RefPolicy" e.g. is this Refpolicy is correct:

policy_module(local, 1.0)

 require {
         type unconfined_t;
         type fs_t priv_type;

}

type x_t;
bool test true;

allow x_t fs_t:filesystem associate;

 if (test) {
         # allow unconfined_t all access to x_t
         allow unconfined_t x_t:dir *;
         allow unconfined_t x_t:file *;
 } else {
         # allow unconfined_t only ls access
         allow unconfined_t x_t:dir { getattr read search };
         allow unconfined_t x_t:file {getattr }; 
}

constrain filesystem associate (t1=priv_type)

The intended semantics of this policy is to associate an attribute with the fs_t typeand then further constrain the permissions. But the above semantics can be achieved by (t1=t2) may be?.

2) SELinux policy may contain attributes, which can be associated with types and can be checked within the constrain(t) expressions in a further step. Within the security server i.e. ss/services.c however, the function "constraint_expr_eval" checks the types only and there is no check for delcared attribute seperately i think so. It seems that attributes are internally mapped to types and within the "constraint_expr_eval" function, only types are checked? Secondly, integers are associated with these types. Whether these types are mapped to integers seperately some where else?. Actually, my intension is to identify a particular type within the "constraint_expr_eval" but i found that, types are first mapped to integers first, and not directly machted based on their names. Is this a correct approach for the identification of particular types or a better approach can be taken before entering into the security server?

Thanks,
Best
JG

___________________________________________________________
Yahoo! Messenger - with free PC-PC calling and photo sharing. http://uk.messenger.yahoo.com

--
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.