Samba - Coding Question

Joseph Turner joeman at mercury.apana.org.au
Sun Apr 8 17:02:52 GMT 2001


RE: Samba 2.0.7 development.

Hello, I have a question regarding the use of strncpy. I've tried using
this but the compiler complains.
So I looked through the  include.h and has aline in there to stop the
use of strcpy, but not strncpy.
So I'm quite confused as to how I'm unable to use this function even
though I can't see any definitions
to stop the use of it.  And since I pass on the 'number' of characters I
thought it would be an allowable (safe)
function.

I tried useing safe_strcat but it doesn't do the job. I'm pretty sure
this is a simple and commonly
encounted problem. What do you guys suggest one use instead of this
function strncat and other
traditionl functions?

Thanks!

BTW, I'm adding 'trash-can' support to samba so that files aren't
deleted when users delete them; they
are moved.

Joe





More information about the samba-technical mailing list