Hi Sumit,
thank you for responding.
Sumit Bose <sbose(a)redhat.com> (Mo 01 Mär 2021 11:33:51 CET):
I guess you are right that setpwent() should make sure to rewind to
the
beginning.
Would you mind to open a ticket at
https://github.com/SSSD/sssd/issues/new about this?
Sure.
I'm about to perform some more tests, and then I'll open an issue there.
About your patch, I think it would be better to fix this in the NSS
responder of SSSD like e.g. (not tested)
diff --git a/src/responder/nss/nss_cmd.c b/src/responder/nss/nss_cmd.c
…
struct nss_ctx *nss_ctx;
+ struct nss_state_ctx *state_ctx;
+
+ state_ctx = talloc_get_type(cli_ctx->state_ctx, struct nss_state_ctx);
+ state_ctx->pwent->domain = 0;
+ state_ctx->pwent->result = 0;
nss_ctx = talloc_get_type(cli_ctx->rctx->pvt_ctx, struct nss_ctx);
Yes, after digging a bit more over the weekend, I had the same idea,
I'm testing it right now. Same for the other setXYent() calls, that came
into my mind as well.
Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
gnupg encrypted messages are welcome --------------- key ID: F69376CE -