Linux Test Project
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Sachin Sant <sachinp@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 1/8] fs/acl: Add ACL_USER_OBJ permissions test
Date: Fri, 5 Jun 2026 13:12:29 +0200	[thread overview]
Message-ID: <aiKvHTvjmBjVD5V3@yuki.lan> (raw)
In-Reply-To: <f280507d-41d9-4496-a90d-49ecc7fff8dd@linux.ibm.com>

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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-06-05 11:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04  6:54 [LTP] [PATCH v4 0/8] Convert shell-based ACL test (tacl_xattr.sh) to C Sachin Sant
2026-06-04  6:54 ` [LTP] [PATCH v4 1/8] fs/acl: Add ACL_USER_OBJ permissions test Sachin Sant
2026-06-04  7:20   ` [LTP] " linuxtestproject.agent
2026-06-04 10:31   ` [LTP] [PATCH v4 1/8] " Cyril Hrubis
2026-06-05  6:19     ` Sachin Sant
2026-06-05 11:12       ` Cyril Hrubis [this message]
2026-06-05  9:31   ` [LTP] " linuxtestproject.agent
2026-06-04  6:54 ` [LTP] [PATCH v2 2/8] fs/acl: Add ACL mask interaction tests Sachin Sant
2026-06-04  6:54 ` [LTP] [PATCH v2 3/8] fs/acl: Add ACL_OTHER permissions test Sachin Sant
2026-06-04  6:54 ` [LTP] [PATCH v3 4/8] fs/acl: Add default ACL inheritance test Sachin Sant
2026-06-04  6:54 ` [LTP] [PATCH v2 5/8] fs/acl: Add chmod/chown ACL interaction tests Sachin Sant
2026-06-04  6:54 ` [LTP] [PATCH v4 6/8] fs/acl: Add symlink ACL operations test Sachin Sant
2026-06-04  6:54 ` [LTP] [PATCH v3 7/8] fs/acl: Add extended attributes test Sachin Sant
2026-06-04  6:54 ` [LTP] [PATCH v1 8/8] fs/acl: Remove old shell-based ACL test Sachin Sant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiKvHTvjmBjVD5V3@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=sachinp@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox