From: Avinesh Kumar <akumar@suse.de>
To: rpalethorpe@suse.de
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] setfsuid02: Rewrite using new LTP API
Date: Thu, 27 Oct 2022 13:17:48 +0530 [thread overview]
Message-ID: <5881925.lOV4Wx5bFT@localhost> (raw)
In-Reply-To: <87bkq0xqas.fsf@suse.de>
Hi Richie,
On Tuesday, October 25, 2022 1:29:36 PM IST Richard Palethorpe wrote:
> hello,
>
> Avinesh Kumar <akumar@suse.de> writes:
>
> > Rewrite using new API and add setfsuid(-1) call to verify that preceding
> > setfsuid() call with an invalid fsuid had failed.
>
> Merged with a couple of changes.
>
> > + TST_EXP_VAL_SILENT(setfsuid(invalid_uid), current_uid);
>
> Need to use the SETFSUID macro for 16-bit (as pvorel said).
>
> > + TST_EXP_VAL(setfsuid(-1), current_uid,
> > + "setfsuid(invalid_fsuid) test for
> > expected failure:");
>
> Substituted invalid_uid for -1 because -1 (UINT_MAX or USHORT_MAX) could
> be a valid UID AFAICT.
Thank you for review.
I used -1 as suggested in the manpage of setfsuid, which says setfsuid(-1) should
always fail. I have used the same for setfsgid test also.
Regards,
Avinesh
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2022-10-27 7:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 7:17 [LTP] [PATCH] setfsuid02: Rewrite using new LTP API Avinesh Kumar
2022-10-25 7:59 ` Richard Palethorpe
2022-10-27 7:47 ` Avinesh Kumar [this message]
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=5881925.lOV4Wx5bFT@localhost \
--to=akumar@suse.de \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@suse.de \
/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