[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: patch for pam_unix



On Tue, Dec 28, 1999 at 10:35:26AM -0600, Steve Langasek wrote:
> On Tue, 28 Dec 1999, Nalin Dahyabhai wrote:
> 
> > Hi, I found a problem with the new pam_unix's handling of the "unixlike"
> > argument that appears to break it.  I've attached a patch.
> 
> This patch depends on an int and a pointer being the same size, which is a
> non-portable assumption.
> 
> The correct solution is to malloc() the space for the return value, and pass
> its address to pam_set_data().  The pam_sm_setcred() function is then
> responsible for freeing the data when it's done with it.

I suspected as much, but I'm fairly sure it's safe to store an int in a
pointer and (knowing that it was an int to start with) to retrieve it
as well.  Allocating and freeing memory would have added more complexity
to it than I wanted to.

I was also mistaken about the argument that's supposed to switch this
behavior on.  It's actually "likeauth".

> I'll pull together a patch later today that does this.

Thanks.

Nalin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []