[systemd-devel] [PATCH] add extra check for DT_UNKNOWN files in directory scan
Marius Tolzmann
tolzmann at molgen.mpg.de
Thu Mar 3 07:36:15 PST 2011
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(-)
--
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 ;)>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cgroup-util-DT_UNKNOWN.patch
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110303/806e0046/attachment.ksh>
More information about the systemd-devel
mailing list