revision 10119 removed cli_nt_session_open (trunk/source/rpc_client/cli_pipe.c). The one I bumped into was python/py_common.c. $ python Python 2.3.3 (#1, Feb 5 2005, 19:13:46) [GCC 3.3.3 (SuSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from samba import winbind Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: /usr/lib/python2.3/lib-dynload/samba/winbind.so: undefined symbol: cli_nt_session_open $ grep -R cli_nt_session_open samba-3.0.21c/source/ samba-3.0.21c/source/libsmb/libsmbclient.c: DEBUG(1, ("cli_nt_session_open fail!\n")); samba-3.0.21c/source/python/py_common.c: if (!cli_nt_session_open(cli, pipe_idx)) { samba-3.0.21c/source/rpc_client/cli_lsarpc.c: if (!cli_nt_session_open(&cli, PI_LSARPC)) { samba-3.0.21c/source/rpcclient/cmd_reg.c: res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; samba-3.0.21c/source/rpcclient/cmd_reg.c: res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; samba-3.0.21c/source/rpcclient/cmd_reg.c: res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; samba-3.0.21c/source/rpcclient/cmd_reg.c: res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; samba-3.0.21c/source/rpcclient/cmd_reg.c: res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; samba-3.0.21c/source/rpcclient/cmd_reg.c: res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; samba-3.0.21c/source/rpcclient/cmd_reg.c: res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; samba-3.0.21c/source/rpcclient/cmd_reg.c: res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; samba-3.0.21c/source/rpcclient/cmd_wkssvc.c: res = res ? cli_nt_session_open(smb_cli, PI_WKSSVC) : False; Thanks, ~ Daniel
Created attachment 1765 [details] Is this right? This at least fixes the undefined symbol error, but did I do the new cli_rpc_ and rpccli_ stuff correctly? Thanks, ~ Daniel
Created attachment 1773 [details] This time with additional rpc client pipe python fixes Missed tpot's change revision 10799 for python stuff to build again. This patch should hopefully fix things between changesets 10799 and 10119 (obsoletes previous patch I attached). Also fixed a problem in spoolss_hnd_enumprinterdataex. Looks like its REGVAL_CTR must be TALLOC'ed (regval_ctr_addvalue treats ctr as a ctx). At any rate, after this patch is applied to 3.0.21c, this kind of stuff is working again: [daniel@localhost source]$ python Python 2.3.4 (#1, Feb 2 2005, 12:11:53) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from samba import printerdata >>> pdex=printerdata.printerdata_ex('\\\\print-serv3\\tc6-w-tech',{'domain':'*mydomain*','username':'*myuser*','password':'*mypass*'}) >>> pdex.keys() ['PrinterDriverData', 'DsSpooler', 'DsDriver', 'DsUser'] >>> pdex['PrinterDriverData'].keys() ['PrinterDataSize', 'FeatureKeyword', 'LpdPrinterDontDetect', 'Forms?', 'TrayFormTable', 'InitDriverVersion', 'LpdPrinterPassThrough', 'FreeMem', 'PrinterData', 'Model', 'FeatureKeywordSize'] >>> pdex['PrinterDriverData']['Model'] 'I\x00B\x00M\x00 \x00N\x00e\x00t\x00w\x00o\x00r\x00k\x00 \x00P\x00r\x00i\x00n\x00t\x00e\x00r\x00 \x002\x004\x00 \x00(\x00P\x00C\x00L\x00)\x00\x00\x00' >>> print pdex['PrinterDriverData']['Model'] IBM Network Printer 24 (PCL) Thanks!
*** Bug 3466 has been marked as a duplicate of this bug. ***
Parts of the attached patch were applied. I didn't apply all the cli_state replacements. Just allow open_pipe_creds to return cli_state. Modules now import and work fine for me.
Except I believe werror should have some value assigned before using in PyErr_SetObject, just in case the TALLOC_ZERO_P(hnd->mem_ctx, REGVAL_CTR) were to fail. Probably NT_STATUS_NO_MEMORY (this problem existed in the patch I had attached). ~ Daniel
open_pipe_creds can continue to return the cli_state*, but the rpccli_XXX() functions need to be passed cli->pipe_list and not simply the cli*.
Fixed in trunk and SAMBA_3_0 branches. See r 15385 and 15386.