SIGBUS Panic in smbd

Luke Kenneth Casson Leighton lkcl at switchboard.net
Mon Jun 28 20:28:14 GMT 1999


michael,

we have been intending to have a structure that can contain "unix" info in
parallel with "nt" info for over a year.

if you would like to replace all instances where "char* unix_name" and
"uid_t unix_id" and "char* nt_name" and "SID *nt_sid" are used, with a
single structure, please do so.

if you wanted to wait for the "MfH(tm)", that might be a better idea.

luke

On Tue, 29 Jun 1999, Michael Stockman wrote:

> Hello,
> 
> I do apologize for the following, but it is motivated.
> username.c is crap in regards to _Get_Pwnam and the passwd struct!
> 
> The reason for the crashes the this thread started with is that ret->pw_passwd is __most__ likely a pointer to a static area and calling free on that can cause a crash.
> 
> After calling free in _Get_Pwnam: ret->pw_passwd = strdup(...); is likely to cause memory bloat and may cause getpwnam to behave unpredictably, at least on linux systems.
> 
> This is due to complete confusion in the code as to what is static memory and what is dynamically allocated. I propose that ret as well as the pointers in ret are pointers to static memory. Thus it would be forbidden to free the pointers, reassign the pointers and change their contents while the length of the pointed to memory is unknown. Basically, we need a structure of our own if that is really what we want to do.
> 
> Should anyone in charge like me to try to cure this, please send me an e-mail. Regardless, it will need to be fixed.
> 
> Best regards
>   Michael Stockman
>   pgmtekn-micke at algonet.se
> 
> 
> 

<a href="mailto:lkcl at samba.org"   > Luke Kenneth Casson Leighton    </a>
<a href="http://www.cb1.com/~lkcl"> Samba and Network Development   </a>
<a href="http://samba.org"        > Samba Web site                  </a>
<a href="http://www.iss.net"      > Internet Security Systems, Inc. </a>

Direct Dial: (678) 443-6183.  ISS Front Desk: (678) 443-6000.



More information about the samba-technical mailing list