[systemd-devel] [PATCH] add extra check for DT_UNKNOWN files in directory scan

Marius Tolzmann tolzmann at molgen.mpg.de
Thu Mar 3 07:39:21 PST 2011


oops.. sorry.. wrong patch sent...

this won't compile.. but since lennart also fixed it it seems to be 
obsolete anyway... 8)


m.


On 03/03/11 16:36, Marius Tolzmann wrote:
> Hello..
>
> this looks fine.. and is better than just adding DT_UNKOWN 8)
>
> i additionally patched the cgroup-util.c (see attachment)
>
> thx for the patch..
>
> m.
>
>
> On 03/03/11 16:27, Andrey Borzenkov wrote:
>> Some file systems (at least, reiserfs) return DT_UNKNOWN for
>> every directory entry in readdir(). So far in several places
>> systemd filtered on DT_REG/DT_LNK and so skipped any file on
>> such filesystems. It affected systemd-update-utmp, systemd-modules-load
>> and systemd-tty-ask-password-agent.
>>
>> This patch adds additional stat() check for file type for DT_UNKNOWN
>> case. Additionally, it adds check that DT_LNK really points to
>> regular file.
>>
>> The patch fixes misterious runlevel entry in utmp discussed in
>> http://lists.freedesktop.org/archives/systemd-devel/2011-March/001433.html
>>
>>
>> Reported-By: tolzmann at molgen.mpg.de
>> Signed-off-by: Andrey Borzenkov<arvidjaar at gmail.com>
>>
>> ---
>> src/modules-load.c | 137 +++++++++++++++++++++++-------------------
>> src/tmpfiles.c | 22 ++++---
>> src/tty-ask-password-agent.c | 8 ++-
>> 3 files changed, 94 insertions(+), 73 deletions(-)
>
>
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


-- 
Dipl.-Inf. Marius Tolzmann <marius.tolzmann at molgen.mpg.de>
----------------------------------.------------------------------
MPI f. molekulare Genetik         |
Ihnestrasse 63-73, D-14195 Berlin |   ==> MarIuX GNU/Linux <==
Phone: +49 (0)30 8413 1709        |
----------------------------------^------------------------------
God put me on earth to accomplish a certain number of things.
Right now I am so far behind..
    ..I will never die.         <by calvin from calvin&hobbes ;)>


More information about the systemd-devel mailing list