-----Original Message-----
From: Kay Sievers [mailto:[email protected]]
Sent: Tuesday, July 16, 2013 10:12 PM
To: Reshetova, Elena
Cc: Lennart Poettering; [email protected]; Ware, Ryan R;
Schaufler, Casey; [email protected]
Subject: Re: [systemd-devel] Patch for Smack labelling support in udev

On Tue, Jul 9, 2013 at 4:34 PM, Reshetova, Elena <[email protected]>
wrote:
>> -static int node_permissions_apply(struct udev_device *dev, bool
>> apply, mode_t mode, uid_t uid, gid_t gid)
>> +static int node_permissions_apply(struct udev_device *dev, bool
>> +apply,
>> mode_t mode,
>> +                                  uid_t uid, gid_t gid, struct
>> +udev_list xattr_list)
>
>>Guess we better pass the udev_list as a const pointer here.
>
> Ups, sorry, missed this one, of course it won't even work this way (I
> haven't tried to run it yet ...

>It looks like it could work, but please test it and make sure it does the
>right thing before we go ahead from here.

OK, so now I have tested it and with one minor fix (passing a list entry and 
not the whole list in udev-node) it works just fine.
I am able to setup one or more xattrs on device node using the syntax

XATTR{attr_name}="value"

For example, I can set a couple of smack-related xattrs in one go like 
XATTR{security.SMACK64}="*", XATTR{security.SMACK64EXEC}="*".
Doesn't make sense from smack point of view (only smack64 is really meaningful 
on device nodes), but proves that functionality works.

I am attaching the patch.

Best Regards,
Elena.




Attachment: 0001-Adding-extended-attribute-support-for-udev-nodes-lab.patch
Description: Binary data

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to