hi..

On 03/03/11 13:52, Andrey Borzenkov wrote:
since reiserfs always sets d_type to DT_UNKNOWN in dirent entries some tools
like systemd-tmpfiles do not work as expected.

Hmm .. this could be the reason for my problem with utmp:

it started with a missing utmp and i tracked it down to systemd-tempfiles not working at all on reiserfs..


in src/util.c:3905 DT_UNKNOWN is already included when checking file for
type DT_REG or DT_LNK.


Do not assume that everyone is having exactly the same sources as you
:) Either include exact commit number for reference, or better just
name function; they are mostly small enough.

oops.. sorry for that.. i thought i mentioned that i am using the systemd v19 sources from the official release..


since there seems to be no special handling for symlinks (e.g. checking the
type of the symlinks destionation) i just fixed scandir_filter to also
accept DT_UNKNOWN.

(other) places where DT_REG checks may fail on reiserfs or other fs that
don't support setting the correct type of file in d_type:

src/tty-ask-password-agent.c:510: if (de->d_type != DT_REG)
src/modules-load.c:45: if (d->d_type != DT_REG&&
src/tmpfiles.c:781: if (d->d_type != DT_REG&&

.. how is this supposed to be handled?

Care to provide a patch to include missing DT_UNKNOWN in all places? :)

the question is: how to fix?

why check for regular file/symlink at all when the destination of the symlink is not checked again..

so there are (at least) to options to (quick) fix this:
  - remove the whole check..
  - add DT_UNKNOWN and may be in addition check for regular file using
    some stat() before reading the config in systemd-tmpfiles..

marius

--
Dipl.-Inf. Marius Tolzmann <marius.tolzm...@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 ;)>
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to