Thu Jun 20 03:31:54 2019 UTC ()
Add mkfifo{,at}(2) mode in mknod{,at}(2) as requested by POSIX

mknod with mode & S_IFIFO and dev=0 shall behave like mkfifo.

Update the documentation to reflect this state.

Add ATF tests.

This is an in-kernel implementation as typically user-space programs use
mkfifo(2) directly, however whenever there is need to bypass libc (like in
valgrind) then portable POSIX software calls the mknod syscall.

Noted on tech-kern@ by Greg Troxel.


(kamil)
diff -r1.29 -r1.30 src/lib/libc/sys/mknod.2
diff -r1.227 -r1.228 src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -r1.530 -r1.531 src/sys/kern/vfs_syscalls.c
diff -r1.24 -r1.25 src/sys/sys/vfs_syscalls.h
diff -r1.4 -r1.5 src/tests/lib/libc/c063/t_mkfifoat.c
diff -r1.2 -r1.3 src/tests/lib/libc/sys/t_mkfifo.c

cvs diff -r1.29 -r1.30 src/lib/libc/sys/mknod.2 (expand / switch to unified diff)

--- src/lib/libc/sys/mknod.2 2017/11/20 17:03:31 1.29
+++ src/lib/libc/sys/mknod.2 2019/06/20 03:31:54 1.30
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: mknod.2,v 1.29 2017/11/20 17:03:31 uwe Exp $ 1.\" $NetBSD: mknod.2,v 1.30 2019/06/20 03:31:54 kamil Exp $
2.\" 2.\"
3.\" Copyright (c) 1980, 1991, 1993 3.\" Copyright (c) 1980, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -19,45 +19,66 @@ @@ -19,45 +19,66 @@
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.\" 29.\"
30.\" @(#)mknod.2 8.1 (Berkeley) 6/4/93 30.\" @(#)mknod.2 8.1 (Berkeley) 6/4/93
31.\" 31.\"
32.Dd July 29, 2013 32.Dd June 20, 2019
33.Dt MKNOD 2 33.Dt MKNOD 2
34.Os 34.Os
35.Sh NAME 35.Sh NAME
36.Nm mknod , 36.Nm mknod ,
37.Nm mknodat 37.Nm mknodat
38.Nd make a special file node 38.Nd make a special file node
39.Sh LIBRARY 39.Sh LIBRARY
40.Lb libc 40.Lb libc
41.Sh SYNOPSIS 41.Sh SYNOPSIS
42.In sys/stat.h 42.In sys/stat.h
43.Ft int 43.Ft int
44.Fn mknod "const char *path" "mode_t mode" "dev_t dev" 44.Fn mknod "const char *path" "mode_t mode" "dev_t dev"
45.In sys/stat.h 45.In sys/stat.h
46.In fcntl.h 46.In fcntl.h
47.Ft int 47.Ft int
48.Fn mknodat "int fd" "const char *path" "mode_t mode" "dev_t dev" 48.Fn mknodat "int fd" "const char *path" "mode_t mode" "dev_t dev"
49.Sh DESCRIPTION 49.Sh DESCRIPTION
50The device special file 50.Nm
 51with
 52.Dv S_IFIFO
 53specified in
 54.Fa mode
 55and 0 in
 56.Fa dev
 57makes a fifo file.
 58This call is respectively a portable alias for
 59.Xr mkfifo 2
 60and
 61.Xr mkfifoat 2 .
 62.Pp
 63.Nm
 64with
 65.Dv S_IFCHR
 66or
 67.Dv S_IFBLK
 68in
 69.Fa mode
 70makes a device special file.
 71The file
