Message ID | 20200211165753.356508-18-christian.brauner@ubuntu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | user_namespace: introduce fsid mappings | expand |
diff --git a/kernel/sys.c b/kernel/sys.c index ae376d32c1e3..b89334ad0908 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -847,9 +847,9 @@ long __sys_setfsgid(gid_t gid) kgid_t kgid; old = current_cred(); - old_fsgid = from_kgid_munged(old->user_ns, old->fsgid); + old_fsgid = from_kfsgid_munged(old->user_ns, old->fsgid); - kgid = make_kgid(old->user_ns, gid); + kgid = make_kfsgid(old->user_ns, gid); if (!gid_valid(kgid)) return old_fsgid;
Switch setfsgid() to lookup fsids in the fsid mappings. If no fsid mappings are setup the behavior is unchanged, i.e. fsids are looked up in the id mappings. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> --- kernel/sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)