From: Thomas Veerman Date: Thu, 15 Jul 2010 13:51:38 +0000 (+0000) Subject: Make RS and VFS aware of new UDS major. Contributed by Thomas Cort X-Git-Tag: v3.1.8~229 X-Git-Url: http://zhaoyanbai.com/repos/%22/xml/v3/zones/static/sign.html?a=commitdiff_plain;h=5aff633a0b481d4e33d9570f729de684f5b4d0bf;p=minix.git Make RS and VFS aware of new UDS major. Contributed by Thomas Cort --- diff --git a/servers/rs/table.c b/servers/rs/table.c index 444a89a54..f7b0a92a7 100644 --- a/servers/rs/table.c +++ b/servers/rs/table.c @@ -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 */ diff --git a/servers/vfs/open.c b/servers/vfs/open.c index 5a9c9805e..1ef32ca35 100644 --- a/servers/vfs/open.c +++ b/servers/vfs/open.c @@ -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. */ diff --git a/servers/vfs/select.c b/servers/vfs/select.c index 8e1badc67..35a017461 100644 --- a/servers/vfs/select.c +++ b/servers/vfs/select.c @@ -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 }, };