public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/cygwin-3_4-branch] Cygwin: mknod: disable creating special files on NFS
@ 2023-08-25 12:40 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2023-08-25 12:40 UTC (permalink / raw)
  To: cygwin-cvs

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

commit f1189d596e32bf2db473e3f859d0a40da1ad08ef
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Fri Aug 25 14:39:04 2023 +0200
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Fri Aug 25 14:39:38 2023 +0200

    Cygwin: mknod: disable creating special files on NFS
    
    This simply doesn't work (yet?) but leaves unusable files behind.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/syscalls.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index a0ad3c2d0b29..ba0cd05b270a 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -3292,6 +3292,12 @@ mknod (const char *path, mode_t mode, dev_t dev)
 	  __leave;
 	}
 
+      if (w32path.fs_is_nfs ())
+	{
+	  set_errno (EPERM);
+	  __leave;
+	}
+
       return mknod_worker (w32path, mode, major, minor);
     }
   __except (EFAULT)

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

only message in thread, other threads:[~2023-08-25 12:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25 12:40 [newlib-cygwin/cygwin-3_4-branch] Cygwin: mknod: disable creating special files on NFS Corinna Vinschen

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