mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
linprocfs: find cwd and root handling
The code would incorrectly use curthread instead of the target proc to resolve vnodes. Fixes:8d03b99b9d("fd: move vnodes out of filedesc into a dedicated structure") PR: 258729 Noted by: Damjan Jovanovic <damjan.jov@gmail.com> (cherry picked from commit69ab528386)
This commit is contained in:
parent
e601434164
commit
cda5e344e2
1 changed files with 2 additions and 2 deletions
|
|
@ -1169,7 +1169,7 @@ linprocfs_doproccwd(PFS_FILL_ARGS)
|
|||
char *fullpath = "unknown";
|
||||
char *freepath = NULL;
|
||||
|
||||
pwd = pwd_hold(td);
|
||||
pwd = pwd_hold_proc(p);
|
||||
vn_fullpath(pwd->pwd_cdir, &fullpath, &freepath);
|
||||
sbuf_printf(sb, "%s", fullpath);
|
||||
if (freepath)
|
||||
|
|
@ -1189,7 +1189,7 @@ linprocfs_doprocroot(PFS_FILL_ARGS)
|
|||
char *fullpath = "unknown";
|
||||
char *freepath = NULL;
|
||||
|
||||
pwd = pwd_hold(td);
|
||||
pwd = pwd_hold_proc(p);
|
||||
vp = jailed(p->p_ucred) ? pwd->pwd_jdir : pwd->pwd_rdir;
|
||||
vn_fullpath(vp, &fullpath, &freepath);
|
||||
sbuf_printf(sb, "%s", fullpath);
|
||||
|
|
|
|||
Loading…
Reference in a new issue