From 604d40fce6b7e69e9494de7381071315536335db Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 4 Nov 2024 01:38:46 -0500 Subject: kernel: descrip: Only use copyinstr() in SYS_open Signed-off-by: Ian Moffett --- sys/kern/kern_descrip.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sys/kern/kern_descrip.c') 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; } -- cgit v1.2.3