]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
spec: add ProcessFD to GetConnectionCredentials()
authorLuca Boccassi <bluca@debian.org>
Mon, 20 Mar 2023 01:50:53 +0000 (01:50 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 1 Aug 2023 19:31:33 +0000 (19:31 +0000)
Make D-Bus implementations return a file descriptor
pinning the process as part of the credentials on
platforms that implement such concept, like Linux.

Pinning the process allows to defend against PID
reuse attacks, making authentication by
service/cgroup possible.

Signed-off-by: Luca Boccassi <bluca@debian.org>
doc/dbus-specification.xml

index cec61b2373c4e80c88b5ad611b15ea676db4693c..5207507c4d5ce5f67c4e9cf99dcb909693c16827 100644 (file)
                   to the dictionary.
                 </entry>
               </row>
+              <row>
+                <entry>ProcessFD</entry>
+                <entry>UNIX_FD</entry>
+                <entry>A file descriptor pinning the process, on platforms
+                  that have this concept. On Linux, the SO_PEERPIDFD socket
+                  option is a suitable implementation. This is safer to use
+                  to identify a process than the <literal>ProcessID</literal>,
+                  as the latter is subject to re-use attacks, while the FD
+                  cannot be recycled. If the original process no longer exists
+                  the FD will no longer be resolvable.</entry>
+              </row>
               <row>
                 <entry>ProcessID</entry>
                 <entry>UINT32</entry>