From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: <shadow.h> function: fgetspent_r
Date: Sun, 20 Jan 2019 19:50:53 -0500 [thread overview]
Message-ID: <20190121005053.GQ23599@brightrain.aerifal.cx> (raw)
In-Reply-To: <0ab4cefc-b617-2a1d-aa6f-5aed2257a0f7@adelielinux.org>
On Sun, Jan 20, 2019 at 03:12:59PM -0600, A. Wilcox wrote:
> On 01/20/19 09:41, Markus Wichmann wrote:
> > Hi all,
> >
> > so, I wrote a version of fgetspent_r() now. I based it on fgetspent().
> > For style, I adopted the Linux style -- might need to refactor that.
> > Returning EILSEQ on format error is a hack, but I found no better code.
> > As I said, glibc loops on error, but we do that for no other src/passwd
> > function, so we should either not start now or add that feature to every
> > other function.
> >
> > One thing I noticed: If AccountService requires this interfaces, is it
> > possible that it doesn't support TCB shadow files?
> >
> > Ciao,
> > Markus
>
>
> It doesn't support TCB shadow files.
How so? The whole point of this interface is that it reads from a
FILE* provided by the caller, not the system shadow store. The usage
case is writing utilities that access and modify the underlying files
(or possibly tempfile copies thereof).
> > +int fgetspent_r(FILE *f, struct spwd* sp, char *line, size_t size,
> struct spwd **spret)
>
> Tiny style nit: I think the * is meant to be kept with 'sp', not 'spwd',
> in the second argument.
Yes.
Rich
next prev parent reply other threads:[~2019-01-21 0:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 19:21 A. Wilcox
2019-01-16 20:50 ` Rich Felker
2019-01-16 21:38 ` A. Wilcox
2019-01-16 23:44 ` Rich Felker
2019-01-17 5:31 ` Markus Wichmann
2019-01-17 15:38 ` Rich Felker
2019-01-18 20:37 ` Markus Wichmann
2019-01-20 15:41 ` Markus Wichmann
2019-01-20 21:12 ` A. Wilcox
2019-01-21 0:50 ` Rich Felker [this message]
2019-01-20 22:02 ` A. Wilcox
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=20190121005053.GQ23599@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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).