[newlib 12/65] Jail and capability mode for shm_rename;
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Jul 7 11:58:19 UTC 2022
From: David Bright <dab at FreeBSD.org>
add audit support for shm_rename
Co-mingling two things here:
* Addressing some feedback from Konstantin and Kyle re: jail,
capability mode, and a few other things
* Adding audit support as promised.
The audit support change includes a partial refresh of OpenBSM from
upstream, where the change to add shm_rename has already been
accepted. Matthew doesn't plan to work on refreshing anything else to
support audit for those new event types.
Submitted by: Matthew Bryan <matthew.bryan at isilon.com>
Reviewed by: kib
Relnotes: Yes
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D22083
---
newlib/libc/sys/rtems/include/sys/mman.h | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/newlib/libc/sys/rtems/include/sys/mman.h b/newlib/libc/sys/rtems/include/sys/mman.h
index c68efcc15..7a9b49429 100644
--- a/newlib/libc/sys/rtems/include/sys/mman.h
+++ b/newlib/libc/sys/rtems/include/sys/mman.h
@@ -118,6 +118,15 @@
#define MAP_ALIGNMENT_SHIFT 24
#define MAP_ALIGNMENT_MASK MAP_ALIGNED(0xff)
#define MAP_ALIGNED_SUPER MAP_ALIGNED(1) /* align on a superpage */
+
+/*
+ * Flags provided to shm_rename
+ */
+/* Don't overwrite dest, if it exists */
+#define SHM_RENAME_NOREPLACE (1 << 0)
+/* Atomically swap src and dest */
+#define SHM_RENAME_EXCHANGE (1 << 1)
+
#endif /* __BSD_VISIBLE */
#if __POSIX_VISIBLE >= 199309
@@ -133,14 +142,6 @@
*/
#define MAP_FAILED ((void *)-1)
-/*
- * Flags provided to shm_rename
- */
-/* Don't overwrite dest, if it exists */
-#define SHM_RENAME_NOREPLACE (1 << 0)
-/* Atomically swap src and dest */
-#define SHM_RENAME_EXCHANGE (1 << 1)
-
/*
* msync() flags
*/
@@ -272,11 +273,11 @@ int posix_madvise(void *, size_t, int);
int mlockall(int);
int munlockall(void);
int shm_open(const char *, int, mode_t);
-int shm_rename(const char *, const char *, int);
int shm_unlink(const char *);
#endif
#if __BSD_VISIBLE
int memfd_create(const char *, unsigned int);
+int shm_rename(const char *, const char *, int);
#endif
__END_DECLS
--
2.35.3
More information about the devel
mailing list