On 03/11/2014 11:19 PM, Steve Beattie wrote:
> On Fri, Mar 07, 2014 at 09:31:25AM -0800, [email protected] wrote:
>> Make it more generic so that it can be shared with signals.
>>
>> Signed-off-by: John Johansen <[email protected]>
> 
> So this looks good enough for Acked-by: Steve Beattie <[email protected]>,
> just one question:
> 
>> +static int parse_X_sub_mode(const char *X, const char *str_mode, int 
>> *result, int fail, const char *mode_desc __unused)
>> +{
>> +    int mode = 0;
>> +    const char *p;
>> +
>> +    PDEBUG("Parsing X mode: %s\n", X, str_mode);
>> +
>> +    if (!str_mode)
>> +            return 0;
>> +
>> +    p = str_mode;
>> +    while (*p) {
>> +            char current = *p;
>> +            char lower;
>> +
>> +reeval:
>> +            switch (current) {
>> +            case COD_READ_CHAR:
>> +                    PDEBUG("Parsing %s mode: found %s READ\n", X, 
>> mode_desc);
>> +                    mode |= AA_DBUS_RECEIVE;
>> +                    break;
>> +
>> +            case COD_WRITE_CHAR:
>> +                    PDEBUG("Parsing %s mode: found %s WRITE\n", X,
>> +                           mode_desc);
>> +                    mode |= AA_DBUS_SEND;
> 
> If this function is to be shared between dbus and signals, should
> AA_DBUS_RECEIVE and AA_DBUS SEND be morphed into something more generic?
> Or does that occur in the patch that introduces signal support?
> 
Sigh, yeah we need to patch it into something more generic. Signal is
using it as AA_MAY_SEND, but they need to be explicitly tied.


-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to