From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: Li Wang <liwang@redhat.com>,
ltp@lists.linux.it, Mimi Zohar <zohar@linux.ibm.com>,
linux-integrity@vger.kernel.org, selinux@vger.kernel.org,
Jan Stancek <jstancek@redhat.com>
Subject: Re: [PATCH v4 1/4] shell: Add tst_runas.c helper
Date: Wed, 17 Dec 2025 16:57:44 +0100 [thread overview]
Message-ID: <20251217155744.GA75994@pevik> (raw)
In-Reply-To: <aULIhXrMA4dgTwGg@yuki.lan>
> Jo!
:)
> > > + char *uid_env = getenv(TST_TO_STR_(LTP_USR_UID));
> > > + char *gid_env = getenv(TST_TO_STR_(LTP_USR_GID));
> > So far this format is correct.
> > But as I pointed in the last thread, here using TST_TO_STR_ might be a
> > potential
I'm sorry to overlook this.
> > issue if someday we make changes on that to become two-level macro.
> > It likely to interpreted as getenv("65534");
> > So on the safe side, I’d still recommend writing it explicitly:
> > char *uid_env = getenv("LTP_USR_UID");
> > char *gid_env = getenv("LTP_USR_GID");
> +1
The reason I used the macro is that I prefer to use constants instead of a plain
text (also danger of typo). But changed to your proposal and merged whole
patchset.
Thanks all for your review.
Kind regards,
Petr
> > The rest whole patch set looks good:
> > Reviewed-by: Li Wang <liwang@redhat.com>
> For the rest also from me:
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
next prev parent reply other threads:[~2025-12-17 15:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 18:55 [PATCH v4 0/4] tst_runas.c, ima_{conditionals, measurements}.sh enhancements Petr Vorel
2025-12-09 18:55 ` [PATCH v4 1/4] shell: Add tst_runas.c helper Petr Vorel
[not found] ` <CAEemH2ej8-e_S4LgcKKkt08dUhyF0TreWp-QvXzQ1QGQYbywJg@mail.gmail.com>
2025-12-17 15:13 ` Cyril Hrubis
2025-12-17 15:57 ` Petr Vorel [this message]
2025-12-09 18:55 ` [PATCH v4 2/4] tst_test.sh: Add TST_USR_{G,U}ID variables Petr Vorel
2025-12-17 15:47 ` Cyril Hrubis
2025-12-18 11:47 ` Petr Vorel
2025-12-09 18:55 ` [PATCH v4 3/4] ima_{conditionals,measurements}.sh: Use tst_runas Petr Vorel
2025-12-17 16:05 ` Cyril Hrubis
2025-12-09 18:55 ` [PATCH v4 4/4] ima_conditionals.sh: Split test by request Petr Vorel
2025-12-11 10:37 ` [LTP] [PATCH v4 0/4] tst_runas.c, ima_{conditionals, measurements}.sh enhancements Andrea Cervesato
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=20251217155744.GA75994@pevik \
--to=pvorel@suse.cz \
--cc=chrubis@suse.cz \
--cc=jstancek@redhat.com \
--cc=linux-integrity@vger.kernel.org \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
--cc=selinux@vger.kernel.org \
--cc=zohar@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;
as well as URLs for NNTP newsgroup(s).