aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_descrip.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-11-04 01:38:46 -0500
committerIan Moffett <ian@osmora.org>2024-11-04 01:38:46 -0500
commit604d40fce6b7e69e9494de7381071315536335db (patch)
tree87950fe94670ea7d7fad2838c12f4d9ca86b613c /sys/kern/kern_descrip.c
parentfab307311f6e1e87f1c3580b03c5a3e36d1b2645 (diff)
kernel: descrip: Only use copyinstr() in SYS_open
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index adc5027..c3d9b5c 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -208,17 +208,12 @@ int
fd_open(const char *pathname, int flags)
{
int error;
- char pathbuf[PATH_MAX];
struct filedesc *filedes;
struct nameidata nd;
- nd.path = pathbuf;
+ nd.path = pathname;
nd.flags = 0;
- if (copyinstr(pathname, pathbuf, PATH_MAX) < 0) {
- return -EFAULT;
- }
-
if ((error = namei(&nd)) < 0) {
return error;
}