CVS update: samba/source/rpc_server
Andrew Bartlett
abartlet at pcug.org.au
Sat Nov 24 12:03:43 EST 2001
Jeremy Allison wrote:
>
> On Fri, Nov 23, 2001 at 04:36:38PM -0800, abartlet at samba.org wrote:
>
> > Kill off that crazy copy_sam_passwd(). You simply can't do that if the
> > structre contains pointers (well not if you intend of free those pointers
> > at some stage)
>
> Andrew, if this is needed at some future stage, look at the way
> security descriptors are handled. Each struct within the master
> structure is deepcopied (a C++ term, a language I love and tridge
> hates :-) to ensure safety for this kind of thing.
>
> Cheers,
>
> Jeremy.
Yep, that is certainly the proper way to do this.
The only problem is that the copy_...() function needs to be kept
up-to-date with changes in the structure - and this doesn't always
happen :-(. Then again, we probably have the same problem with the
free...() functions in any case... Fortunately we have insure. :-)
Thanks,
Andrew Bartlett
--
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
More information about the samba-cvs
mailing list