51.Fa path 72.Fa path
52is created with the major and minor 73is created with the major and minor
53device numbers specified by 74device numbers specified by
54.Fa dev . 75.Fa dev .
55The access permissions of 76The access permissions of
56.Fa path 77.Fa path
57are extracted from 78are extracted from
58.Fa mode , 79.Fa mode ,
59modified by the 80modified by the
60.Xr umask 2 81.Xr umask 2
61of the parent process. 82of the parent process.
62.Pp 83.Pp
63.Fn mknodat 84.Fn mknodat
@@ -77,27 +98,27 @@ Search permission is required on this di @@ -77,27 +98,27 @@ Search permission is required on this di
77.\" was opened with the 98.\" was opened with the
78.\" .Dv O_SEARCH 99.\" .Dv O_SEARCH
79.\" flag. 100.\" flag.
80.\" - or - 101.\" - or -
81.\" This file descriptor must have been opened with the 102.\" This file descriptor must have been opened with the
82.\" .Dv O_SEARCH 103.\" .Dv O_SEARCH
83.\" flag. 104.\" flag.
84.Fa fd 105.Fa fd
85can be set to 106can be set to
86.Dv AT_FDCWD 107.Dv AT_FDCWD
87in order to specify the current directory. 108in order to specify the current directory.
88.Pp 109.Pp
89.Fn mknod 110.Fn mknod
90requires super-user privileges. 111requires super-user privileges for creating device special files.
91.Sh RETURN VALUES 112.Sh RETURN VALUES
92.Rv -std mknod mknodat 113.Rv -std mknod mknodat
93.Sh ERRORS 114.Sh ERRORS
94.Fn mknod 115.Fn mknod
95and 116and
96.Fn mknodat 117.Fn mknodat
97will fail and the file will be not created if: 118will fail and the file will be not created if:
98.Bl -tag -width Er 119.Bl -tag -width Er
99.It Bq Er EACCES 120.It Bq Er EACCES
100Search permission is denied for a component of the path prefix. 121Search permission is denied for a component of the path prefix.
101.It Bq Er EDQUOT 122.It Bq Er EDQUOT
102The directory in which the entry for the new node 123The directory in which the entry for the new node
103is being placed cannot be extended because the 124is being placed cannot be extended because the
@@ -128,26 +149,28 @@ characters, or an entire path name excee @@ -128,26 +149,28 @@ characters, or an entire path name excee
128characters. 149characters.
129.It Bq Er ENOENT 150.It Bq Er ENOENT
130A component of the path prefix does not exist. 151A component of the path prefix does not exist.
131.It Bq Er ENOSPC 152.It Bq Er ENOSPC
132The directory in which the entry for the new node is being placed 153The directory in which the entry for the new node is being placed
133cannot be extended because there is no space left on the file 154cannot be extended because there is no space left on the file
134system containing the directory; or 155system containing the directory; or
135there are no free inodes on the file system on which the 156there are no free inodes on the file system on which the
136node is being created. 157node is being created.
137.It Bq Er ENOTDIR 158.It Bq Er ENOTDIR
138A component of the path prefix is not a directory. 159A component of the path prefix is not a directory.
139.It Bq Er EPERM 160.It Bq Er EPERM
140The process's effective user ID is not super-user. 161The process's effective user ID is not super-user.
 162.It Bq Er EOPNOTSUPP
 163The kernel has not been configured to support fifo's.
141.It Bq Er EROFS 164.It Bq Er EROFS
142The named file resides on a read-only file system. 165The named file resides on a read-only file system.
143.El 166.El
144.Pp 167.Pp
145In addition, 168In addition,
146.Fn mknodat 169.Fn mknodat
147will fail if: 170will fail if:
148.Bl -tag -width Er 171.Bl -tag -width Er
149.It Bq Er EBADF 172.It Bq Er EBADF
150.Fa path 173.Fa path
151does not specify an absolute path and 174does not specify an absolute path and
152.Fa fd 175.Fa fd
153is neither 176is neither
@@ -168,13 +191,20 @@ is a file descriptor associated with a n @@ -168,13 +191,20 @@ is a file descriptor associated with a n
168.Sh STANDARDS 191.Sh STANDARDS
169The 192The
170.Fn mknod 193.Fn mknod
171function conforms to 194function conforms to
172.St -p1003.1-90 . 195.St -p1003.1-90 .
173.Fn mknodat 196.Fn mknodat
174conforms to 197conforms to
175.St -p1003.1-2008 . 198.St -p1003.1-2008 .
176.Sh HISTORY 199.Sh HISTORY
177A 200A
178.Fn mknod 201.Fn mknod
179function call appeared in 202function call appeared in
180.At v6 . 203.At v6 .
 204.Pp
 205The alias mode for
 206.Xr mkfifo 2
 207and
 208.Xr mkfifoat 2
 209first appeared in
 210.Nx 9 .

