* Add SCM_SECURITY, SCM_PIDFD to bits/socket.h
@ 2023-10-13 21:45 Joseph Myers
2023-10-14 8:47 ` Florian Weimer
0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2023-10-13 21:45 UTC (permalink / raw)
To: libc-alpha
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.
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index 57b05715be..c19814c5cf 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -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
};
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Add SCM_SECURITY, SCM_PIDFD to bits/socket.h
2023-10-13 21:45 Add SCM_SECURITY, SCM_PIDFD to bits/socket.h Joseph Myers
@ 2023-10-14 8:47 ` Florian Weimer
0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2023-10-14 8:47 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha
* Joseph Myers:
> 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.
>
> diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
> index 57b05715be..c19814c5cf 100644
> --- a/sysdeps/unix/sysv/linux/bits/socket.h
> +++ b/sysdeps/unix/sysv/linux/bits/socket.h
> @@ -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
> };
Looks good, thanks. It's tested in tools/ in the kernel tree, so it
seems this is part of UAPI despite not being defined/declared in
include/uapi/.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-14 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-13 21:45 Add SCM_SECURITY, SCM_PIDFD to bits/socket.h Joseph Myers
2023-10-14 8:47 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).