Re: [PATCH v4 1/8] fs/acl: Add ACL_USER_OBJ permissions test
Cyril Hrubis <[email protected]>
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <[email protected]> |
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 [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp