[OpenAFS] OpenAFS on OpenBSD-current (ELF)

Brent Graveland brent@graveland.net
Mon, 23 Jun 2003 12:42:16 -0400


Derrick J Brashear wrote:
> On Mon, 23 Jun 2003, Brent Graveland wrote:
>
>>I didn't like the idea either, but this is equivilent, no?  You don't
> 
> No. You don't add a symbol to the kernel for anyone else to get at.
>
>>gain any of the benifits of the 'n' functions if you just hardcode the
>>lengths. The only benifit to this I see is that you don't have to
>>recompile the kernel. strcat is also an issue, would you not need
>>
>>#define strcat(s1, s2)	strncat((s1), (s2), 65535)
>>
>>to make this work as well?
>>
>>I don't suppose there are any plans on getting rid of strcpy and strcat
>>in afs?  If I manage the time (going to be moving soon) I may start
>>whacking away at these functions in afs and submitting patches. I just
>>seems "wrong" to alias str{cat,cpy} to the 'n' functions.
> 
> Not a big deal, but make sure you test the stuff. At some point IBM did
> something to the kaserver which broke it for some uses due to a botched
> str->strn patch.

My point exactly - I can't help but think that this is a botched 
approach in the first place. Just because it has been done in the past, 
I still can't happily agree to follow.

Some may argue the possibility of correctly using strcat/cpy (see 
openbsd's effort to completly remove them), but I just see overwritten 
and truncated memory with aliases like this.

-- 
Brent Graveland
brent@graveland.net