]> git.ipfire.org Git - thirdparty/systemd.git/commit
chase: CHASE_MKDIR_0755 requires CHASE_NONEXISTENT and/or CHASE_PARENT 27252/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 14 Apr 2023 07:29:08 +0000 (16:29 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 14 Apr 2023 07:36:13 +0000 (16:36 +0900)
commit4ea0bcb9229fe12e0c428659d76934351b821872
treebf2800fb79520bc9230a61ef1fa14a832d6b1484
parent5a2f674a005a8f31648dfed1dde0b34ed02ee7dd
chase: CHASE_MKDIR_0755 requires CHASE_NONEXISTENT and/or CHASE_PARENT

When CHASE_MKDIR_0755 is specified without CHASE_NONEXISTENT and
CHASE_PARENT, then chase() succeeds only when the file specified by
the path already exists, and in that case, chase() does not create
any parent directories, and CHASE_MKDIR_0755 is meaningless.

Let's mention that CHASE_MKDIR_0755 needs to be specified with
CHASE_NONEXISTENT or CHASE_PARENT, and adds a assertion about that.
src/basic/chase.c
src/basic/chase.h
src/test/test-chase.c