public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Jail and capability mode for shm_rename;
@ 2022-07-11 11:51 Sebastian Huber
  0 siblings, 0 replies; only message in thread
From: Sebastian Huber @ 2022-07-11 11:51 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0c854dd6d15774e12323110b699e2d0c90b7635a

commit 0c854dd6d15774e12323110b699e2d0c90b7635a
Author: David Bright <dab@FreeBSD.org>
Date:   Mon Nov 18 13:31:16 2019 +0000

    Jail and capability mode for shm_rename;
    
    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@isilon.com>
    Reviewed by:    kib
    Relnotes:       Yes
    Sponsored by:   Dell EMC Isilon
    Differential Revision:  https://reviews.freebsd.org/D22083

Diff:
---
 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-11 11:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 11:51 [newlib-cygwin] Jail and capability mode for shm_rename; Sebastian Huber

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).