public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: disable creating directories below /dev/mqueue
Date: Tue, 25 May 2021 20:06:08 +0000 (GMT)	[thread overview]
Message-ID: <20210525200608.25A8C3858018@sourceware.org> (raw)

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

commit fd3fb7a1479009507bbd050c845f18497c7117a0
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Tue May 25 22:05:13 2021 +0200

    Cygwin: disable creating directories below /dev/mqueue
    
    ...as on Linux.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/fhandler.h         | 1 +
 winsup/cygwin/fhandler_mqueue.cc | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 8208a0356..4c475184e 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -3151,6 +3151,7 @@ public:
 
   void fixup_after_fork (HANDLE);
 
+  int mkdir (mode_t);
   void __reg3 read (void *, size_t&);
   off_t lseek (off_t, int);
   int __reg2 fstat (struct stat *);
diff --git a/winsup/cygwin/fhandler_mqueue.cc b/winsup/cygwin/fhandler_mqueue.cc
index f074474d7..f3201883d 100644
--- a/winsup/cygwin/fhandler_mqueue.cc
+++ b/winsup/cygwin/fhandler_mqueue.cc
@@ -368,6 +368,13 @@ fhandler_mqueue::get_proc_fd_name (char *buf)
   return strcpy (buf, strrchr (get_name (), '/'));
 }
 
+int
+fhandler_mqueue::mkdir (mode_t mode)
+{
+  set_errno (EPERM);
+  return -1;
+}
+
 /* Do what fhandler_virtual does for read/lseek */
 bool
 fhandler_mqueue::fill_filebuf ()


                 reply	other threads:[~2021-05-25 20:06 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=20210525200608.25A8C3858018@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-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).