Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37b11804 authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

userns: Handle -1 in k[ug]id_has_mapping when !CONFIG_USER_NS



Refuse to admit any user namespace has a mapping of the INVALID_UID
and the INVALID_GID when !CONFIG_USER_NS.

Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent a475acf0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -177,12 +177,12 @@ static inline gid_t from_kgid_munged(struct user_namespace *to, kgid_t kgid)

static inline bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid)
{
	return true;
	return uid_valid(uid);
}

static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid)
{
	return true;
	return gid_valid(gid);
}

#endif /* CONFIG_USER_NS */