[PATCH 5/5] core: allow building and running without udev

Aleksander Morgado aleksander at aleksander.es
Fri Sep 30 07:29:23 UTC 2016


On Fri, Sep 30, 2016 at 6:10 AM, Dan Williams <dcbw at redhat.com> wrote:
>> The udev rule files are kept in place, and a simple custom parser is
>> provided
>> which preloads all rules in memory once and then applies them to the
>> different
>> kernel objects reported via ReportKernelEvent(), e.g. to set port
>> type hints.
>> A simple unit test setup is prepared to validate the udev rules
>> during the
>> `check' Makefile target.
>>
>
> Generally LGTM; though perhaps load_rules_file() should check the file
> owner and permissions and refuse to parse the file if it's not UID 0
> (or a different one for testcases) and if it's not 0644.  The udev
> files are potentially untrusted input and MM runs as root.

Ah, will do that, yes. I may also provide some hardcoded length limits
for property names and such.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list