[CRIU] [PATCH] security: check_ids - return true if [se]?[ug]id is the same as task id
Ruslan Kuprieiev
kupruser at gmail.com
Fri May 16 07:54:55 PDT 2014
Currently there are typos in check_ids, so one can't pass this check,
unless (u/g)id == e(g/u)id == s(g/u)id == task_(g/u)id.
Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
security.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security.c b/security.c
index d4b4230..dc90208 100644
--- a/security.c
+++ b/security.c
@@ -28,7 +28,7 @@ static bool check_ids(unsigned int crid, unsigned int
rid, unsigned int eid, uns
{
if (crid == 0)
return true;
- if (crid == rid && crid == eid && crid == sid)
+ if (crid == rid || crid == eid || crid == sid)
return true;
pr_err("UID/GID mismatch %u != (%u,%u,%u)\n", crid, rid, eid, sid);
--
1.8.1.2
More information about the CRIU
mailing list