[systemd-devel] [PATCH] config_parse_exec_mount_flags: get rid of unnecessary copy

Lennart Poettering lennart at poettering.net
Thu Apr 23 07:29:20 PDT 2015


On Fri, 13.02.15 09:49, Maciej Wereski (m.wereski at partner.samsung.com) wrote:

> Dnia środa, 11 lutego 2015 13:08:26 Lennart Poettering pisze:
> 
> > This optimization is not valid.
> > 
> > If 'word' is set to "sh", then l will be 2, and strneq(word, "shared",
> > 2) is true, but we don't actually want to allow such abbreviations!
> > 
> > Lennart
> 
> True, I can use strlen("shared" ) then as a n value in strneq. Or please at 
> least change that:
> 
> -                else if (streq(word, "private"))
> +               else if (streq(t, "private"))

Indeed!

Fixed now in git:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=8d9803b83c1f72e1bf158af4615b1c53a4749118

Sorry for the delay!

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list