From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] What is wrong with this program ?
Date: Tue, 28 Apr 2020 13:49:26 +0200 [thread overview]
Message-ID: <20200428114926.GA14333@yuki.lan> (raw)
In-Reply-To: <20200428100254.3oiu3weon3uyyvkl@vireshk-i7>
Hi!
> > > It fails with:
> > >
> > > safe_macros.c:230: BROK: foo.c:9: open(file,66,01) failed: EACCES (13)
> > >
> > > if run as a normal user and passes with sudo.
> >
> > I guess that you forget to pass the mode argument to the first
> > SAFE_OPEN() and hence the second one fails because the garbage passed to
> > mode prevents normal users from opening the file.
>
> Hmm, mode seems to be missing from a lot of syscall tests, which means that if
> they are run in a loop (with the cmdline way you mentioned earlier), then they
> will all fail.
If there is open() with O_CREAT without mode it's a bug.
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2020-04-28 11:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 9:47 [LTP] What is wrong with this program ? Viresh Kumar
2020-04-28 9:52 ` Cyril Hrubis
2020-04-28 10:02 ` Viresh Kumar
2020-04-28 10:09 ` Martin Doucha
2020-04-28 11:49 ` Cyril Hrubis [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=20200428114926.GA14333@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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