cvs diff -r1.227 -r1.228 src/sys/compat/netbsd32/netbsd32_netbsd.c (expand / switch to unified diff)

--- src/sys/compat/netbsd32/netbsd32_netbsd.c 2019/06/18 22:34:25 1.227
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c 2019/06/20 03:31:54 1.228
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: netbsd32_netbsd.c,v 1.227 2019/06/18 22:34:25 kamil Exp $ */ 1/* $NetBSD: netbsd32_netbsd.c,v 1.228 2019/06/20 03:31:54 kamil Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998, 2001, 2008, 2018 Matthew R. Green 4 * Copyright (c) 1998, 2001, 2008, 2018 Matthew R. Green
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -17,27 +17,27 @@ @@ -17,27 +17,27 @@
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.227 2019/06/18 22:34:25 kamil Exp $"); 30__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.228 2019/06/20 03:31:54 kamil Exp $");
31 31
32/* 32/*
33 * below are all the standard NetBSD system calls, in the 32bit 33 * below are all the standard NetBSD system calls, in the 32bit
34 * environment, with the necessary conversions to 64bit before calling 34 * environment, with the necessary conversions to 64bit before calling
35 * the real syscall. anything that needs special attention is handled 35 * the real syscall. anything that needs special attention is handled
36 * elsewhere - this file should only contain structure assignment and 36 * elsewhere - this file should only contain structure assignment and
37 * calls to the original function. 37 * calls to the original function.
38 */ 38 */
39 39
40/* 40/*
41 * below are all the standard NetBSD system calls, in the 32bit 41 * below are all the standard NetBSD system calls, in the 32bit
42 * environment, with the necessary conversions to 64bit before calling 42 * environment, with the necessary conversions to 64bit before calling
43 * the real syscall. anything that needs special attention is handled 43 * the real syscall. anything that needs special attention is handled
@@ -287,28 +287,28 @@ netbsd32_fchdir(struct lwp *l, const str @@ -287,28 +287,28 @@ netbsd32_fchdir(struct lwp *l, const str
287 287
288 return sys_fchdir(l, &ua, retval); 288 return sys_fchdir(l, &ua, retval);
289} 289}
290 290
291int 291int
292netbsd32___mknod50(struct lwp *l, const struct netbsd32___mknod50_args *uap, register_t *retval) 292netbsd32___mknod50(struct lwp *l, const struct netbsd32___mknod50_args *uap, register_t *retval)
293{ 293{
294 /* { 294 /* {
295 syscallarg(const netbsd32_charp) path; 295 syscallarg(const netbsd32_charp) path;
296 syscallarg(mode_t) mode; 296 syscallarg(mode_t) mode;
297 syscallarg(netbsd32_dev_t) dev; 297 syscallarg(netbsd32_dev_t) dev;
298 } */ 298 } */
299 299
300 return do_sys_mknod(l, SCARG_P32(uap, path), SCARG(uap, mode), 300 return do_posix_mknodat(l, AT_FDCWD, SCARG_P32(uap, path),
301 SCARG(uap, dev), UIO_USERSPACE); 301 SCARG(uap, mode), SCARG(uap, dev));
302} 302}
303 303
304int 304int
305netbsd32_chmod(struct lwp *l, const struct netbsd32_chmod_args *uap, register_t *retval) 305netbsd32_chmod(struct lwp *l, const struct netbsd32_chmod_args *uap, register_t *retval)
306{ 306{
307 /* { 307 /* {
308 syscallarg(const netbsd32_charp) path; 308 syscallarg(const netbsd32_charp) path;
309 syscallarg(mode_t) mode; 309 syscallarg(mode_t) mode;
310 } */ 310 } */
311 struct sys_chmod_args ua; 311 struct sys_chmod_args ua;
312 312
313 NETBSD32TOP_UAP(path, const char); 313 NETBSD32TOP_UAP(path, const char);
314 NETBSD32TO64_UAP(mode); 314 NETBSD32TO64_UAP(mode);

cvs diff -r1.530 -r1.531 src/sys/kern/vfs_syscalls.c (expand / switch to unified diff)

--- src/sys/kern/vfs_syscalls.c 2019/06/19 14:16:06 1.530
+++ src/sys/kern/vfs_syscalls.c 2019/06/20 03:31:54 1.531
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vfs_syscalls.c,v 1.530 2019/06/19 14:16:06 kamil Exp $ */ 1/* $NetBSD: vfs_syscalls.c,v 1.531 2019/06/20 03:31:54 kamil Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. 4 * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Doran. 8 * by Andrew Doran.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -60,27 +60,27 @@ @@ -60,27 +60,27 @@
60 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 60 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
61 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 61 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
62 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 62 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
63 * SUCH DAMAGE. 63 * SUCH DAMAGE.
64 * 64 *
65 * @(#)vfs_syscalls.c 8.42 (Berkeley) 7/31/95 65 * @(#)vfs_syscalls.c 8.42 (Berkeley) 7/31/95
66 */ 66 */
67 67
68/* 68/*
69 * Virtual File System System Calls 69 * Virtual File System System Calls
70 */ 70 */
71 71
72#include <sys/cdefs.h> 72#include <sys/cdefs.h>
73__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.530 2019/06/19 14:16:06 kamil Exp $"); 73__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.531 2019/06/20 03:31:54 kamil Exp $");
74 74
75#ifdef _KERNEL_OPT 75#ifdef _KERNEL_OPT
76#include "opt_fileassoc.h" 76#include "opt_fileassoc.h"
77#include "veriexec.h" 77#include "veriexec.h"
78#endif 78#endif
79 79
80#include <sys/param.h> 80#include <sys/param.h>
81#include <sys/systm.h> 81#include <sys/systm.h>
82#include <sys/namei.h> 82#include <sys/namei.h>
83#include <sys/filedesc.h> 83#include <sys/filedesc.h>
84#include <sys/kernel.h> 84#include <sys/kernel.h>
85#include <sys/file.h> 85#include <sys/file.h>
86#include <sys/fcntl.h> 86#include <sys/fcntl.h>
@@ -2141,57 +2141,71 @@ sys___fhstatvfs140(struct lwp *l, const  @@ -2141,57 +2141,71 @@ sys___fhstatvfs140(struct lwp *l, const
2141 syscallarg(int) flags; 2141 syscallarg(int) flags;
2142 } */ 2142 } */
2143 struct statvfs *sb = STATVFSBUF_GET(); 2143 struct statvfs *sb = STATVFSBUF_GET();
2144 int error; 2144 int error;
2145 2145
2146 error = do_fhstatvfs(l, SCARG(uap, fhp), SCARG(uap, fh_size), sb, 2146 error = do_fhstatvfs(l, SCARG(uap, fhp), SCARG(uap, fh_size), sb,
2147 SCARG(uap, flags)); 2147 SCARG(uap, flags));
2148 if (error == 0) 2148 if (error == 0)
2149 error = copyout(sb, SCARG(uap, buf), sizeof(*sb)); 2149 error = copyout(sb, SCARG(uap, buf), sizeof(*sb));
2150 STATVFSBUF_PUT(sb); 2150 STATVFSBUF_PUT(sb);
2151 return error; 2151 return error;
2152} 2152}
2153 2153
 2154int
 2155do_posix_mknodat(struct lwp *l, int fdat, const char *pathname, mode_t mode,
 2156 dev_t dev)
 2157{
 2158
 2159 if ((mode & S_IFIFO) && dev == 0)
 2160 return do_sys_mkfifoat(l, fdat, pathname, mode);
 2161 else if (mode & (S_IFCHR | S_IFBLK))
 2162 return do_sys_mknodat(l, fdat, pathname, mode, dev,
 2163 UIO_USERSPACE);
 2164 else
 2165 return EINVAL;
 2166}
 2167
