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. > +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. Thank you so much for this! I will test this patch out ASAP and report how well it works. Best, --arw -- A. Wilcox (awilfox) Project Lead, Adélie Linux https://www.adelielinux.org