public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Jail and capability mode for shm_rename;
Date: Mon, 11 Jul 2022 11:51:03 +0000 (GMT)	[thread overview]
Message-ID: <20220711115103.D1443385354C@sourceware.org> (raw)

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


                 reply	other threads:[~2022-07-11 11:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220711115103.D1443385354C@sourceware.org \
    --to=sh@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).