2154/* 2168/*
2155 * Create a special file. 2169 * Create a special file.
2156 */ 2170 */
2157/* ARGSUSED */ 2171/* ARGSUSED */
2158int 2172int
2159sys___mknod50(struct lwp *l, const struct sys___mknod50_args *uap, 2173sys___mknod50(struct lwp *l, const struct sys___mknod50_args *uap,
2160 register_t *retval) 2174 register_t *retval)
2161{ 2175{
2162 /* { 2176 /* {
2163 syscallarg(const char *) path; 2177 syscallarg(const char *) path;
2164 syscallarg(mode_t) mode; 2178 syscallarg(mode_t) mode;
2165 syscallarg(dev_t) dev; 2179 syscallarg(dev_t) dev;
2166 } */ 2180 } */
2167 return do_sys_mknodat(l, AT_FDCWD, SCARG(uap, path), 2181 return do_posix_mknodat(l, AT_FDCWD, SCARG(uap, path),
2168 SCARG(uap, mode), SCARG(uap, dev), UIO_USERSPACE); 2182 SCARG(uap, mode), SCARG(uap, dev));
2169} 2183}
2170 2184
2171int 2185int
2172sys_mknodat(struct lwp *l, const struct sys_mknodat_args *uap, 2186sys_mknodat(struct lwp *l, const struct sys_mknodat_args *uap,
2173 register_t *retval) 2187 register_t *retval)
2174{ 2188{
2175 /* { 2189 /* {
2176 syscallarg(int) fd; 2190 syscallarg(int) fd;
2177 syscallarg(const char *) path; 2191 syscallarg(const char *) path;
2178 syscallarg(mode_t) mode; 2192 syscallarg(mode_t) mode;
2179 syscallarg(int) pad; 2193 syscallarg(int) pad;
2180 syscallarg(dev_t) dev; 2194 syscallarg(dev_t) dev;
2181 } */ 2195 } */
2182 2196
2183 return do_sys_mknodat(l, SCARG(uap, fd), SCARG(uap, path), 2197 return do_posix_mknodat(l, SCARG(uap, fd), SCARG(uap, path),
2184 SCARG(uap, mode), SCARG(uap, dev), UIO_USERSPACE); 2198 SCARG(uap, mode), SCARG(uap, dev));
2185} 2199}
2186 2200
2187int 2201int
2188do_sys_mknod(struct lwp *l, const char *pathname, mode_t mode, dev_t dev, 2202do_sys_mknod(struct lwp *l, const char *pathname, mode_t mode, dev_t dev,
2189 enum uio_seg seg) 2203 enum uio_seg seg)
2190{ 2204{
2191 return do_sys_mknodat(l, AT_FDCWD, pathname, mode, dev, seg); 2205 return do_sys_mknodat(l, AT_FDCWD, pathname, mode, dev, seg);
2192} 2206}
2193 2207
2194int 2208int
2195do_sys_mknodat(struct lwp *l, int fdat, const char *pathname, mode_t mode, 2209do_sys_mknodat(struct lwp *l, int fdat, const char *pathname, mode_t mode,
2196 dev_t dev, enum uio_seg seg) 2210 dev_t dev, enum uio_seg seg)
2197{ 2211{

cvs diff -r1.24 -r1.25 src/sys/sys/vfs_syscalls.h (expand / switch to unified diff)

--- src/sys/sys/vfs_syscalls.h 2019/06/18 22:34:26 1.24
+++ src/sys/sys/vfs_syscalls.h 2019/06/20 03:31:54 1.25
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vfs_syscalls.h,v 1.24 2019/06/18 22:34:26 kamil Exp $ */ 1/* $NetBSD: vfs_syscalls.h,v 1.25 2019/06/20 03:31:54 kamil Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. 4 * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -60,26 +60,27 @@ int do_sys_utimensat(struct lwp *, int,  @@ -60,26 +60,27 @@ int do_sys_utimensat(struct lwp *, int,
60 const struct timespec *, enum uio_seg); 60 const struct timespec *, enum uio_seg);
61 61
62struct pathbuf; 62struct pathbuf;
63int do_open(struct lwp *, struct vnode *, struct pathbuf *, int, int, int *); 63int do_open(struct lwp *, struct vnode *, struct pathbuf *, int, int, int *);
64 64
65int vfs_copyinfh_alloc(const void *, size_t, fhandle_t **); 65int vfs_copyinfh_alloc(const void *, size_t, fhandle_t **);
66void vfs_copyinfh_free(fhandle_t *); 66void vfs_copyinfh_free(fhandle_t *);
67 67
68int dofhopen(struct lwp *, const void *, size_t, int, register_t *); 68int dofhopen(struct lwp *, const void *, size_t, int, register_t *);
69 69
70int do_sys_linkat(struct lwp *, int, const char *, int, const char *, int, register_t *); 70int do_sys_linkat(struct lwp *, int, const char *, int, const char *, int, register_t *);
71int do_sys_unlink(const char *, enum uio_seg); 71int do_sys_unlink(const char *, enum uio_seg);
72int do_sys_rename(const char *, const char *, enum uio_seg, int); 72int do_sys_rename(const char *, const char *, enum uio_seg, int);
 73int do_posix_mknodat(struct lwp *, int, const char *, mode_t, dev_t);
73int do_sys_mknod(struct lwp *, const char *, mode_t, dev_t, enum uio_seg); 74int do_sys_mknod(struct lwp *, const char *, mode_t, dev_t, enum uio_seg);
74int do_sys_mknodat(struct lwp *, int, const char *, mode_t, dev_t, enum uio_seg); 75int do_sys_mknodat(struct lwp *, int, const char *, mode_t, dev_t, enum uio_seg);
75int do_sys_chmodat(struct lwp *, int, const char *, int, int); 76int do_sys_chmodat(struct lwp *, int, const char *, int, int);
76int do_sys_chownat(struct lwp *, int, const char *, uid_t, gid_t, int); 77int do_sys_chownat(struct lwp *, int, const char *, uid_t, gid_t, int);
77int do_sys_accessat(struct lwp *, int, const char *, int ,int); 78int do_sys_accessat(struct lwp *, int, const char *, int ,int);
78int do_sys_mkdir(const char *, mode_t, enum uio_seg); 79int do_sys_mkdir(const char *, mode_t, enum uio_seg);
79int do_sys_symlink(const char *, const char *, enum uio_seg); 80int do_sys_symlink(const char *, const char *, enum uio_seg);
80int do_sys_quotactl(const char *, const struct quotactl_args *); 81int do_sys_quotactl(const char *, const struct quotactl_args *);
81void do_sys_sync(struct lwp *); 82void do_sys_sync(struct lwp *);
82 83
83int chdir_lookup(const char *, int, struct vnode **, struct lwp *); 84int chdir_lookup(const char *, int, struct vnode **, struct lwp *);
84void change_root(struct cwdinfo *, struct vnode *, struct lwp *); 85void change_root(struct cwdinfo *, struct vnode *, struct lwp *);
85 86

cvs diff -r1.4 -r1.5 src/tests/lib/libc/c063/t_mkfifoat.c (expand / switch to unified diff)

--- src/tests/lib/libc/c063/t_mkfifoat.c 2017/01/14 20:55:26 1.4
+++ src/tests/lib/libc/c063/t_mkfifoat.c 2019/06/20 03:31:53 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: t_mkfifoat.c,v 1.4 2017/01/14 20:55:26 christos Exp $ */ 1/* $NetBSD: t_mkfifoat.c,v 1.5 2019/06/20 03:31:53 kamil Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2012 The NetBSD Foundation, Inc. 4 * Copyright (c) 2012 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Emmanuel Dreyfus. 8 * by Emmanuel Dreyfus.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -19,27 +19,27 @@ @@ -19,27 +19,27 @@
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31#include <sys/cdefs.h> 31#include <sys/cdefs.h>
32__RCSID("$NetBSD: t_mkfifoat.c,v 1.4 2017/01/14 20:55:26 christos Exp $"); 32__RCSID("$NetBSD: t_mkfifoat.c,v 1.5 2019/06/20 03:31:53 kamil Exp $");
33 33
34#include <atf-c.h> 34#include <atf-c.h>
35#include <errno.h> 35#include <errno.h>
36#include <fcntl.h> 36#include <fcntl.h>
37#include <limits.h> 37#include <limits.h>
38#include <paths.h> 38#include <paths.h>
39#include <stdio.h> 39#include <stdio.h>
40#include <string.h> 40#include <string.h>
41#include <unistd.h> 41#include <unistd.h>
42#include <sys/param.h> 42#include <sys/param.h>
43#include <sys/stat.h> 43#include <sys/stat.h>
44 44
45#define DIR "dir" 45#define DIR "dir"
@@ -98,23 +98,50 @@ ATF_TC_HEAD(mkfifoat_fderr, tc) @@ -98,23 +98,50 @@ ATF_TC_HEAD(mkfifoat_fderr, tc)
98 atf_tc_set_md_var(tc, "descr", "See that mkfifoat fails with fd as -1"); 98 atf_tc_set_md_var(tc, "descr", "See that mkfifoat fails with fd as -1");
99} 99}
100ATF_TC_BODY(mkfifoat_fderr, tc) 100ATF_TC_BODY(mkfifoat_fderr, tc)
101{ 101{
102 int fd; 102 int fd;
103 mode_t mode = 0600; 103 mode_t mode = 0600;
104 104
105 ATF_REQUIRE(mkdir(DIR, 0755) == 0); 105 ATF_REQUIRE(mkdir(DIR, 0755) == 0);
106 ATF_REQUIRE((fd = open(FIFO, O_CREAT|O_RDWR, 0644)) != -1); 106 ATF_REQUIRE((fd = open(FIFO, O_CREAT|O_RDWR, 0644)) != -1);
107 ATF_REQUIRE(close(fd) == 0); 107 ATF_REQUIRE(close(fd) == 0);
108 ATF_REQUIRE(mkfifoat(-1, FIFO, mode) == -1); 108 ATF_REQUIRE(mkfifoat(-1, FIFO, mode) == -1);
109} 109}
110 110
 111ATF_TC(mknodat_s_ififo);
 112ATF_TC_HEAD(mknodat_s_ififo, tc)
 113{
 114 atf_tc_set_md_var(tc, "descr", "Test mknodat(2) with S_IFIFO");
 115}
 116
 117ATF_TC_BODY(mknodat_s_ififo, tc)
 118{
 119 struct stat st;
 120 int dfd;
 121 mode_t mode = S_IFIFO | 0600;
 122
 123 (void)memset(&st, 0, sizeof(struct stat));
 124
 125 ATF_REQUIRE(mkdir(DIR, 0755) == 0);
 126 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
 127 ATF_REQUIRE(mknodat(dfd, BASEFIFO, mode, 0) != -1);
 128 ATF_REQUIRE(access(FIFO, F_OK) == 0);
 129 ATF_REQUIRE(stat(FIFO, &st) == 0);
 130
 131 if (S_ISFIFO(st.st_mode) == 0)
 132 atf_tc_fail("invalid mode from mknodat(2) with S_IFIFO");
 133
 134 (void)close(dfd);
 135}
 136
111ATF_TP_ADD_TCS(tp) 137ATF_TP_ADD_TCS(tp)
112{ 138{
113 139
114 ATF_TP_ADD_TC(tp, mkfifoat_fd); 140 ATF_TP_ADD_TC(tp, mkfifoat_fd);
115 ATF_TP_ADD_TC(tp, mkfifoat_fdcwd); 141 ATF_TP_ADD_TC(tp, mkfifoat_fdcwd);
116 ATF_TP_ADD_TC(tp, mkfifoat_fdcwderr); 142 ATF_TP_ADD_TC(tp, mkfifoat_fdcwderr);
117 ATF_TP_ADD_TC(tp, mkfifoat_fderr); 143 ATF_TP_ADD_TC(tp, mkfifoat_fderr);
 144 ATF_TP_ADD_TC(tp, mknodat_s_ififo);
118 145
119 return atf_no_error(); 146 return atf_no_error();
120} 147}

cvs diff -r1.2 -r1.3 src/tests/lib/libc/sys/t_mkfifo.c (expand / switch to unified diff)

--- src/tests/lib/libc/sys/t_mkfifo.c 2011/11/02 06:04:48 1.2
+++ src/tests/lib/libc/sys/t_mkfifo.c 2019/06/20 03:31:54 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: t_mkfifo.c,v 1.2 2011/11/02 06:04:48 jruoho Exp $ */ 1/* $NetBSD: t_mkfifo.c,v 1.3 2019/06/20 03:31:54 kamil Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2011 The NetBSD Foundation, Inc. 4 * Copyright (c) 2011 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jukka Ruohonen. 8 * by Jukka Ruohonen.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -19,27 +19,27 @@ @@ -19,27 +19,27 @@
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31#include <sys/cdefs.h> 31#include <sys/cdefs.h>
32__RCSID("$NetBSD: t_mkfifo.c,v 1.2 2011/11/02 06:04:48 jruoho Exp $"); 32__RCSID("$NetBSD: t_mkfifo.c,v 1.3 2019/06/20 03:31:54 kamil Exp $");
33 33
34#include <sys/stat.h> 34#include <sys/stat.h>
35#include <sys/wait.h> 35#include <sys/wait.h>
36 36
37#include <atf-c.h> 37#include <atf-c.h>
38#include <errno.h> 38#include <errno.h>
39#include <fcntl.h> 39#include <fcntl.h>
40#include <limits.h> 40#include <limits.h>
41#include <stdlib.h> 41#include <stdlib.h>
42#include <signal.h> 42#include <signal.h>
43#include <string.h> 43#include <string.h>
44#include <unistd.h> 44#include <unistd.h>
45 45
@@ -253,24 +253,53 @@ ATF_TC_BODY(mkfifo_stat, tc) @@ -253,24 +253,53 @@ ATF_TC_BODY(mkfifo_stat, tc)
253 ATF_REQUIRE(stat(path, &st) == 0); 253 ATF_REQUIRE(stat(path, &st) == 0);
254 254
255 if (S_ISFIFO(st.st_mode) == 0) 255 if (S_ISFIFO(st.st_mode) == 0)
256 atf_tc_fail("invalid mode from mkfifo(2)"); 256 atf_tc_fail("invalid mode from mkfifo(2)");
257 257
258 ATF_REQUIRE(unlink(path) == 0); 258 ATF_REQUIRE(unlink(path) == 0);
259} 259}
260 260
261ATF_TC_CLEANUP(mkfifo_stat, tc) 261ATF_TC_CLEANUP(mkfifo_stat, tc)
262{ 262{
263 (void)unlink(path); 263 (void)unlink(path);
264} 264}
265 265
 266ATF_TC_WITH_CLEANUP(mknod_s_ififo);
 267ATF_TC_HEAD(mknod_s_ififo, tc)
 268{
 269 atf_tc_set_md_var(tc, "descr", "Test mknod(2) with S_IFIFO");
 270}
 271
 272ATF_TC_BODY(mknod_s_ififo, tc)
 273{
 274 struct stat st;
 275
 276 support();
 277
 278 (void)memset(&st, 0, sizeof(struct stat));
 279
 280 ATF_REQUIRE(mknod(path, S_IFIFO | 0600, 0) == 0);
 281 ATF_REQUIRE(stat(path, &st) == 0);
 282
 283 if (S_ISFIFO(st.st_mode) == 0)
 284 atf_tc_fail("invalid mode from mknod(2) with S_IFIFO");
 285
 286 ATF_REQUIRE(unlink(path) == 0);
 287}
 288
 289ATF_TC_CLEANUP(mknod_s_ififo, tc)
 290{
 291 (void)unlink(path);
 292}
 293
266ATF_TP_ADD_TCS(tp) 294ATF_TP_ADD_TCS(tp)
267{ 295{
268 296
269 ATF_TP_ADD_TC(tp, mkfifo_block); 297 ATF_TP_ADD_TC(tp, mkfifo_block);
270 ATF_TP_ADD_TC(tp, mkfifo_err); 298 ATF_TP_ADD_TC(tp, mkfifo_err);
271 ATF_TP_ADD_TC(tp, mkfifo_nonblock); 299 ATF_TP_ADD_TC(tp, mkfifo_nonblock);
272 ATF_TP_ADD_TC(tp, mkfifo_perm); 300 ATF_TP_ADD_TC(tp, mkfifo_perm);
273 ATF_TP_ADD_TC(tp, mkfifo_stat); 301 ATF_TP_ADD_TC(tp, mkfifo_stat);
 302 ATF_TP_ADD_TC(tp, mknod_s_ififo);
274 303
275 return atf_no_error(); 304 return atf_no_error();
276} 305}