On Thu, Mar 20, 2014 at 01:46:50PM +0100, José Bollo wrote:
On mer, 2014-03-19 at 15:16 +0200, Jarkko Sakkinen wrote:
> Hi
>
> I'm starting gather new API to be part of 1.1 version of the SMACK
> user space. What do you think is needed?
\>
I just initiate a wiki page for the discussion and the draft
documentation.
https://github.com/smack-team/smack/wiki/proposal-for-version-1.1
>
> You can see easiest from there what's already there:
>
>
https://github.com/smack-team/smack/blob/master/libsmack/libsmack.sym
The names are okay for me but I will ever prefer smack_label_valid than
smack_label_length even if it returns the length.
For the signatures, I like the enumeration case of the deprecated
functions more than the use of the strings 'SMACK64....'. That provides
a good isolation. An extra parameter could also be add: 'force' telling
that the previous value will be overridden.
a smack_get_label_for_path may also be considered.
>
> I think at least smack_accesses_apply_self() for using the load-self
> might make sense.
Yes it does. The caller must be care taht load-self doesn't support
modify rules.
I would actually instead add:
smack_accesses_apply2(struct smack_accesses *handle, unsigned int flags);
If flags is zero, then it will fallback to smack_accesses_apply().
If flags is SMACK_APPLY_SELF, then it will apply to load-self.
/Jarkko