[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221217185210.1431478-3-evanhensbergen@icloud.com>
Date: Sat, 17 Dec 2022 18:52:06 +0000
From: Eric Van Hensbergen <evanhensbergen@...oud.com>
To: v9fs-developer@...ts.sourceforge.net, asmadeus@...ewreck.org,
rminnich@...il.com, lucho@...kov.net
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux_oss@...debyte.com,
Eric Van Hensbergen <evanhensbergen@...oud.com>
Subject: [PATCH 2/6] Don't assume UID 0 attach
The writeback_fid fallback code assumes a root uid fallback which
breaks many server configurations (which don't run as root). This
patch switches to generic lookup which will follow argument
guidence on access modes and default ids to use on failure.
There is a deeper underlying problem with writeback_fids in that
this fallback is too standard and not an exception due to the way
writeback mode works in the current implementation. Subsequent
patches will try to associate writeback fids from the original user
either by flushing on close or by holding onto fid until writeback
completes.
Signed-off-by: Eric Van Hensbergen <evanhensbergen@...oud.com>
---
fs/9p/fid.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index 805151114e96..1fbd12d581bb 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -304,7 +304,9 @@ struct p9_fid *v9fs_writeback_fid(struct dentry *dentry)
int err;
struct p9_fid *fid, *ofid;
- ofid = v9fs_fid_lookup_with_uid(dentry, GLOBAL_ROOT_UID, 0);
+ /* pull default uid from dfltuid */
+
+ ofid = v9fs_fid_lookup(dentry);
fid = clone_fid(ofid);
if (IS_ERR(fid))
goto error_out;
--
2.37.2
Powered by blists - more mailing lists