From a08d68de5b4598f217e7af16710d027e2e20d816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sat, 27 Oct 2001 11:15:19 +0000 Subject: Eliminate the prefix parameter to linux_emul_find(), which was always linux_emul_path anyway. Linux_emul_find() has interesting bugs in its prefix handling (which luckily are not currently exploitable); this commit is preliminary to an attempt at cleaning it up. Approved by: marcel --- sys/compat/linux/linux_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/compat/linux/linux_util.c') diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 45c85b6cab0b..c30d0f4998fe 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -50,10 +50,9 @@ const char linux_emul_path[] = "/compat/linux"; * be in exists. */ int -linux_emul_find(td, sgp, prefix, path, pbuf, cflag) +linux_emul_find(td, sgp, path, pbuf, cflag) struct thread *td; caddr_t *sgp; /* Pointer to stackgap memory */ - const char *prefix; char *path; char **pbuf; int cflag; @@ -63,15 +62,16 @@ linux_emul_find(td, sgp, prefix, path, pbuf, cflag) struct vattr vat; struct vattr vatroot; int error; + const char *prefix; char *ptr, *buf, *cp; size_t sz, len; buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK); *pbuf = path; + prefix = linux_emul_path; for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++) continue; - sz = MAXPATHLEN - (ptr - buf); /* -- cgit v1.2.3