[Samba] build my own server-side-copy client code using samba4 source code
Shuo Dong
shuodo at gmail.com
Mon Oct 26 17:24:24 UTC 2015
Hello all:
I am working on implementing server-side-copy client code.
When I checked samba4 source code, I saw that smbtorture has some sort of
function that does server-side-copy client function.
So, I followed the way that smbtorture does, and implemented my own
server-side-copy client code (let's call it cifs_cp).
Basically, my cifs_cp code, calls the functions in the files of:
source4/libcli/smb2/
.c files in source4/libcli/smb2/ has all the functions that I need to do
connection, open/close file, get info, ioctl.
However, .c files in source4/libcli/smb2 itself, is relying on many other
libs (talloc, tevent, cmdline, auth and so on).
The solution that I have is to modify one of the wscipt_build so that it
added my cifs_cp rules.
And I did:
waf configure --nonshared-binary=cifs_cp
waf build --targets=cifs_cp
So, this only build my cifs_cp and it dependency libs.
The issue I have now is the my cifs_cp is too large (10 MB), and it is
using to much functions or .c files that not necessary.
How can I reduce the dependency files/libs that my cifs_cp is relying on.
And what I need is just the functions under source4/libcli/smb2 to do
connect, open/close, getinto, ioctl. And maybe some basic authentication
functions as well.
Thanks,
More information about the samba
mailing list