[LTP] [PATCH v4 1/8] fs/acl: Add ACL_USER_OBJ permissions test
Cyril Hrubis
chrubis@suse.cz
Fri Jun 5 13:12:29 CEST 2026
Hi!
> This is an excellent suggestion. This will avoid userspace
> username-to-UID lookups
> and libacl dependency. It simplifies tests while maintaining full
> coverage of kernel
> ACL functionality.
>
> The existing create_file_as() helper already demonstrates the
> fork+setuid pattern
> needed for testing with arbitrary UIDs.
>
> The logic can be:
> - Use setxattr(path, "system.posix_acl_access", buf, size, 0) to set
> ACLs directly
> - Build xattr buffers with raw UID/GID values (no username lookups needed)
> - Fork child processes that call setuid(uid) + setgid(gid) to match ACL
> entries
> - Test file access in child to validate kernel ACL enforcement
>
> Let me know if this approach is acceptable.
Sounds good.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list