Skip to content

UID/GID lookup fixes

Martin Doucha ltp 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7chmod05, fchmod05: Use free GID instead of "bin" grouptestcases/kernel/syscalls/chmod/chmod05.c testcases/kernel/syscalls/fchmod/fchmod05.c+8 -61 reply
2/7Simplify syscalls/mkdir02testcases/kernel/syscalls/mkdir/mkdir02.c+24 -531 reply
3/7Add user/group ID lookup helper functionsinclude/tst_safe_macros.h include/tst_uid.h lib/tst_uid.c+123 -01 reply
3/7Add user/group ID lookup helper functions+0 -00 replies
4/7syscalls/kill05: Use any two unprivileged userstestcases/kernel/syscalls/kill/kill05.c+10 -131 reply
4/7syscalls/kill05: Use any two unprivileged users+0 -02 replies
4/7syscalls/kill05: Use any two unprivileged users+0 -01 reply
4/7syscalls/kill05: Use any two unprivileged users+0 -00 replies
5/7syscalls/mkdir04: Simplify test and use any existing userstestcases/kernel/syscalls/mkdir/mkdir04.c+8 -220 replies
6/7syscalls/setregid02-04: Simplify GID handlingtestcases/kernel/syscalls/setregid/setregid02.c testcases/kernel/syscalls/setregid/setregid03.c testcases/kernel/syscalls/setregid/setregid04.c+61 -860 replies
7/7syscalls/setregid02-04: Eliminate named group lookupstestcases/kernel/syscalls/setregid/setregid02.c testcases/kernel/syscalls/setregid/setregid03.c testcases/kernel/syscalls/setregid/setregid04.c+58 -460 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [LTP] [PATCH 0/7] UID/GID lookup fixes

Some LTP tests assume that certain user/group names exist on all systems. That is not true and those tests fail as a result.

This patchset replaces lookups of specific named users/groups with either some unused group ID or any existing user/group IDs, depending on test scenario. There are more tests with the same issue but they also require porting to the new LTP API. I'll submit those later one by one.

Martin Doucha (7):
chmod05, fchmod05: Use free GID instead of "bin" group Simplify syscalls/mkdir02
Add user/group ID lookup helper functions syscalls/kill05: Use any two unprivileged users syscalls/mkdir04: Simplify test and use any existing users syscalls/setregid02-04: Simplify GID handling syscalls/setregid02-04: Eliminate named group lookups

 include/tst_safe_macros.h                     |   6 ++
 include/tst_uid.h                             |  17 +++
 lib/tst_uid.c                                 | 100 ++++++++++++++++++
 testcases/kernel/syscalls/chmod/chmod05.c     |   7 +-
 testcases/kernel/syscalls/fchmod/fchmod05.c   |   7 +-
 testcases/kernel/syscalls/kill/kill05.c       |  23 ++--
 testcases/kernel/syscalls/mkdir/mkdir02.c     |  77 +++++---------
 testcases/kernel/syscalls/mkdir/mkdir04.c     |  30 ++----
 .../kernel/syscalls/setregid/setregid02.c     |  75 ++++++-------
 .../kernel/syscalls/setregid/setregid03.c     |  92 +++++++---------
 .../kernel/syscalls/setregid/setregid04.c     |  58 +++++-----
 11 files changed, 279 insertions(+), 213 deletions(-)
Signature · 1 line
2.33.0