[Freeipa-devel] [PATCH] added response type PAM_ENV_ITEM and integrated response data
Simo Sorce
ssorce at redhat.com
Fri Mar 20 14:52:00 UTC 2009
On Thu, 2009-03-19 at 17:12 +0100, Sumit Bose wrote:
> Simo Sorce schrieb:
> > On Thu, 2009-03-19 at 14:55 +0100, Sumit Bose wrote:
> >> + ret = putenv((char *) &buf[p]);
> >> + if (ret == -1) {
> >> + D(("putenv failed.\n"));
> >> + break;
> >> + }
> >
> > Nack here, putenv uses the string passed in, so you have to, at
> least
> > strdup() the string before using it, and not free it, or you will
> end up
> > corrupting the environment.
> >
> > Simo.
> >
> new version attached
Ack.
--
Simo Sorce * Red Hat, Inc * New York
More information about the Freeipa-devel
mailing list