]> Zhao Yanbai Git Server - minix.git/commitdiff
Make RS and VFS aware of new UDS major. Contributed by Thomas Cort
authorThomas Veerman <thomas@minix3.org>
Thu, 15 Jul 2010 13:51:38 +0000 (13:51 +0000)
committerThomas Veerman <thomas@minix3.org>
Thu, 15 Jul 2010 13:51:38 +0000 (13:51 +0000)
servers/rs/table.c
servers/vfs/open.c
servers/vfs/select.c

index 444a89a54b48ba9f8e1112005eb96a7a411c7bde..f7b0a92a7770467e42e2c6bc57c706331fc59fb1 100644 (file)
@@ -48,6 +48,7 @@ PUBLIC struct boot_image_dev boot_image_dev_table[] = {
   { TTY_PROC_NR,     SRV_DF,  TTY_MAJOR,    STYLE_TTY,  STYLE_CTTY },
   { MEM_PROC_NR,     SRV_DF,  MEMORY_MAJOR, STYLE_DEV,  STYLE_NDEV },
   { LOG_PROC_NR,     SRV_DF,  LOG_MAJOR,    STYLE_DEVA, STYLE_NDEV },
+  { PFS_PROC_NR,     SRV_DF,  UDS_MAJOR,    STYLE_CLONE,STYLE_NDEV },
   { DEFAULT_BOOT_NR, SRV_DF,  0,            STYLE_NDEV, STYLE_NDEV } /* default
                                                                       * entry
                                                                       */
index 5a9c9805e5806e3cece39a91dcd8003cd5ef70ab..1ef32ca35880333accd1da60be8a6822a02bd0f1 100644 (file)
@@ -401,7 +401,7 @@ PUBLIC int do_mknod()
   
   /* Only the super_user may make nodes other than fifos. */
   mode_bits = (mode_t) m_in.mk_mode;           /* mode of the inode */
-  if(!super_user && ((mode_bits & I_TYPE) != I_NAMED_PIPE)) return(EPERM);
+  if(!super_user && (((mode_bits & I_TYPE) != I_NAMED_PIPE) && ((mode_bits & I_TYPE) != I_UNIX_SOCKET))) return(EPERM);
   bits = (mode_bits & I_TYPE) | (mode_bits & ALL_MODES & fp->fp_umask);
 
   /* Open directory that's going to hold the new node. */
index 8e1badc670a3b57b897e37162718998245340d08..35a017461dd7047cc38a9aae335042fbe2996a12 100644 (file)
@@ -71,6 +71,7 @@ PRIVATE struct fdtype {
        { select_request_file, select_match_file, 0 },
        { select_request_general, NULL, TTY_MAJOR },
        { select_request_general, NULL, INET_MAJOR },
+       { select_request_general, NULL, UDS_MAJOR },
        { select_request_pipe, select_match_pipe, 0 },
        { select_request_asynch, NULL, LOG_MAJOR },
 };