]> git.ipfire.org Git - thirdparty/systemd.git/commit
execute: suppress credentials mount if empty
authorLennart Poettering <lennart@poettering.net>
Wed, 3 May 2023 20:45:05 +0000 (22:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 4 May 2023 10:10:01 +0000 (12:10 +0200)
commit21dd1de659935c829a3776b6772f803c2eb4eae3
treeb15ef9ccb26b46d167544f22273db21431189287
parent9107ef5637fe92d408ef231c748fe04ab04cca18
execute: suppress credentials mount if empty

Let's avoid creating another mount in the system if it's empty anyway.

This is mostl a cosmetic thing in one (pretty common) special case: if
creds settings are used in a unit but no creds actually available to be
passed.

(While we are at it this also does one more minor optimization: it
adjusts the MS_RDONLY/MS_NOSUID/… flags of the source mount we are about
to MS_MOVE into the right place only if we actually really move it, and
if we instead unmount it again we won't bother with the flags either)
src/core/execute.c