]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add SCM_SECURITY, SCM_PIDFD to bits/socket.h
authorJoseph Myers <joseph@codesourcery.com>
Mon, 16 Oct 2023 13:19:26 +0000 (13:19 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 16 Oct 2023 13:19:26 +0000 (13:19 +0000)
Linux 6.5 adds a constant SCM_PIDFD (recall that the non-uapi
linux/socket.h, where this constant is added, is in fact a header
providing many constants that are part of the kernel/userspace
interface).  This shows up that SCM_SECURITY, from the same set of
definitions and added in Linux 2.6.17, is also missing from glibc,
although glibc has the first two constants from this set, SCM_RIGHTS
and SCM_CREDENTIALS; add both missing constants to glibc.

Tested for x86_64.

sysdeps/unix/sysv/linux/bits/socket.h

index 57b05715be01a6d73f43e2f1dc22b88410f60c57..c19814c5cfee76be36d6a5526c01d3a5f352f285 100644 (file)
@@ -367,6 +367,10 @@ enum
 #ifdef __USE_GNU
     , SCM_CREDENTIALS = 0x02   /* Credentials passing.  */
 # define SCM_CREDENTIALS SCM_CREDENTIALS
+    , SCM_SECURITY = 0x03      /* Security label.  */
+# define SCM_SECURITY SCM_SECURITY
+    , SCM_PIDFD = 0x04         /* Pidfd.  */
+# define SCM_PIDFD SCM_PIDFD
 #endif
   };