Make RS and VFS aware of new UDS major. Contributed by Thomas Cort

This commit is contained in:
Thomas Veerman 2010-07-15 13:51:38 +00:00
parent ea19830de1
commit 5aff633a0b
3 changed files with 3 additions and 1 deletions

View 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
*/

View 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. */

View 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 },
};