Mikhail Teterin <[EMAIL PROTECTED]> writes:
> The pam_setenv and pam_putenv are backwards, IMHO. putenv should be
> using setenv -- not the other way around. Currently, the setenv takes
> NAME and VALUE separately, mallocs a new buffer, sprintfs %s=%s into it,
> sends the buffer to putenv, which re-parses it and frees it.
>
> I think, pam_setenv should be doing the actual "dirty work", with putenv
> being a wrapper. This would save some cycles (and, possibly, syscalls
> -- from malloc), but, of course, it would not be very significant with
> todays hardware, yada, yada...

No, the storage format for environment variables is part of the API
and is intended for compatibility with libc.  Doing it your way would
be backward.

> Would you have any other comments about my original post -- why is
> pam_setenv causing the segfault somewhere, and is there anything wrong
> with my patch? Thanks!

I don't know why it crashes, and I haven't looked at the patch.  I
probably won't have time for it until early next year.

In the meantime, merry Christmas and a happy New Year :)

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to