composite rpc call
Stefan (metze) Metzmacher
metze at samba.org
Tue Feb 22 11:31:18 GMT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rafal Szczesniak schrieb:
| On Tue, Feb 22, 2005 at 11:55:27AM +0100, Rafal Szczesniak wrote:
|
|>On Tue, Feb 22, 2005 at 02:00:10PM +1100, Andrew Tridgell wrote:
|>
|>>Mimir,
|>>
|>> > Could you please take a look at source/libnet/userinfo.c file and tell
|>> > me what is coded incorrectly. I haven't tested it yet, so almost
|>> > certainly something is broken, but you surely have some opinion on
|>> > that code just by looking.
|>>
|>>I hope you don't mind me replying publicly. I thought that others
|>>might find the answers interesting.
|>
|>Of course. It has some educational valor for potential samba hackers.
|
|
| ugh... s/valor/value/
|
|
|>>(3)
|>>Lines like this:
|>> memcpy((void*)r.in.user_handle, (void*)rep->out.user_handle, sizeof(struct policy_handle));
|>>should be replaced with this:
|>> r.in.user_handle = rep->out.user_handle;
|
|
| One more question: Is there a function I could use to copy a policy
| handle structure ? In case I don't want to get the pointer, I need to
| copy it and I couldn't find such a function. Needs to be coded ? :)
why do you need a function to copy a fixed size struct?
struct policy_handle h1,h2,*p1 = h1, *p2 = h2;
if you want to copy with using the pointers, just use
*p2 = *p1;
or without the pointers
h2 = h1;
or
*p2 = h1;
or h2 = *p2;
...
- --
metze
Stefan Metzmacher <metze at samba.org> www.samba.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCGxgGm70gjA5TCD8RAvIZAKC2FjqEaGAjbEBM2PTLJUkenWAf6QCfapgr
Gf9JTCvC01P7sGaPwSwB6/o=
=h/G1
-----END PGP SIGNATURE-----
More information about the samba-technical
mailing list