]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #15318 from fbuihuu/inherit-umask-for-user-units
authorLennart Poettering <lennart@poettering.net>
Thu, 9 Apr 2020 15:15:55 +0000 (17:15 +0200)
committerGitHub <noreply@github.com>
Thu, 9 Apr 2020 15:15:55 +0000 (17:15 +0200)
pid1: by default make user units inherit their umask from the user ma…

1  2 
man/systemd.exec.xml
src/basic/process-util.c
src/core/unit.c

index 073d331e6d94d39454567e843215bbc053ef78ec,dfb8520e118642443b0386e7b45d5d434079c739..401233475e03bced7164d0b0eebfc2ac56c37aa1
@@@ -652,36 -652,15 +652,41 @@@ CapabilityBoundingSet=~CAP_B CAP_C</pro
          <term><varname>UMask=</varname></term>
  
          <listitem><para>Controls the file mode creation mask. Takes an access mode in octal notation. See
-         <citerefentry><refentrytitle>umask</refentrytitle><manvolnum>2</manvolnum></citerefentry> for details. Defaults
-         to 0022.</para></listitem>
+         <citerefentry><refentrytitle>umask</refentrytitle><manvolnum>2</manvolnum></citerefentry> for
+         details. Defaults to 0022 for system units. For units of the user service manager the default value
+         is inherited from the user instance (whose default is inherited from the system service manager, and
+         thus also is 0022). Hence changing the default value of a user instance, either via
+         <varname>UMask=</varname> or via a PAM module, will affect the user instance itself and all user
+         units started by the user instance unless a user unit has specified its own
+         <varname>UMask=</varname>.</para></listitem>
        </varlistentry>
  
 +      <varlistentry>
 +        <term><varname>CoredumpFilter=</varname></term>
 +
 +        <listitem><para>Controls which types of memory mappings will be saved if the process dumps core
 +        (using the <filename>/proc/<replaceable>pid</replaceable>/coredump_filter</filename> file). Takes a
 +        whitespace-separated combination of mapping type names or numbers (with the default base 16). Mapping
 +        type names are <constant>private-anonymous</constant>, <constant>shared-anonymous</constant>,
 +        <constant>private-file-backed</constant>, <constant>shared-file-backed</constant>,
 +        <constant>elf-headers</constant>, <constant>private-huge</constant>,
 +        <constant>shared-huge</constant>, <constant>private-dax</constant>, <constant>shared-dax</constant>,
 +        and the special values <constant>all</constant> (all types) and <constant>default</constant> (the
 +        kernel default of <literal><constant>private-anonymous</constant>
 +        <constant>shared-anonymous</constant> <constant>elf-headers</constant>
 +        <constant>private-huge</constant></literal>). See
 +        <citerefentry><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry> for the
 +        meaning of the mapping types. When specified multiple times, all specified masks are ORed. When not
 +        set, or if the empty value is assigned, the inherited value is not changed.</para>
 +
 +        <example>
 +          <title>Add DAX pages to the dump filter</title>
 +
 +          <programlisting>CoredumpFilter=default private-dax shared-dax</programlisting>
 +        </example>
 +        </listitem>
 +      </varlistentry>
 +
        <varlistentry>
          <term><varname>KeyringMode=</varname></term>
  
Simple merge
diff --cc src/core/unit.c
Simple merge