summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/config.mk612
-rwxr-xr-xsource4/librpc/idl-deps.pl22
-rw-r--r--source4/librpc/idl/audiosrv.idl30
-rw-r--r--source4/librpc/idl/browser.idl24
-rw-r--r--source4/librpc/idl/dcerpc.idl1
-rw-r--r--source4/librpc/idl/dfs.idl14
-rw-r--r--source4/librpc/idl/drsuapi.idl24
-rw-r--r--source4/librpc/idl/dsbackup.idl34
-rw-r--r--source4/librpc/idl/dssetup.idl20
-rw-r--r--source4/librpc/idl/efs.idl14
-rw-r--r--source4/librpc/idl/epmapper.idl2
-rw-r--r--source4/librpc/idl/eventlog.idl36
-rw-r--r--source4/librpc/idl/frsapi.idl12
-rw-r--r--source4/librpc/idl/frsrpc.idl20
-rw-r--r--source4/librpc/idl/lsa.idl66
-rw-r--r--source4/librpc/idl/msgsvc.idl10
-rw-r--r--source4/librpc/idl/nbt.idl342
-rw-r--r--source4/librpc/idl/netlogon.idl14
-rw-r--r--source4/librpc/idl/ntsvcs.idl130
-rw-r--r--source4/librpc/idl/policyagent.idl2
-rw-r--r--source4/librpc/idl/security.idl3
-rw-r--r--source4/librpc/idl/spoolss.idl102
-rw-r--r--source4/librpc/idl/srvsvc.idl24
-rw-r--r--source4/librpc/idl/svcctl.idl14
-rw-r--r--source4/librpc/idl/w32time.idl6
-rw-r--r--source4/librpc/idl/winreg.idl8
-rw-r--r--source4/librpc/idl/xattr.idl12
-rw-r--r--source4/librpc/ndr/libndr.h4
-rw-r--r--source4/librpc/ndr/ndr_basic.c4
-rw-r--r--source4/librpc/ndr/ndr_sec_helper.c51
-rw-r--r--source4/librpc/rpc/binding.c724
-rw-r--r--source4/librpc/rpc/dcerpc.c15
-rw-r--r--source4/librpc/rpc/dcerpc.py4
-rw-r--r--source4/librpc/rpc/dcerpc_connect.c15
-rw-r--r--source4/librpc/rpc/dcerpc_smb2.c16
-rw-r--r--source4/librpc/rpc/dcerpc_util.c710
-rw-r--r--source4/librpc/rpc/dcerpc_wrap.c65
-rwxr-xr-xsource4/librpc/scripts/build_idl.sh38
38 files changed, 1693 insertions, 1551 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index 23ad66274a..c7cbf27667 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -1,28 +1,30 @@
+ndrsrcdir = $(librpcsrcdir)/ndr
+gen_ndrsrcdir = $(librpcsrcdir)/gen_ndr
+dcerpcsrcdir = $(librpcsrcdir)/rpc
+
################################################
# Start SUBSYSTEM LIBNDR
[LIBRARY::LIBNDR]
-VERSION = 0.0.1
-SO_VERSION = 0
-PC_FILE = ndr.pc
-PRIVATE_PROTO_HEADER = ndr/libndr_proto.h
-OBJ_FILES = \
- ndr/ndr.o \
- ndr/ndr_basic.o \
- ndr/ndr_string.o \
- ndr/uuid.o
PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBTALLOC LIBSAMBA-UTIL CHARSET \
LIBSAMBA-HOSTCONFIG
+
+LIBNDR_OBJ_FILES = $(addprefix $(ndrsrcdir)/, ndr.o ndr_basic.o ndr_string.o uuid.o)
+
+$(eval $(call proto_header_template,$(ndrsrcdir)/libndr_proto.h,$(LIBNDR_OBJ_FILES:.o=.c)))
+
+PC_FILES += $(librpcsrcdir)/ndr.pc
+LIBNDR_VERSION = 0.0.1
+LIBNDR_SOVERSION = 0
+
# End SUBSYSTEM LIBNDR
################################################
-PUBLIC_HEADERS += librpc/ndr/libndr.h
+PUBLIC_HEADERS += $(ndrsrcdir)/libndr.h
#################################
# Start BINARY ndrdump
[BINARY::ndrdump]
INSTALLDIR = BINDIR
-OBJ_FILES = \
- tools/ndrdump.o
PRIVATE_DEPENDENCIES = \
LIBSAMBA-HOSTCONFIG \
LIBSAMBA-UTIL \
@@ -34,274 +36,333 @@ PRIVATE_DEPENDENCIES = \
# End BINARY ndrdump
#################################
-MANPAGES += librpc/tools/ndrdump.1
+ndrdump_OBJ_FILES = $(librpcsrcdir)/tools/ndrdump.o
+
+MANPAGES += $(librpcsrcdir)/tools/ndrdump.1
################################################
# Start SUBSYSTEM NDR_COMPRESSION
[SUBSYSTEM::NDR_COMPRESSION]
-PRIVATE_PROTO_HEADER = ndr/ndr_compression.h
-OBJ_FILES = \
- ndr/ndr_compression.o
PUBLIC_DEPENDENCIES = LIBCOMPRESSION LIBSAMBA-ERRORS LIBNDR
# End SUBSYSTEM NDR_COMPRESSION
################################################
+NDR_COMPRESSION_OBJ_FILES = $(ndrsrcdir)/ndr_compression.o
+
+$(eval $(call proto_header_template,$(ndrsrcdir)/ndr_compression.h,$(NDR_COMPRESSION_OBJ_FILES:.o=.c)))
+
[SUBSYSTEM::NDR_SECURITY]
-OBJ_FILES = gen_ndr/ndr_security.o ndr/ndr_sec_helper.o
PUBLIC_DEPENDENCIES = NDR_MISC LIBSECURITY
-PUBLIC_HEADERS += librpc/gen_ndr/security.h
+NDR_SECURITY_OBJ_FILES = $(gen_ndrsrcdir)/ndr_security.o $(ndrsrcdir)/ndr_sec_helper.o
+
+PUBLIC_HEADERS += $(gen_ndrsrcdir)/security.h
[SUBSYSTEM::NDR_AUDIOSRV]
-OBJ_FILES = gen_ndr/ndr_audiosrv.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_AUDIOSRV_OBJ_FILES = $(gen_ndrsrcdir)/ndr_audiosrv.o
+
[SUBSYSTEM::NDR_DNSSERVER]
-OBJ_FILES = gen_ndr/ndr_dnsserver.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_DNSSERVER_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dnsserver.o
+
[SUBSYSTEM::NDR_WINSTATION]
-OBJ_FILES = gen_ndr/ndr_winstation.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_WINSTATION_OBJ_FILES = $(gen_ndrsrcdir)/ndr_winstation.o
+
[SUBSYSTEM::NDR_ECHO]
-OBJ_FILES = gen_ndr/ndr_echo.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_ECHO_OBJ_FILES = $(gen_ndrsrcdir)/ndr_echo.o
+
[SUBSYSTEM::NDR_IRPC]
-OBJ_FILES = gen_ndr/ndr_irpc.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY NDR_NBT
+NDR_IRPC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_irpc.o
+
[SUBSYSTEM::NDR_DSBACKUP]
-OBJ_FILES = gen_ndr/ndr_dsbackup.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_DSBACKUP_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dsbackup.o
+
[SUBSYSTEM::NDR_EFS]
-OBJ_FILES = gen_ndr/ndr_efs.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY
+NDR_EFS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_efs.o
+
[SUBSYSTEM::NDR_MISC]
-OBJ_FILES = gen_ndr/ndr_misc.o ndr/ndr_misc.o
PUBLIC_DEPENDENCIES = LIBNDR
-PUBLIC_HEADERS += librpc/gen_ndr/misc.h librpc/gen_ndr/ndr_misc.h
+NDR_MISC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_misc.o $(ndrsrcdir)/ndr_misc.o
+
+PUBLIC_HEADERS += $(gen_ndrsrcdir)/misc.h $(gen_ndrsrcdir)/ndr_misc.h
[SUBSYSTEM::NDR_ROT]
-OBJ_FILES = gen_ndr/ndr_rot.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_ORPC
+NDR_ROT_OBJ_FILES = $(gen_ndrsrcdir)/ndr_rot.o
+
[SUBSYSTEM::NDR_LSA]
-OBJ_FILES = gen_ndr/ndr_lsa.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY
-PUBLIC_HEADERS += librpc/gen_ndr/lsa.h
+NDR_LSA_OBJ_FILES = $(gen_ndrsrcdir)/ndr_lsa.o
+
+PUBLIC_HEADERS += $(gen_ndrsrcdir)/lsa.h
[SUBSYSTEM::NDR_DFS]
-OBJ_FILES = gen_ndr/ndr_dfs.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC
+NDR_DFS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dfs.o
+
[SUBSYSTEM::NDR_FRSRPC]
-OBJ_FILES = gen_ndr/ndr_frsrpc.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_FRSRPC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_frsrpc.o
+
[SUBSYSTEM::NDR_FRSAPI]
-OBJ_FILES = gen_ndr/ndr_frsapi.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_FRSAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_frsapi.o
+
[SUBSYSTEM::NDR_DRSUAPI]
-OBJ_FILES = gen_ndr/ndr_drsuapi.o ndr/ndr_drsuapi.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_COMPRESSION NDR_SECURITY NDR_SAMR ASN1_UTIL
+NDR_DRSUAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsuapi.o $(ndrsrcdir)/ndr_drsuapi.o
+
[SUBSYSTEM::NDR_DRSBLOBS]
-OBJ_FILES = gen_ndr/ndr_drsblobs.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_DRSUAPI
+NDR_DRSBLOBS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsblobs.o
+
[SUBSYSTEM::NDR_SASL_HELPERS]
-OBJ_FILES = gen_ndr/ndr_sasl_helpers.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_SASL_HELPERS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_sasl_helpers.o
+
[SUBSYSTEM::NDR_POLICYAGENT]
-OBJ_FILES = gen_ndr/ndr_policyagent.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_POLICYAGENT_OBJ_FILES = $(gen_ndrsrcdir)/ndr_policyagent.o
+
[SUBSYSTEM::NDR_UNIXINFO]
-OBJ_FILES = gen_ndr/ndr_unixinfo.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY
+NDR_UNIXINFO_OBJ_FILES = $(gen_ndrsrcdir)/ndr_unixinfo.o
+
[SUBSYSTEM::NDR_SAMR]
-OBJ_FILES = gen_ndr/ndr_samr.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_LSA NDR_SECURITY
-PUBLIC_HEADERS += $(addprefix librpc/, gen_ndr/samr.h gen_ndr/ndr_samr.h gen_ndr/ndr_samr_c.h)
+NDR_SAMR_OBJ_FILES = $(gen_ndrsrcdir)/ndr_samr.o
+
+PUBLIC_HEADERS += $(addprefix $(librpcsrcdir)/, gen_ndr/samr.h gen_ndr/ndr_samr.h gen_ndr/ndr_samr_c.h)
[SUBSYSTEM::NDR_NFS4ACL]
-OBJ_FILES = gen_ndr/ndr_nfs4acl.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_SECURITY
+NDR_NFS4ACL_OBJ_FILES = $(gen_ndrsrcdir)/ndr_nfs4acl.o
+
[SUBSYSTEM::NDR_SPOOLSS]
-OBJ_FILES = gen_ndr/ndr_spoolss.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_SPOOLSS_BUF NDR_SECURITY
+NDR_SPOOLSS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_spoolss.o
+
[SUBSYSTEM::NDR_SPOOLSS_BUF]
-PRIVATE_PROTO_HEADER = ndr/ndr_spoolss_buf.h
-OBJ_FILES = ndr/ndr_spoolss_buf.o
+
+NDR_SPOOLSS_BUF_OBJ_FILES = $(ndrsrcdir)/ndr_spoolss_buf.o
+
+$(eval $(call proto_header_template,$(ndrsrcdir)/ndr_spoolss_buf.h,$(NDR_SPOOLSS_BUF_OBJ_FILES:.o=.c)))
[SUBSYSTEM::NDR_WKSSVC]
-OBJ_FILES = gen_ndr/ndr_wkssvc.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_SRVSVC NDR_MISC NDR_SECURITY
+NDR_WKSSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_wkssvc.o
+
[SUBSYSTEM::NDR_SRVSVC]
-OBJ_FILES = gen_ndr/ndr_srvsvc.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_SVCCTL NDR_SECURITY
+NDR_SRVSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_srvsvc.o
+
[SUBSYSTEM::NDR_SVCCTL]
-OBJ_FILES = gen_ndr/ndr_svcctl.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC
-PUBLIC_HEADERS += $(addprefix librpc/, gen_ndr/ndr_svcctl.h gen_ndr/svcctl.h)
+NDR_SVCCTL_OBJ_FILES = $(gen_ndrsrcdir)/ndr_svcctl.o
+
+PUBLIC_HEADERS += $(addprefix $(librpcsrcdir)/, gen_ndr/ndr_svcctl.h gen_ndr/svcctl.h)
[SUBSYSTEM::NDR_ATSVC]
-OBJ_FILES = gen_ndr/ndr_atsvc.o
PUBLIC_DEPENDENCIES = LIBNDR
-PUBLIC_HEADERS += $(addprefix librpc/, gen_ndr/atsvc.h gen_ndr/ndr_atsvc.h)
+NDR_ATSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_atsvc.o
+
+PUBLIC_HEADERS += $(addprefix $(librpcsrcdir)/, gen_ndr/atsvc.h gen_ndr/ndr_atsvc.h)
[SUBSYSTEM::NDR_EVENTLOG]
-OBJ_FILES = gen_ndr/ndr_eventlog.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_LSA
+NDR_EVENTLOG_OBJ_FILES = $(gen_ndrsrcdir)/ndr_eventlog.o
+
[SUBSYSTEM::NDR_EPMAPPER]
-OBJ_FILES = gen_ndr/ndr_epmapper.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC
+NDR_EPMAPPER_OBJ_FILES = $(gen_ndrsrcdir)/ndr_epmapper.o
+
[SUBSYSTEM::NDR_DBGIDL]
-OBJ_FILES = gen_ndr/ndr_dbgidl.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_DBGIDL_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dbgidl.o
+
[SUBSYSTEM::NDR_DSSETUP]
-OBJ_FILES = gen_ndr/ndr_dssetup.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC
+NDR_DSSETUP_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dssetup.o
+
[SUBSYSTEM::NDR_MSGSVC]
-OBJ_FILES = gen_ndr/ndr_msgsvc.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_MSGSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_msgsvc.o
+
[SUBSYSTEM::NDR_WINS]
-OBJ_FILES = gen_ndr/ndr_wins.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_WINS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_wins.o
+
[SUBSYSTEM::NDR_WINREG]
-OBJ_FILES = gen_ndr/ndr_winreg.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_INITSHUTDOWN NDR_SECURITY NDR_MISC
+NDR_WINREG_OBJ_FILES = $(gen_ndrsrcdir)/ndr_winreg.o
+
[SUBSYSTEM::NDR_INITSHUTDOWN]
-OBJ_FILES = gen_ndr/ndr_initshutdown.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_INITSHUTDOWN_OBJ_FILES = $(gen_ndrsrcdir)/ndr_initshutdown.o
+
[SUBSYSTEM::NDR_MGMT]
-OBJ_FILES = gen_ndr/ndr_mgmt.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_MGMT_OBJ_FILES = $(gen_ndrsrcdir)/ndr_mgmt.o
+
[SUBSYSTEM::NDR_PROTECTED_STORAGE]
-OBJ_FILES = gen_ndr/ndr_protected_storage.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_PROTECTED_STORAGE_OBJ_FILES = $(gen_ndrsrcdir)/ndr_protected_storage.o
+
[SUBSYSTEM::NDR_ORPC]
-OBJ_FILES = gen_ndr/ndr_orpc.o ndr/ndr_orpc.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_ORPC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_orpc.o $(ndrsrcdir)/ndr_orpc.o
+
[SUBSYSTEM::NDR_OXIDRESOLVER]
-OBJ_FILES = gen_ndr/ndr_oxidresolver.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_ORPC NDR_MISC
+NDR_OXIDRESOLVER_OBJ_FILES = $(gen_ndrsrcdir)/ndr_oxidresolver.o
+
[SUBSYSTEM::NDR_REMACT]
-OBJ_FILES = gen_ndr/ndr_remact.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_ORPC NDR_MISC
+NDR_REMACT_OBJ_FILES = $(gen_ndrsrcdir)/ndr_remact.o
+
[SUBSYSTEM::NDR_WZCSVC]
-OBJ_FILES = gen_ndr/ndr_wzcsvc.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_WZCSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_wzcsvc.o
+
[SUBSYSTEM::NDR_BROWSER]
-OBJ_FILES = gen_ndr/ndr_browser.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_BROWSER_OBJ_FILES = $(gen_ndrsrcdir)/ndr_browser.o
+
[SUBSYSTEM::NDR_W32TIME]
-OBJ_FILES = gen_ndr/ndr_w32time.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_W32TIME_OBJ_FILES = $(gen_ndrsrcdir)/ndr_w32time.o
+
[SUBSYSTEM::NDR_SCERPC]
-OBJ_FILES = gen_ndr/ndr_scerpc.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_SCERPC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_scerpc.o
+
[SUBSYSTEM::NDR_NTSVCS]
-OBJ_FILES = gen_ndr/ndr_ntsvcs.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_NTSVCS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_ntsvcs.o
+
[SUBSYSTEM::NDR_NETLOGON]
-OBJ_FILES = gen_ndr/ndr_netlogon.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_SAMR NDR_LSA NDR_SECURITY
-PUBLIC_HEADERS += $(addprefix librpc/, gen_ndr/netlogon.h)
+NDR_NETLOGON_OBJ_FILES = $(gen_ndrsrcdir)/ndr_netlogon.o
+
+PUBLIC_HEADERS += $(addprefix $(librpcsrcdir)/, gen_ndr/netlogon.h)
[SUBSYSTEM::NDR_TRKWKS]
-OBJ_FILES = gen_ndr/ndr_trkwks.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_TRKWKS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_trkwks.o
+
[SUBSYSTEM::NDR_KEYSVC]
-OBJ_FILES = gen_ndr/ndr_keysvc.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_KEYSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_keysvc.o
+
[SUBSYSTEM::NDR_KRB5PAC]
-OBJ_FILES = gen_ndr/ndr_krb5pac.o ndr/ndr_krb5pac.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_NETLOGON NDR_SECURITY
+NDR_KRB5PAC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_krb5pac.o $(ndrsrcdir)/ndr_krb5pac.o
+
[SUBSYSTEM::NDR_XATTR]
-OBJ_FILES = gen_ndr/ndr_xattr.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY
+NDR_XATTR_OBJ_FILES = $(gen_ndrsrcdir)/ndr_xattr.o
+
[SUBSYSTEM::NDR_OPENDB]
-OBJ_FILES = gen_ndr/ndr_opendb.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_OPENDB_OBJ_FILES = $(gen_ndrsrcdir)/ndr_opendb.o
+
[SUBSYSTEM::NDR_NOTIFY]
-OBJ_FILES = gen_ndr/ndr_notify.o
PUBLIC_DEPENDENCIES = LIBNDR
+NDR_NOTIFY_OBJ_FILES = $(gen_ndrsrcdir)/ndr_notify.o
+
[SUBSYSTEM::NDR_SCHANNEL]
-OBJ_FILES = gen_ndr/ndr_schannel.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT
+NDR_SCHANNEL_OBJ_FILES = $(gen_ndrsrcdir)/ndr_schannel.o
+
[SUBSYSTEM::NDR_NBT]
-OBJ_FILES = gen_ndr/ndr_nbt.o
-PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_NBT_BUF NDR_SVCCTL NDR_SECURITY
+PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_NBT_BUF NDR_SVCCTL NDR_SECURITY NDR_SAMR LIBCLI_NDR_NETLOGON
+
+NDR_NBT_OBJ_FILES = $(gen_ndrsrcdir)/ndr_nbt.o
-PUBLIC_HEADERS += librpc/gen_ndr/nbt.h
+PUBLIC_HEADERS += $(gen_ndrsrcdir)/nbt.h
[SUBSYSTEM::NDR_WINSREPL]
-OBJ_FILES = gen_ndr/ndr_winsrepl.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT
+NDR_WINSREPL_OBJ_FILES = $(gen_ndrsrcdir)/ndr_winsrepl.o
+
[SUBSYSTEM::NDR_WINBIND]
-OBJ_FILES = gen_ndr/ndr_winbind.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_NETLOGON
-librpc/idl-deps:
- ./librpc/idl-deps.pl librpc/idl/*.idl >$@
+NDR_WINBIND_OBJ_FILES = $(gen_ndrsrcdir)/ndr_winbind.o
+#PUBLIC_HEADERS += $(gen_ndrsrcdir)/winbind.h
+
+$(librpcsrcdir)/idl-deps:
+ ./$(librpcsrcdir)/idl-deps.pl $(librpcsrcdir)/idl/*.idl >$@
clean::
- rm -f librpc/idl-deps
+ rm -f $(librpcsrcdir)/idl-deps
-include librpc/idl-deps
+include $(librpcsrcdir)/idl-deps
-librpc/gen_ndr/tables.c: $(IDL_NDR_PARSE_H_FILES)
+$(gen_ndrsrcdir)/tables.c: $(IDL_NDR_PARSE_H_FILES)
@echo Generating $@
- @$(PERL) $(srcdir)/librpc/tables.pl --output=$@ $^ > librpc/gen_ndr/tables.x
- @mv librpc/gen_ndr/tables.x $@
+ @$(PERL) $(librpcsrcdir)/tables.pl --output=$@ $^ > $(gen_ndrsrcdir)/tables.x
+ @mv $(gen_ndrsrcdir)/tables.x $@
[SUBSYSTEM::NDR_TABLE]
-OBJ_FILES = ndr/ndr_table.o gen_ndr/tables.o
-PRIVATE_PROTO_HEADER = ndr/ndr_table.h
PUBLIC_DEPENDENCIES = \
NDR_AUDIOSRV NDR_ECHO NDR_DCERPC \
NDR_DSBACKUP NDR_EFS NDR_MISC NDR_LSA NDR_DFS NDR_DRSUAPI \
@@ -314,184 +375,212 @@ PUBLIC_DEPENDENCIES = \
NDR_INITSHUTDOWN NDR_DNSSERVER NDR_WINSTATION NDR_IRPC NDR_OPENDB \
NDR_SASL_HELPERS NDR_NOTIFY NDR_WINBIND NDR_FRSRPC NDR_FRSAPI NDR_NFS4ACL
+NDR_TABLE_OBJ_FILES = $(ndrsrcdir)/ndr_table.o $(gen_ndrsrcdir)/tables.o
+
+$(eval $(call proto_header_template,$(ndrsrcdir)/ndr_table.h,$(NDR_TABLE_OBJ_FILES:.o=.c)))
+
[SUBSYSTEM::RPC_NDR_ROT]
-OBJ_FILES = gen_ndr/ndr_rot_c.o
PUBLIC_DEPENDENCIES = NDR_ROT dcerpc
+RPC_NDR_ROT_OBJ_FILES = $(gen_ndrsrcdir)/ndr_rot_c.o
+
[SUBSYSTEM::RPC_NDR_AUDIOSRV]
-OBJ_FILES = gen_ndr/ndr_audiosrv_c.o
PUBLIC_DEPENDENCIES = NDR_AUDIOSRV dcerpc
+RPC_NDR_AUDIOSRV_OBJ_FILES = $(gen_ndrsrcdir)/ndr_audiosrv_c.o
+
[SUBSYSTEM::RPC_NDR_ECHO]
-OBJ_FILES = gen_ndr/ndr_echo_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_ECHO
+RPC_NDR_ECHO_OBJ_FILES = $(gen_ndrsrcdir)/ndr_echo_c.o
+
[SUBSYSTEM::RPC_NDR_DSBACKUP]
-OBJ_FILES = gen_ndr/ndr_dsbackup_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_DSBACKUP
+RPC_NDR_DSBACKUP_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dsbackup_c.o
+
[SUBSYSTEM::RPC_NDR_EFS]
-OBJ_FILES = gen_ndr/ndr_efs_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_EFS
+RPC_NDR_EFS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_efs_c.o
+
[SUBSYSTEM::RPC_NDR_LSA]
-OBJ_FILES = gen_ndr/ndr_lsa_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_LSA
+RPC_NDR_LSA_OBJ_FILES = $(gen_ndrsrcdir)/ndr_lsa_c.o
+
[SUBSYSTEM::RPC_NDR_DFS]
-OBJ_FILES = gen_ndr/ndr_dfs_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_DFS
+RPC_NDR_DFS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dfs_c.o
+
[SUBSYSTEM::RPC_NDR_FRSAPI]
-OBJ_FILES = gen_ndr/ndr_frsapi_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_FRSAPI
+RPC_NDR_FRSAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_frsapi_c.o
+
[SUBSYSTEM::RPC_NDR_DRSUAPI]
-OBJ_FILES = gen_ndr/ndr_drsuapi_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_DRSUAPI
+RPC_NDR_DRSUAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsuapi_c.o
+
[SUBSYSTEM::RPC_NDR_POLICYAGENT]
-OBJ_FILES = gen_ndr/ndr_policyagent_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_POLICYAGENT
+RPC_NDR_POLICYAGENT_OBJ_FILES = $(gen_ndrsrcdir)/ndr_policyagent_c.o
+
[SUBSYSTEM::RPC_NDR_UNIXINFO]
-OBJ_FILES = gen_ndr/ndr_unixinfo_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_UNIXINFO
+RPC_NDR_UNIXINFO_OBJ_FILES = $(gen_ndrsrcdir)/ndr_unixinfo_c.o
+
[LIBRARY::dcerpc_samr]
-OBJ_FILES = gen_ndr/ndr_samr_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_SAMR
-PC_FILE = dcerpc_samr.pc
-VERSION = 0.0.1
-SO_VERSION = 0
+
+PC_FILES += $(librpcsrcdir)/dcerpc_samr.pc
+
+dcerpc_samr_VERSION = 0.0.1
+dcerpc_samr_SOVERSION = 0
+dcerpc_samr_OBJ_FILES = $(gen_ndrsrcdir)/ndr_samr_c.o
[SUBSYSTEM::RPC_NDR_SPOOLSS]
-OBJ_FILES = gen_ndr/ndr_spoolss_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_SPOOLSS
+RPC_NDR_SPOOLSS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_spoolss_c.o
+
[SUBSYSTEM::RPC_NDR_WKSSVC]
-OBJ_FILES = gen_ndr/ndr_wkssvc_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_WKSSVC
+RPC_NDR_WKSSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_wkssvc_c.o
+
[SUBSYSTEM::RPC_NDR_SRVSVC]
-OBJ_FILES = gen_ndr/ndr_srvsvc_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_SRVSVC
+RPC_NDR_SRVSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_srvsvc_c.o
+
[SUBSYSTEM::RPC_NDR_SVCCTL]
-OBJ_FILES = gen_ndr/ndr_svcctl_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_SVCCTL
-PUBLIC_HEADERS += librpc/gen_ndr/ndr_svcctl_c.h
+RPC_NDR_SVCCTL_OBJ_FILES = $(gen_ndrsrcdir)/ndr_svcctl_c.o
+
+PUBLIC_HEADERS += $(gen_ndrsrcdir)/ndr_svcctl_c.h
[LIBRARY::dcerpc_atsvc]
-OBJ_FILES = gen_ndr/ndr_atsvc_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_ATSVC
-PC_FILE = dcerpc_atsvc.pc
-VERSION = 0.0.1
-SO_VERSION = 0
-PUBLIC_HEADERS += librpc/gen_ndr/ndr_atsvc_c.h
+dcerpc_atsvc_VERSION = 0.0.1
+dcerpc_atsvc_SOVERSION = 0
+
+dcerpc_atsvc_OBJ_FILES = $(gen_ndrsrcdir)/ndr_atsvc_c.o
+PC_FILES += $(librpcsrcdir)/dcerpc_atsvc.pc
+
+PUBLIC_HEADERS += $(gen_ndrsrcdir)/ndr_atsvc_c.h
[SUBSYSTEM::RPC_NDR_EVENTLOG]
-OBJ_FILES = gen_ndr/ndr_eventlog_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_EVENTLOG
+RPC_NDR_EVENTLOG_OBJ_FILES = $(gen_ndrsrcdir)/ndr_eventlog_c.o
+
[SUBSYSTEM::RPC_NDR_EPMAPPER]
-OBJ_FILES = gen_ndr/ndr_epmapper_c.o
PUBLIC_DEPENDENCIES = NDR_EPMAPPER
+RPC_NDR_EPMAPPER_OBJ_FILES = $(gen_ndrsrcdir)/ndr_epmapper_c.o
+
[SUBSYSTEM::RPC_NDR_DBGIDL]
-OBJ_FILES = gen_ndr/ndr_dbgidl_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_DBGIDL
+RPC_NDR_DBGIDL_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dbgidl_c.o
+
[SUBSYSTEM::RPC_NDR_DSSETUP]
-OBJ_FILES = gen_ndr/ndr_dssetup_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_DSSETUP
+RPC_NDR_DSSETUP_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dssetup_c.o
+
[SUBSYSTEM::RPC_NDR_MSGSVC]
-OBJ_FILES = gen_ndr/ndr_msgsvc_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_MSGSVC
+RPC_NDR_MSGSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_msgsvc_c.o
+
[SUBSYSTEM::RPC_NDR_WINS]
-OBJ_FILES = gen_ndr/ndr_wins_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_WINS
+RPC_NDR_WINS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_wins_c.o
+
[SUBSYSTEM::RPC_NDR_WINREG]
-OBJ_FILES = gen_ndr/ndr_winreg_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_WINREG
+RPC_NDR_WINREG_OBJ_FILES = $(gen_ndrsrcdir)/ndr_winreg_c.o
+
[SUBSYSTEM::RPC_NDR_INITSHUTDOWN]
-OBJ_FILES = gen_ndr/ndr_initshutdown_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_INITSHUTDOWN
+RPC_NDR_INITSHUTDOWN_OBJ_FILES = $(gen_ndrsrcdir)/ndr_initshutdown_c.o
+
[SUBSYSTEM::RPC_NDR_MGMT]
-OBJ_FILES = gen_ndr/ndr_mgmt_c.o
PRIVATE_DEPENDENCIES = NDR_MGMT
+RPC_NDR_MGMT_OBJ_FILES = $(gen_ndrsrcdir)/ndr_mgmt_c.o
+
[SUBSYSTEM::RPC_NDR_PROTECTED_STORAGE]
-OBJ_FILES = gen_ndr/ndr_protected_storage_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_PROTECTED_STORAGE
+RPC_NDR_PROTECTED_STORAGE_OBJ_FILES = $(gen_ndrsrcdir)/ndr_protected_storage_c.o
+
[SUBSYSTEM::RPC_NDR_OXIDRESOLVER]
-OBJ_FILES = gen_ndr/ndr_oxidresolver_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_OXIDRESOLVER
+RPC_NDR_OXIDRESOLVER_OBJ_FILES = $(gen_ndrsrcdir)/ndr_oxidresolver_c.o
+
[SUBSYSTEM::RPC_NDR_REMACT]
-OBJ_FILES = gen_ndr/ndr_remact_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_REMACT
+RPC_NDR_REMACT_OBJ_FILES = $(gen_ndrsrcdir)/ndr_remact_c.o
+
[SUBSYSTEM::RPC_NDR_WZCSVC]
-OBJ_FILES = gen_ndr/ndr_wzcsvc_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_WZCSVC
+RPC_NDR_WZCSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_wzcsvc_c.o
+
[SUBSYSTEM::RPC_NDR_W32TIME]
-OBJ_FILES = gen_ndr/ndr_w32time_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_W32TIME
+RPC_NDR_W32TIME_OBJ_FILES = $(gen_ndrsrcdir)/ndr_w32time_c.o
+
[SUBSYSTEM::RPC_NDR_SCERPC]
-OBJ_FILES = gen_ndr/ndr_scerpc_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_SCERPC
+RPC_NDR_SCERPC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_scerpc_c.o
+
[SUBSYSTEM::RPC_NDR_NTSVCS]
-OBJ_FILES = gen_ndr/ndr_ntsvcs_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_NTSVCS
+RPC_NDR_NTSVCS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_ntsvcs_c.o
+
[SUBSYSTEM::RPC_NDR_NETLOGON]
-OBJ_FILES = gen_ndr/ndr_netlogon_c.o
PUBLIC_DEPENDENCIES = NDR_NETLOGON
+RPC_NDR_NETLOGON_OBJ_FILES = $(gen_ndrsrcdir)/ndr_netlogon_c.o
+
[SUBSYSTEM::RPC_NDR_TRKWKS]
-OBJ_FILES = gen_ndr/ndr_trkwks_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_TRKWKS
+RPC_NDR_TRKWKS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_trkwks_c.o
+
[SUBSYSTEM::RPC_NDR_KEYSVC]
-OBJ_FILES = gen_ndr/ndr_keysvc_c.o
PUBLIC_DEPENDENCIES = dcerpc NDR_KEYSVC
+RPC_NDR_KEYSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_keysvc_c.o
+
[SUBSYSTEM::NDR_DCERPC]
-OBJ_FILES = gen_ndr/ndr_dcerpc.o
PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC
-PUBLIC_HEADERS += $(addprefix librpc/, gen_ndr/dcerpc.h gen_ndr/ndr_dcerpc.h)
+NDR_DCERPC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dcerpc.o
+
+PUBLIC_HEADERS += $(addprefix $(librpcsrcdir)/, gen_ndr/dcerpc.h gen_ndr/ndr_dcerpc.h)
################################################
# Start SUBSYSTEM dcerpc
[LIBRARY::dcerpc]
-VERSION = 0.0.1
-SO_VERSION = 0
-PC_FILE = dcerpc.pc
-PRIVATE_PROTO_HEADER = rpc/dcerpc_proto.h
-OBJ_FILES = \
- rpc/dcerpc.o \
- rpc/dcerpc_auth.o \
- rpc/dcerpc_schannel.o \
- rpc/dcerpc_util.o \
- rpc/dcerpc_error.o \
- rpc/dcerpc_smb.o \
- rpc/dcerpc_smb2.o \
- rpc/dcerpc_sock.o \
- rpc/dcerpc_connect.o \
- rpc/dcerpc_secondary.o
PRIVATE_DEPENDENCIES = \
samba-socket LIBCLI_RESOLVE LIBCLI_SMB LIBCLI_SMB2 \
LIBNDR NDR_DCERPC RPC_NDR_EPMAPPER \
@@ -503,154 +592,131 @@ PUBLIC_DEPENDENCIES = CREDENTIALS
# End SUBSYSTEM dcerpc
################################################
-PUBLIC_HEADERS += $(addprefix librpc/, rpc/dcerpc.h \
+PC_FILES += $(librpcsrcdir)/dcerpc.pc
+dcerpc_VERSION = 0.0.1
+dcerpc_SOVERSION = 0
+
+dcerpc_OBJ_FILES = $(addprefix $(dcerpcsrcdir)/, dcerpc.o dcerpc_auth.o dcerpc_schannel.o dcerpc_util.o binding.o \
+ dcerpc_error.o dcerpc_smb.o dcerpc_smb2.o dcerpc_sock.o dcerpc_connect.o dcerpc_secondary.o)
+
+$(eval $(call proto_header_template,$(dcerpcsrcdir)/dcerpc_proto.h,$(dcerpc_OBJ_FILES:.o=.c)))
+
+
+PUBLIC_HEADERS += $(addprefix $(librpcsrcdir)/, rpc/dcerpc.h \
gen_ndr/mgmt.h gen_ndr/ndr_mgmt.h gen_ndr/ndr_mgmt_c.h \
gen_ndr/epmapper.h gen_ndr/ndr_epmapper.h gen_ndr/ndr_epmapper_c.h)
-[MODULE::RPC_EJS_ECHO]
-INIT_FUNCTION = ejs_init_rpcecho
-OBJ_FILES = gen_ndr/ndr_echo_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_ECHO EJSRPC
-
-[MODULE::RPC_EJS_MISC]
-INIT_FUNCTION = ejs_init_misc
-OBJ_FILES = gen_ndr/ndr_misc_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_MISC EJSRPC
-
-[MODULE::RPC_EJS_SAMR]
-INIT_FUNCTION = ejs_init_samr
-OBJ_FILES = gen_ndr/ndr_samr_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_SAMR EJSRPC RPC_EJS_LSA RPC_EJS_SECURITY RPC_EJS_MISC
-
-[MODULE::RPC_EJS_SECURITY]
-INIT_FUNCTION = ejs_init_security
-OBJ_FILES = gen_ndr/ndr_security_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_SECURITY EJSRPC
-
-[MODULE::RPC_EJS_LSA]
-INIT_FUNCTION = ejs_init_lsarpc
-OBJ_FILES = gen_ndr/ndr_lsa_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_LSA EJSRPC RPC_EJS_SECURITY RPC_EJS_MISC
-
-[MODULE::RPC_EJS_DFS]
-INIT_FUNCTION = ejs_init_netdfs
-OBJ_FILES = gen_ndr/ndr_dfs_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_DFS EJSRPC
-
-[MODULE::RPC_EJS_DRSUAPI]
-INIT_FUNCTION = ejs_init_drsuapi
-OBJ_FILES = gen_ndr/ndr_drsuapi_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_DRSUAPI EJSRPC RPC_EJS_MISC RPC_EJS_SAMR
-
-[MODULE::RPC_EJS_SPOOLSS]
-INIT_FUNCTION = ejs_init_spoolss
-OBJ_FILES = gen_ndr/ndr_spoolss_ejs.o
-SUBSYSTEM = smbcalls
-ENABLE = NO
-PRIVATE_DEPENDENCIES = dcerpc NDR_SPOOLSS EJSRPC
-
-[MODULE::RPC_EJS_WKSSVC]
-INIT_FUNCTION = ejs_init_wkssvc
-OBJ_FILES = gen_ndr/ndr_wkssvc_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_WKSSVC EJSRPC RPC_EJS_SRVSVC RPC_EJS_MISC
-
-[MODULE::RPC_EJS_SRVSVC]
-INIT_FUNCTION = ejs_init_srvsvc
-OBJ_FILES = gen_ndr/ndr_srvsvc_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_SRVSVC EJSRPC RPC_EJS_MISC RPC_EJS_SVCCTL RPC_EJS_SECURITY
-
-[MODULE::RPC_EJS_EVENTLOG]
-INIT_FUNCTION = ejs_init_eventlog
-OBJ_FILES = gen_ndr/ndr_eventlog_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_EVENTLOG EJSRPC RPC_EJS_MISC
-
-[MODULE::RPC_EJS_WINREG]
-INIT_FUNCTION = ejs_init_winreg
-OBJ_FILES = gen_ndr/ndr_winreg_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_WINREG EJSRPC RPC_EJS_INITSHUTDOWN \
- RPC_EJS_MISC RPC_EJS_SECURITY
-
-[MODULE::RPC_EJS_INITSHUTDOWN]
-INIT_FUNCTION = ejs_init_initshutdown
-OBJ_FILES = gen_ndr/ndr_initshutdown_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_INITSHUTDOWN EJSRPC
-
-[MODULE::RPC_EJS_NETLOGON]
-INIT_FUNCTION = ejs_init_netlogon
-OBJ_FILES = gen_ndr/ndr_netlogon_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_NETLOGON EJSRPC RPC_EJS_SAMR RPC_EJS_SECURITY RPC_EJS_MISC
-
-[MODULE::RPC_EJS_SVCCTL]
-INIT_FUNCTION = ejs_init_svcctl
-OBJ_FILES = gen_ndr/ndr_svcctl_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_SVCCTL EJSRPC RPC_EJS_MISC
-
-[MODULE::RPC_EJS_IRPC]
-INIT_FUNCTION = ejs_init_irpc
-OBJ_FILES = gen_ndr/ndr_irpc_ejs.o
-SUBSYSTEM = smbcalls
-PRIVATE_DEPENDENCIES = dcerpc NDR_IRPC EJSRPC
-
[PYTHON::swig_dcerpc]
-SWIG_FILE = rpc/dcerpc.i
+LIBRARY_REALNAME = samba/dcerpc/_dcerpc.$(SHLIBEXT)
PUBLIC_DEPENDENCIES = LIBCLI_SMB NDR_MISC LIBSAMBA-UTIL LIBSAMBA-HOSTCONFIG dcerpc_samr RPC_NDR_LSA DYNCONFIG
+swig_dcerpc_OBJ_FILES = $(dcerpcsrcdir)/dcerpc_wrap.o
+
+$(eval $(call python_py_module_template,samba/dcerpc/__init__.py,$(dcerpcsrcdir)/dcerpc.py))
+
+$(swig_dcerpc_OBJ_FILES): CFLAGS+=$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)
+
[PYTHON::python_echo]
-OBJ_FILES = gen_ndr/py_echo.o
-PRIVATE_DEPENDENCIES = RPC_NDR_ECHO
+LIBRARY_REALNAME = samba/dcerpc/echo.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_ECHO PYTALLOC param swig_credentials
+
+python_echo_OBJ_FILES = $(gen_ndrsrcdir)/py_echo.o
[PYTHON::python_winreg]
-OBJ_FILES = gen_ndr/py_winreg.o
-PRIVATE_DEPENDENCIES = RPC_NDR_WINREG python_misc
+LIBRARY_REALNAME = samba/dcerpc/winreg.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_WINREG python_misc PYTALLOC param swig_credentials python_dcerpc_misc python_lsa
+
+python_winreg_OBJ_FILES = $(gen_ndrsrcdir)/py_winreg.o
[PYTHON::python_dcerpc_misc]
-OBJ_FILES = gen_ndr/py_misc.o
+LIBRARY_REALNAME = samba/dcerpc/misc.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = PYTALLOC
+
+python_dcerpc_misc_OBJ_FILES = $(gen_ndrsrcdir)/py_misc.o
[PYTHON::python_initshutdown]
-OBJ_FILES = gen_ndr/py_initshutdown.o
-PRIVATE_DEPENDENCIES = RPC_NDR_INITSHUTDOWN
+LIBRARY_REALNAME = samba/dcerpc/initshutdown.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_INITSHUTDOWN PYTALLOC param swig_credentials python_lsa python_dcerpc_security
+
+python_initshutdown_OBJ_FILES = $(gen_ndrsrcdir)/py_initshutdown.o
[PYTHON::python_epmapper]
-OBJ_FILES = gen_ndr/py_epmapper.o
+LIBRARY_REALNAME = samba/dcerpc/epmapper.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = dcerpc PYTALLOC param swig_credentials python_dcerpc_misc
+
+python_epmapper_OBJ_FILES = $(gen_ndrsrcdir)/py_epmapper.o
[PYTHON::python_mgmt]
-OBJ_FILES = gen_ndr/py_mgmt.o
-PRIVATE_DEPENDENCIES = dcerpc_mgmt
+LIBRARY_REALNAME = samba/dcerpc/mgmt.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = PYTALLOC param swig_credentials dcerpc python_dcerpc_misc
+
+python_mgmt_OBJ_FILES = $(gen_ndrsrcdir)/py_mgmt.o
[PYTHON::python_atsvc]
-OBJ_FILES = gen_ndr/py_atsvc.o
-PRIVATE_DEPENDENCIES = dcerpc_atsvc
+LIBRARY_REALNAME = samba/dcerpc/atsvc.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = dcerpc_atsvc PYTALLOC param swig_credentials
+
+python_atsvc_OBJ_FILES = $(gen_ndrsrcdir)/py_atsvc.o
[PYTHON::python_samr]
-OBJ_FILES = gen_ndr/py_samr.o
-PRIVATE_DEPENDENCIES = dcerpc_samr
+LIBRARY_REALNAME = samba/dcerpc/samr.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = dcerpc_samr PYTALLOC python_dcerpc_security python_lsa python_dcerpc_misc swig_credentials param
+
+python_samr_OBJ_FILES = $(gen_ndrsrcdir)/py_samr.o
[PYTHON::python_svcctl]
-OBJ_FILES = gen_ndr/py_svcctl.o
-PRIVATE_DEPENDENCIES = RPC_NDR_SVCCTL
+LIBRARY_REALNAME = samba/dcerpc/svcctl.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_SVCCTL PYTALLOC param swig_credentials python_dcerpc_misc
+
+python_svcctl_OBJ_FILES = $(gen_ndrsrcdir)/py_svcctl.o
[PYTHON::python_lsa]
-OBJ_FILES = gen_ndr/py_lsa.o
-PRIVATE_DEPENDENCIES = RPC_NDR_LSA
+LIBRARY_REALNAME = samba/dcerpc/lsa.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_LSA PYTALLOC param swig_credentials python_dcerpc_security
+
+python_lsa_OBJ_FILES = $(gen_ndrsrcdir)/py_lsa.o
[PYTHON::python_wkssvc]
-OBJ_FILES = gen_ndr/py_wkssvc.o
-PRIVATE_DEPENDENCIES = RPC_NDR_WKSSVC
+LIBRARY_REALNAME = samba/dcerpc/wkssvc.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_WKSSVC PYTALLOC param swig_credentials python_lsa python_dcerpc_security
+
+python_wkssvc_OBJ_FILES = $(gen_ndrsrcdir)/py_wkssvc.o
+
+[PYTHON::python_dfs]
+LIBRARY_REALNAME = samba/dcerpc/dfs.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_DFS PYTALLOC param swig_credentials python_dcerpc_misc
+
+python_dfs_OBJ_FILES = $(gen_ndrsrcdir)/py_dfs.o
+
+[PYTHON::python_unixinfo]
+LIBRARY_REALNAME = samba/dcerpc/unixinfo.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_UNIXINFO PYTALLOC param swig_credentials python_dcerpc_security python_dcerpc_misc
+
+python_unixinfo_OBJ_FILES = $(gen_ndrsrcdir)/py_unixinfo.o
+
+[PYTHON::python_drsuapi]
+LIBRARY_REALNAME = samba/dcerpc/drsuapi.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = RPC_NDR_DRSUAPI PYTALLOC param swig_credentials python_dcerpc_misc python_dcerpc_security
+
+python_drsuapi_OBJ_FILES = $(gen_ndrsrcdir)/py_drsuapi.o
[PYTHON::python_dcerpc_security]
-OBJ_FILES = gen_ndr/py_security.o
+LIBRARY_REALNAME = samba/dcerpc/security.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = PYTALLOC python_dcerpc_misc
+
+python_dcerpc_security_OBJ_FILES = $(gen_ndrsrcdir)/py_security.o
+
+$(IDL_HEADER_FILES) $(IDL_NDR_PARSE_H_FILES) $(IDL_NDR_PARSE_C_FILES) \
+ $(IDL_NDR_CLIENT_C_FILES) $(IDL_NDR_CLIENT_H_FILES) \
+ $(IDL_NDR_SERVER_C_FILES) $(IDL_SWIG_FILES) \
+ $(IDL_NDR_EJS_C_FILES) $(IDL_NDR_EJS_H_FILES) \
+ $(IDL_NDR_PY_C_FILES) $(IDL_NDR_PY_H_FILES): idl
+
+idl_full:: $(pidldir)/lib/Parse/Pidl/IDL.pm $(pidldir)/lib/Parse/Pidl/Expr.pm
+ @CPP="$(CPP)" PIDL="$(PIDL)" $(librpcsrcdir)/scripts/build_idl.sh FULL $(librpcsrcdir)/idl $(librpcsrcdir)/gen_ndr
+
+idl:: $(pidldir)/lib/Parse/Pidl/IDL.pm $(pidldir)/lib/Parse/Pidl/Expr.pm
+ @CPP="$(CPP)" PIDL="$(PIDL)" $(librpcsrcdir)/scripts/build_idl.sh PARTIAL $(librpcsrcdir)/idl $(librpcsrcdir)/gen_ndr
+
+
diff --git a/source4/librpc/idl-deps.pl b/source4/librpc/idl-deps.pl
index d5bfe0b2ec..e630ee4f61 100755
--- a/source4/librpc/idl-deps.pl
+++ b/source4/librpc/idl-deps.pl
@@ -6,17 +6,17 @@ my %vars = ();
foreach(@ARGV) {
push (@{$vars{IDL_FILES}}, $_);
my $b = $_; $b =~ s/.*\/(.*?).idl$/$1/;
- push (@{$vars{IDL_HEADER_FILES}}, "librpc/gen_ndr/$b.h");
- push (@{$vars{IDL_NDR_PARSE_H_FILES}}, "librpc/gen_ndr/ndr_$b.h");
- push (@{$vars{IDL_NDR_PARSE_C_FILES}}, "librpc/gen_ndr/ndr_$b.c");
- push (@{$vars{IDL_NDR_CLIENT_C_FILES}}, "librpc/gen_ndr/ndr_$b\_c.c");
- push (@{$vars{IDL_NDR_CLIENT_H_FILES}}, "librpc/gen_ndr/ndr_$b\_c.h");
- push (@{$vars{IDL_SWIG_FILES}}, "librpc/gen_ndr/$b.i");
- push (@{$vars{IDL_NDR_SERVER_C_FILES}}, "librpc/gen_ndr/ndr_$b\_s.c");
- push (@{$vars{IDL_NDR_EJS_C_FILES}}, "librpc/gen_ndr/ndr_$b\_ejs.c");
- push (@{$vars{IDL_NDR_EJS_H_FILES}}, "librpc/gen_ndr/ndr_$b\_ejs.h");
- push (@{$vars{IDL_NDR_PY_C_FILES}}, "librpc/gen_ndr/py_$b.c");
- push (@{$vars{IDL_NDR_PY_H_FILES}}, "librpc/gen_ndr/py_$b.h");
+ push (@{$vars{IDL_HEADER_FILES}}, "\$(librpcsrcdir)/gen_ndr/$b.h");
+ push (@{$vars{IDL_NDR_PARSE_H_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b.h");
+ push (@{$vars{IDL_NDR_PARSE_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b.c");
+ push (@{$vars{IDL_NDR_CLIENT_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b\_c.c");
+ push (@{$vars{IDL_NDR_CLIENT_H_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b\_c.h");
+ push (@{$vars{IDL_SWIG_FILES}}, "\$(librpcsrcdir)/gen_ndr/$b.i");
+ push (@{$vars{IDL_NDR_SERVER_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b\_s.c");
+ push (@{$vars{IDL_NDR_EJS_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b\_ejs.c");
+ push (@{$vars{IDL_NDR_EJS_H_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b\_ejs.h");
+ push (@{$vars{IDL_NDR_PY_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/py_$b.c");
+ push (@{$vars{IDL_NDR_PY_H_FILES}}, "\$(librpcsrcdir)/gen_ndr/py_$b.h");
}
foreach (keys %vars) {
diff --git a/source4/librpc/idl/audiosrv.idl b/source4/librpc/idl/audiosrv.idl
index 9b9399ffee..1b059868ff 100644
--- a/source4/librpc/idl/audiosrv.idl
+++ b/source4/librpc/idl/audiosrv.idl
@@ -5,19 +5,19 @@
helpstring("Audio Server")
] interface audiosrv
{
- void audiosrv_CreatezoneFactoriesList();
- void audiosrv_CreateGfxFactoriesList();
- void audiosrv_CreateGfxList();
- void audiosrv_RemoveGfx();
- void audiosrv_AddGfx();
- void audiosrv_ModifyGfx();
- void audiosrv_OpenGfx();
- void audiosrv_Logon();
- void audiosrv_Logoff();
- void audiosrv_RegisterSessionNotificationEvent();
- void audiosrv_UnregisterSessionNotificationEvent();
- void audiosrv_SessionConnectState();
- void audiosrv_DriverOpenDrvRegKey();
- void audiosrv_AdvisePreferredDeviceChange();
- void audiosrv_GetPnpInfo();
+ [todo] void audiosrv_CreatezoneFactoriesList();
+ [todo] void audiosrv_CreateGfxFactoriesList();
+ [todo] void audiosrv_CreateGfxList();
+ [todo] void audiosrv_RemoveGfx();
+ [todo] void audiosrv_AddGfx();
+ [todo] void audiosrv_ModifyGfx();
+ [todo] void audiosrv_OpenGfx();
+ [todo] void audiosrv_Logon();
+ [todo] void audiosrv_Logoff();
+ [todo] void audiosrv_RegisterSessionNotificationEvent();
+ [todo] void audiosrv_UnregisterSessionNotificationEvent();
+ [todo] void audiosrv_SessionConnectState();
+ [todo] void audiosrv_DriverOpenDrvRegKey();
+ [todo] void audiosrv_AdvisePreferredDeviceChange();
+ [todo] void audiosrv_GetPnpInfo();
}
diff --git a/source4/librpc/idl/browser.idl b/source4/librpc/idl/browser.idl
index 5cc2475119..5b05be9cbb 100644
--- a/source4/librpc/idl/browser.idl
+++ b/source4/librpc/idl/browser.idl
@@ -9,50 +9,50 @@ interface browser
{
/******************/
/* Function 0x00 */
- NTSTATUS BrowserrServerEnum();
+ [todo] NTSTATUS BrowserrServerEnum();
/******************/
/* Function 0x01 */
- NTSTATUS BrowserrDebugCall();
+ [todo] NTSTATUS BrowserrDebugCall();
/******************/
/* Function 0x02 */
- NTSTATUS BrowserrQueryOtherDomains();
+ [todo] NTSTATUS BrowserrQueryOtherDomains();
/******************/
/* Function 0x03 */
- NTSTATUS BrowserrResetNetlogonState();
+ [todo] NTSTATUS BrowserrResetNetlogonState();
/******************/
/* Function 0x04 */
- NTSTATUS BrowserrDebugTrace();
+ [todo] NTSTATUS BrowserrDebugTrace();
/******************/
/* Function 0x05 */
- NTSTATUS BrowserrQueryStatistics();
+ [todo] NTSTATUS BrowserrQueryStatistics();
/******************/
/* Function 0x06 */
- NTSTATUS BrowserResetStatistics();
+ [todo] NTSTATUS BrowserResetStatistics();
/******************/
/* Function 0x07 */
- NTSTATUS NetrBrowserStatisticsClear();
+ [todo] NTSTATUS NetrBrowserStatisticsClear();
/******************/
/* Function 0x08 */
- NTSTATUS NetrBrowserStatisticsGet();
+ [todo] NTSTATUS NetrBrowserStatisticsGet();
/******************/
/* Function 0x09 */
- NTSTATUS BrowserrSetNetlogonState();
+ [todo] NTSTATUS BrowserrSetNetlogonState();
/******************/
/* Function 0x0a */
- NTSTATUS BrowserrQueryEmulatedDomains();
+ [todo] NTSTATUS BrowserrQueryEmulatedDomains();
/******************/
/* Function 0x0b */
- NTSTATUS BrowserrServerEnumEx();
+ [todo] NTSTATUS BrowserrServerEnumEx();
}
diff --git a/source4/librpc/idl/dcerpc.idl b/source4/librpc/idl/dcerpc.idl
index b2c67542f5..e228d85c46 100644
--- a/source4/librpc/idl/dcerpc.idl
+++ b/source4/librpc/idl/dcerpc.idl
@@ -116,6 +116,7 @@ interface dcerpc
uint16 context_id;
uint8 cancel_count;
uint32 status;
+ [flag(NDR_REMAINING)] DATA_BLOB _pad;
} dcerpc_fault;
/* the auth types we know about */
diff --git a/source4/librpc/idl/dfs.idl b/source4/librpc/idl/dfs.idl
index dbbd15039c..b279f555d9 100644
--- a/source4/librpc/idl/dfs.idl
+++ b/source4/librpc/idl/dfs.idl
@@ -308,16 +308,16 @@ import "misc.idl";
);
/* Function 0x06 */
- WERROR dfs_Rename();
+ [todo] WERROR dfs_Rename();
/* Function 0x07 */
- WERROR dfs_Move();
+ [todo] WERROR dfs_Move();
/* Function 0x08 */
- WERROR dfs_ManagerGetConfigInfo();
+ [todo] WERROR dfs_ManagerGetConfigInfo();
/* Function 0x09 */
- WERROR dfs_ManagerSendSiteInfo();
+ [todo] WERROR dfs_ManagerSendSiteInfo();
/* Function 0x0a */
typedef struct {
@@ -399,10 +399,10 @@ import "misc.idl";
);
/* Function 0x13 */
- WERROR dfs_Add2();
+ [todo] WERROR dfs_Add2();
/* Function 0x14 */
- WERROR dfs_Remove2();
+ [todo] WERROR dfs_Remove2();
/* Function 0x15 */
[public] WERROR dfs_EnumEx(
@@ -414,5 +414,5 @@ import "misc.idl";
);
/* Function 0x16 */
- WERROR dfs_SetInfo2();
+ [todo] WERROR dfs_SetInfo2();
}
diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl
index fb24122e26..2f48287233 100644
--- a/source4/librpc/idl/drsuapi.idl
+++ b/source4/librpc/idl/drsuapi.idl
@@ -666,7 +666,7 @@ interface drsuapi
/* TODO ... */
} drsuapi_DsReplicaAddOptions;
- WERROR DRSUAPI_REPLICA_ADD();
+ [todo] WERROR DRSUAPI_REPLICA_ADD();
/*****************/
/* Function 0x06 */
@@ -676,7 +676,7 @@ interface drsuapi
/* TODO ... */
} drsuapi_DsReplicaDeleteOptions;
- WERROR DRSUAPI_REPLICA_DEL();
+ [todo] WERROR DRSUAPI_REPLICA_DEL();
/*****************/
/* Function 0x07 */
@@ -685,11 +685,11 @@ interface drsuapi
DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE = 0x00000002
} drsuapi_DsReplicaModifyOptions;
- WERROR DRSUAPI_REPLICA_MODIFY();
+ [todo] WERROR DRSUAPI_REPLICA_MODIFY();
/*****************/
/* Function 0x08 */
- WERROR DRSUAPI_VERIFY_NAMES();
+ [todo] WERROR DRSUAPI_VERIFY_NAMES();
/*****************/
/* Function 0x09 */
@@ -732,7 +732,7 @@ interface drsuapi
[case(1)] drsuapi_DsGetMembershipsRequest1 req1;
} drsuapi_DsGetMembershipsRequest;
- WERROR drsuapi_DsGetMemberships(
+ [todo] WERROR drsuapi_DsGetMemberships(
[in] policy_handle *bind_handle,
[in,out] int32 level,
[in] [switch_is(level)] drsuapi_DsGetMembershipsRequest req,
@@ -741,7 +741,7 @@ interface drsuapi
/*****************/
/* Function 0x0a */
- WERROR DRSUAPI_INTER_DOMAIN_MOVE();
+ [todo] WERROR DRSUAPI_INTER_DOMAIN_MOVE();
/*****************/
/* Function 0x0b */
@@ -774,7 +774,7 @@ interface drsuapi
[case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1;
} drsuapi_DsGetNT4ChangeLogInfo;
- WERROR drsuapi_DsGetNT4ChangeLog(
+ [todo] WERROR drsuapi_DsGetNT4ChangeLog(
[in] policy_handle *bind_handle,
[in,out] uint32 level,
[in] [switch_is(level)] drsuapi_DsGetNT4ChangeLogRequest req,
@@ -920,7 +920,7 @@ interface drsuapi
/*****************/
/* Function 0x0f */
- WERROR DRSUAPI_REMOVE_DS_DOMAIN();
+ [todo] WERROR DRSUAPI_REMOVE_DS_DOMAIN();
/*****************/
/* Function 0x10 */
@@ -1138,7 +1138,7 @@ interface drsuapi
/*****************/
/* Function 0x12 */
- WERROR DRSUAPI_EXECUTE_KCC();
+ [todo] WERROR DRSUAPI_EXECUTE_KCC();
/*****************/
/* Function 0x13 */
@@ -1419,7 +1419,7 @@ interface drsuapi
/*****************/
/* Function 0x14 */
- WERROR DRSUAPI_ADD_SID_HISTORY();
+ [todo] WERROR DRSUAPI_ADD_SID_HISTORY();
/*****************/
/* Function 0x15 */
@@ -1452,11 +1452,11 @@ interface drsuapi
/*****************/
/* Function 0x16 */
- WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS();
+ [todo] WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS();
/*****************/
/* Function 0x17 */
- WERROR DRSUAPI_GET_OBJECT_EXISTENCE();
+ [todo] WERROR DRSUAPI_GET_OBJECT_EXISTENCE();
/*****************/
/* Function 0x18 */
diff --git a/source4/librpc/idl/dsbackup.idl b/source4/librpc/idl/dsbackup.idl
index 21dca8fa0e..72e8bf9c2b 100644
--- a/source4/librpc/idl/dsbackup.idl
+++ b/source4/librpc/idl/dsbackup.idl
@@ -5,15 +5,15 @@
helpstring("Backup support for Active Directory")
] interface ad_backup
{
- void HrRBackupPrepare();
- void HrRBackupEnd();
- void HrRBackupGetAttachmentInformation();
- void HrRBackupOpenFile();
- void HrRBackupRead();
- void HrRBackupClose();
- void HrRBackupGetBackupLogs();
- void HrRBackupTruncateLogs();
- void HrRBackupPing();
+ [todo] void HrRBackupPrepare();
+ [todo] void HrRBackupEnd();
+ [todo] void HrRBackupGetAttachmentInformation();
+ [todo] void HrRBackupOpenFile();
+ [todo] void HrRBackupRead();
+ [todo] void HrRBackupClose();
+ [todo] void HrRBackupGetBackupLogs();
+ [todo] void HrRBackupTruncateLogs();
+ [todo] void HrRBackupPing();
}
[
@@ -23,12 +23,12 @@
helpstring("Restoring Active Directory backups")
] interface ad_restore
{
- void HrRIsNTDSOnline();
- void HrRRestorePrepare();
- void HrRRestoreRegister();
- void HrRRestoreRegisterComplete();
- void HrRRestoreGetDatabaseLocations();
- void HrRRestoreEnd();
- void HrRRestoreSetCurrentLogNumber();
- void HrRRestoreCheckLogsForBackup();
+ [todo] void HrRIsNTDSOnline();
+ [todo] void HrRRestorePrepare();
+ [todo] void HrRRestoreRegister();
+ [todo] void HrRRestoreRegisterComplete();
+ [todo] void HrRRestoreGetDatabaseLocations();
+ [todo] void HrRRestoreEnd();
+ [todo] void HrRRestoreSetCurrentLogNumber();
+ [todo] void HrRRestoreCheckLogsForBackup();
}
diff --git a/source4/librpc/idl/dssetup.idl b/source4/librpc/idl/dssetup.idl
index af6350cc43..14de9f7633 100644
--- a/source4/librpc/idl/dssetup.idl
+++ b/source4/librpc/idl/dssetup.idl
@@ -88,14 +88,14 @@ import "misc.idl";
These stubs are left here only as a way of documenting the names
of the calls in case they ever turn up on the wire.
*/
- WERROR dssetup_DsRoleDnsNameToFlatName();
- WERROR dssetup_DsRoleDcAsDc();
- WERROR dssetup_DsRoleDcAsReplica();
- WERROR dssetup_DsRoleDemoteDc();
- WERROR dssetup_DsRoleGetDcOperationProgress();
- WERROR dssetup_DsRoleGetDcOperationResults();
- WERROR dssetup_DsRoleCancel();
- WERROR dssetup_DsRoleServerSaveStateForUpgrade();
- WERROR dssetup_DsRoleUpgradeDownlevelServer();
- WERROR dssetup_DsRoleAbortDownlevelServerUpgrade();
+ [todo] WERROR dssetup_DsRoleDnsNameToFlatName();
+ [todo] WERROR dssetup_DsRoleDcAsDc();
+ [todo] WERROR dssetup_DsRoleDcAsReplica();
+ [todo] WERROR dssetup_DsRoleDemoteDc();
+ [todo] WERROR dssetup_DsRoleGetDcOperationProgress();
+ [todo] WERROR dssetup_DsRoleGetDcOperationResults();
+ [todo] WERROR dssetup_DsRoleCancel();
+ [todo] WERROR dssetup_DsRoleServerSaveStateForUpgrade();
+ [todo] WERROR dssetup_DsRoleUpgradeDownlevelServer();
+ [todo] WERROR dssetup_DsRoleAbortDownlevelServerUpgrade();
}
diff --git a/source4/librpc/idl/efs.idl b/source4/librpc/idl/efs.idl
index 62fefda606..4279b08d13 100644
--- a/source4/librpc/idl/efs.idl
+++ b/source4/librpc/idl/efs.idl
@@ -18,13 +18,13 @@ WERROR EfsRpcOpenFileRaw(
[in] uint32 Flags
);
-WERROR EfsRpcReadFileRaw(
+[todo] WERROR EfsRpcReadFileRaw(
[in,ref] policy_handle *pvContext
/* incomplete */
);
-WERROR EfsRpcWriteFileRaw(
+[todo] WERROR EfsRpcWriteFileRaw(
[in,ref] policy_handle *pvContext
/* incomplete */
);
@@ -70,12 +70,12 @@ WERROR EfsRpcQueryRecoveryAgents(
[out,ref,unique] ENCRYPTION_CERTIFICATE_HASH_LIST **pRecoveryAgents
);
-WERROR EfsRpcRemoveUsersFromFile(
+[todo] WERROR EfsRpcRemoveUsersFromFile(
[in] [charset(UTF16),string] uint16 FileName[]
/* [in] ENCRYPTION_CERTIFICATE_LIST Hashes*/
);
-WERROR EfsRpcAddUsersToFile(
+[todo] WERROR EfsRpcAddUsersToFile(
[in] [charset(UTF16),string] uint16 FileName[]
/* [in] ENCRYPTION_CERTIFICATE_LIST Hashes*/
);
@@ -96,13 +96,13 @@ WERROR EfsRpcSetFileEncryptionKey(
[in] [unique] ENCRYPTION_CERTIFICATE *pEncryptionCertificate
);
-WERROR EfsRpcNotSupported(
+[todo] WERROR EfsRpcNotSupported(
);
-WERROR EfsRpcFileKeyInfo(
+[todo] WERROR EfsRpcFileKeyInfo(
);
-WERROR EfsRpcDuplicateEncryptionInfoFile(
+[todo] WERROR EfsRpcDuplicateEncryptionInfoFile(
);
}
diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl
index 60ff338ec4..ea04878094 100644
--- a/source4/librpc/idl/epmapper.idl
+++ b/source4/librpc/idl/epmapper.idl
@@ -310,5 +310,5 @@ interface epmapper
/**********************/
/* Function 0x07 */
- error_status_t epm_MapAuth();
+ [todo] error_status_t epm_MapAuth();
}
diff --git a/source4/librpc/idl/eventlog.idl b/source4/librpc/idl/eventlog.idl
index 3defd99400..ee42300c7c 100644
--- a/source4/librpc/idl/eventlog.idl
+++ b/source4/librpc/idl/eventlog.idl
@@ -65,7 +65,7 @@ import "lsa.idl", "security.idl";
/******************/
/* Function: 0x01 */
- NTSTATUS eventlog_BackupEventLogW();
+ [todo] NTSTATUS eventlog_BackupEventLogW();
/******************/
/* Function: 0x02 */
@@ -75,7 +75,7 @@ import "lsa.idl", "security.idl";
/******************/
/* Function: 0x03 */
- NTSTATUS eventlog_DeregisterEventSource();
+ [todo] NTSTATUS eventlog_DeregisterEventSource();
/******************/
/* Function: 0x04 */
@@ -86,11 +86,11 @@ import "lsa.idl", "security.idl";
/******************/
/* Function: 0x05 */
- NTSTATUS eventlog_GetOldestRecord();
+ [todo] NTSTATUS eventlog_GetOldestRecord();
/******************/
/* Function: 0x06 */
- NTSTATUS eventlog_ChangeNotify();
+ [todo] NTSTATUS eventlog_ChangeNotify();
/******************/
/* Function: 0x07 */
@@ -105,11 +105,11 @@ import "lsa.idl", "security.idl";
/******************/
/* Function: 0x08 */
- NTSTATUS eventlog_RegisterEventSourceW();
+ [todo] NTSTATUS eventlog_RegisterEventSourceW();
/******************/
/* Function: 0x09 */
- NTSTATUS eventlog_OpenBackupEventLogW();
+ [todo] NTSTATUS eventlog_OpenBackupEventLogW();
/******************/
/* Function: 0x0a */
@@ -125,51 +125,51 @@ import "lsa.idl", "security.idl";
/*****************/
/* Function 0x0b */
- NTSTATUS eventlog_ReportEventW();
+ [todo] NTSTATUS eventlog_ReportEventW();
/*****************/
/* Function 0x0c */
- NTSTATUS eventlog_ClearEventLogA();
+ [todo] NTSTATUS eventlog_ClearEventLogA();
/******************/
/* Function: 0x0d */
- NTSTATUS eventlog_BackupEventLogA();
+ [todo] NTSTATUS eventlog_BackupEventLogA();
/*****************/
/* Function 0x0e */
- NTSTATUS eventlog_OpenEventLogA();
+ [todo] NTSTATUS eventlog_OpenEventLogA();
/*****************/
/* Function 0x0f */
- NTSTATUS eventlog_RegisterEventSourceA();
+ [todo] NTSTATUS eventlog_RegisterEventSourceA();
/*****************/
/* Function 0x10 */
- NTSTATUS eventlog_OpenBackupEventLogA();
+ [todo] NTSTATUS eventlog_OpenBackupEventLogA();
/*****************/
/* Function 0x11 */
- NTSTATUS eventlog_ReadEventLogA();
+ [todo] NTSTATUS eventlog_ReadEventLogA();
/*****************/
/* Function 0x12 */
- NTSTATUS eventlog_ReportEventA();
+ [todo] NTSTATUS eventlog_ReportEventA();
/*****************/
/* Function 0x13 */
- NTSTATUS eventlog_RegisterClusterSvc();
+ [todo] NTSTATUS eventlog_RegisterClusterSvc();
/*****************/
/* Function 0x14 */
- NTSTATUS eventlog_DeregisterClusterSvc();
+ [todo] NTSTATUS eventlog_DeregisterClusterSvc();
/*****************/
/* Function 0x15 */
- NTSTATUS eventlog_WriteClusterEvents();
+ [todo] NTSTATUS eventlog_WriteClusterEvents();
/*****************/
/* Function 0x16 */
- NTSTATUS eventlog_GetLogIntormation();
+ [todo] NTSTATUS eventlog_GetLogIntormation();
/*****************/
/* Function 0x17 */
diff --git a/source4/librpc/idl/frsapi.idl b/source4/librpc/idl/frsapi.idl
index 2931a83da4..11593f479a 100644
--- a/source4/librpc/idl/frsapi.idl
+++ b/source4/librpc/idl/frsapi.idl
@@ -13,19 +13,19 @@ interface frsapi
{
/****************/
/* Function 0x00 */
- void FRSAPI_VERIFY_PROMOTION();
+ [todo] void FRSAPI_VERIFY_PROMOTION();
/****************/
/* Function 0x01 */
- void FRSAPI_PROMOTION_STATUS();
+ [todo] void FRSAPI_PROMOTION_STATUS();
/****************/
/* Function 0x02 */
- void FRSAPI_START_DEMOTION();
+ [todo] void FRSAPI_START_DEMOTION();
/****************/
/* Function 0x03 */
- void FRSAPI_COMMIT_DEMOTION();
+ [todo] void FRSAPI_COMMIT_DEMOTION();
/****************/
/* Function 0x04 */
@@ -49,7 +49,7 @@ interface frsapi
/****************/
/* Function 0x06 */
- void FRSAPI_VERIFY_PROMOTION_W();
+ [todo] void FRSAPI_VERIFY_PROMOTION_W();
/****************/
/* Function 0x07 */
@@ -106,7 +106,7 @@ interface frsapi
/****************/
/* Function 0x09 */
- void FRSAPI_WRITER_COMMAND();
+ [todo] void FRSAPI_WRITER_COMMAND();
/****************/
/* Function 0x0a */
diff --git a/source4/librpc/idl/frsrpc.idl b/source4/librpc/idl/frsrpc.idl
index 6a0ec394d0..1019a25b28 100644
--- a/source4/librpc/idl/frsrpc.idl
+++ b/source4/librpc/idl/frsrpc.idl
@@ -128,41 +128,41 @@ interface frsrpc
/*****************/
/* Function 0x01 */
- void FRSRPC_VERIFY_PROMOTION_PARENT();
+ [todo] void FRSRPC_VERIFY_PROMOTION_PARENT();
/*****************/
/* Function 0x02 */
- void FRSRPC_START_PROMOTION_PARENT();
+ [todo] void FRSRPC_START_PROMOTION_PARENT();
/*****************/
/* Function 0x03 */
- void FRSRPC_NOP();
+ [todo] void FRSRPC_NOP();
/*****************/
/* Function 0x04 */
- void FRSRPC_BACKUP_COMPLETE();
+ [todo] void FRSRPC_BACKUP_COMPLETE();
/*****************/
/* Function 0x05 */
- void FRSRPC_BACKUP_COMPLETE_5();
+ [todo] void FRSRPC_BACKUP_COMPLETE_5();
/*****************/
/* Function 0x06 */
- void FRSRPC_BACKUP_COMPLETE_6();
+ [todo] void FRSRPC_BACKUP_COMPLETE_6();
/*****************/
/* Function 0x07 */
- void FRSRPC_BACKUP_COMPLETE_7();
+ [todo] void FRSRPC_BACKUP_COMPLETE_7();
/*****************/
/* Function 0x08 */
- void FRSRPC_BACKUP_COMPLETE_8();
+ [todo] void FRSRPC_BACKUP_COMPLETE_8();
/*****************/
/* Function 0x09 */
- void FRSRPC_BACKUP_COMPLETE_9();
+ [todo] void FRSRPC_BACKUP_COMPLETE_9();
/*****************/
/* Function 0x0a */
- void FRSRPC_VERIFY_PROMOTION_PARENT_EX();
+ [todo] void FRSRPC_VERIFY_PROMOTION_PARENT_EX();
}
diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl
index e36e79f5c4..93cfdee201 100644
--- a/source4/librpc/idl/lsa.idl
+++ b/source4/librpc/idl/lsa.idl
@@ -94,12 +94,12 @@ import "misc.idl", "security.idl";
/******************/
/* Function: 0x04 */
- NTSTATUS lsa_SetSecObj ();
+ [todo] NTSTATUS lsa_SetSecObj ();
/******************/
/* Function: 0x05 */
- NTSTATUS lsa_ChangePassword ();
+ [todo] NTSTATUS lsa_ChangePassword ();
/******************/
@@ -273,7 +273,7 @@ import "misc.idl", "security.idl";
/******************/
/* Function: 0x09 */
- NTSTATUS lsa_ClearAuditLog ();
+ [todo] NTSTATUS lsa_ClearAuditLog ();
/******************/
/* Function: 0x0a */
@@ -477,15 +477,15 @@ import "misc.idl", "security.idl";
);
/* Function: 0x15 */
- NTSTATUS lsa_GetQuotasForAccount();
+ [todo] NTSTATUS lsa_GetQuotasForAccount();
/* Function: 0x16 */
- NTSTATUS lsa_SetQuotasForAccount();
+ [todo] NTSTATUS lsa_SetQuotasForAccount();
/* Function: 0x17 */
- NTSTATUS lsa_GetSystemAccessAccount();
+ [todo] NTSTATUS lsa_GetSystemAccessAccount();
/* Function: 0x18 */
- NTSTATUS lsa_SetSystemAccessAccount();
+ [todo] NTSTATUS lsa_SetSystemAccessAccount();
/* Function: 0x19 */
NTSTATUS lsa_OpenTrustedDomain(
@@ -599,7 +599,7 @@ import "misc.idl", "security.idl";
);
/* Function: 0x1b */
- NTSTATUS lsa_SetInformationTrustedDomain();
+ [todo] NTSTATUS lsa_SetInformationTrustedDomain();
/* Function: 0x1c */
[public] NTSTATUS lsa_OpenSecret(
@@ -659,7 +659,7 @@ import "misc.idl", "security.idl";
);
/* Function: 0x22 */
- NTSTATUS lsa_DeleteObject();
+ [todo] NTSTATUS lsa_DeleteObject();
/*******************/
@@ -713,7 +713,7 @@ import "misc.idl", "security.idl";
);
/* Function: 0x28 */
- NTSTATUS lsa_SetTrustedDomainInfo();
+ [todo] NTSTATUS lsa_SetTrustedDomainInfo();
/* Function: 0x29 */
NTSTATUS lsa_DeleteTrustedDomain(
[in] policy_handle *handle,
@@ -721,9 +721,9 @@ import "misc.idl", "security.idl";
);
/* Function: 0x2a */
- NTSTATUS lsa_StorePrivateData();
+ [todo] NTSTATUS lsa_StorePrivateData();
/* Function: 0x2b */
- NTSTATUS lsa_RetrievePrivateData();
+ [todo] NTSTATUS lsa_RetrievePrivateData();
/**********************/
@@ -800,7 +800,7 @@ import "misc.idl", "security.idl";
/* Function 0x33 */
- NTSTATUS lsa_CreateTrustedDomainEx();
+ [todo] NTSTATUS lsa_CreateTrustedDomainEx();
/* Function 0x34 */
NTSTATUS lsa_CloseTrustedDomainEx(
@@ -858,7 +858,7 @@ import "misc.idl", "security.idl";
);
/* Function 0x38 */
- NTSTATUS lsa_TestCall();
+ [todo] NTSTATUS lsa_TestCall();
/**********************/
/* Function 0x39 */
@@ -914,31 +914,31 @@ import "misc.idl", "security.idl";
);
/* Function 0x3b */
- NTSTATUS lsa_CreateTrustedDomainEx2();
+ [todo] NTSTATUS lsa_CreateTrustedDomainEx2();
/* Function 0x3c */
- NTSTATUS lsa_CREDRWRITE();
+ [todo] NTSTATUS lsa_CREDRWRITE();
/* Function 0x3d */
- NTSTATUS lsa_CREDRREAD();
+ [todo] NTSTATUS lsa_CREDRREAD();
/* Function 0x3e */
- NTSTATUS lsa_CREDRENUMERATE();
+ [todo] NTSTATUS lsa_CREDRENUMERATE();
/* Function 0x3f */
- NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
+ [todo] NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
/* Function 0x40 */
- NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
+ [todo] NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
/* Function 0x41 */
- NTSTATUS lsa_CREDRDELETE();
+ [todo] NTSTATUS lsa_CREDRDELETE();
/* Function 0x42 */
- NTSTATUS lsa_CREDRGETTARGETINFO();
+ [todo] NTSTATUS lsa_CREDRGETTARGETINFO();
/* Function 0x43 */
- NTSTATUS lsa_CREDRPROFILELOADED();
+ [todo] NTSTATUS lsa_CREDRPROFILELOADED();
/**********************/
/* Function 0x44 */
@@ -967,16 +967,16 @@ import "misc.idl", "security.idl";
);
/* Function 0x45 */
- NTSTATUS lsa_CREDRGETSESSIONTYPES();
+ [todo] NTSTATUS lsa_CREDRGETSESSIONTYPES();
/* Function 0x46 */
- NTSTATUS lsa_LSARREGISTERAUDITEVENT();
+ [todo] NTSTATUS lsa_LSARREGISTERAUDITEVENT();
/* Function 0x47 */
- NTSTATUS lsa_LSARGENAUDITEVENT();
+ [todo] NTSTATUS lsa_LSARGENAUDITEVENT();
/* Function 0x48 */
- NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
+ [todo] NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
/* Function 0x49 */
typedef struct {
@@ -1024,10 +1024,10 @@ import "misc.idl", "security.idl";
);
/* Function 0x4a */
- NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
+ [todo] NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
/* Function 0x4b */
- NTSTATUS lsa_CREDRRENAME();
+ [todo] NTSTATUS lsa_CREDRRENAME();
/*****************/
/* Function 0x4c */
@@ -1055,15 +1055,15 @@ import "misc.idl", "security.idl";
);
/* Function 0x4e */
- NTSTATUS lsa_LSAROPENPOLICYSCE();
+ [todo] NTSTATUS lsa_LSAROPENPOLICYSCE();
/* Function 0x4f */
- NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
+ [todo] NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
/* Function 0x50 */
- NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
+ [todo] NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
/* Function 0x51 */
- NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();
+ [todo] NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();
}
diff --git a/source4/librpc/idl/msgsvc.idl b/source4/librpc/idl/msgsvc.idl
index 09878ac7a4..d196daf06b 100644
--- a/source4/librpc/idl/msgsvc.idl
+++ b/source4/librpc/idl/msgsvc.idl
@@ -7,10 +7,10 @@
helpstring("Messaging Service")
] interface msgsvc
{
- void NetrMessageNameAdd();
- void NetrMessageNameEnum();
- void NetrMessageNameGetInfo();
- void NetrMessageNameDel();
+ [todo] void NetrMessageNameAdd();
+ [todo] void NetrMessageNameEnum();
+ [todo] void NetrMessageNameGetInfo();
+ [todo] void NetrMessageNameDel();
}
[
@@ -18,5 +18,5 @@
version(1.0)
] interface msgsvcsend
{
- void NetrSendMessage();
+ [todo] void NetrSendMessage();
}
diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl
index aa88360882..783f04eb42 100644
--- a/source4/librpc/idl/nbt.idl
+++ b/source4/librpc/idl/nbt.idl
@@ -8,9 +8,9 @@
encoding if it doesn't work out
*/
-import "misc.idl", "security.idl", "svcctl.idl";
+import "misc.idl", "security.idl", "svcctl.idl", "samr.idl";
[
-helper("libcli/nbt/libnbt.h")
+ helper("libcli/netlogon.h", "libcli/nbt/libnbt.h")
]
interface nbt
{
@@ -338,52 +338,19 @@ interface nbt
} nbt_dgram_packet;
- /*******************************************/
- /* \MAILSLOT\NET\NETLOGON mailslot requests */
- typedef enum {
- NETLOGON_QUERY_FOR_PDC = 0x7,
- NETLOGON_ANNOUNCE_UAS = 0xa,
- NETLOGON_RESPONSE_FROM_PDC = 0xc,
- NETLOGON_QUERY_FOR_PDC2 = 0x12,
- NETLOGON_RESPONSE_FROM_PDC2 = 0x17,
- NETLOGON_RESPONSE_FROM_PDC_USER = 0x19
- } nbt_netlogon_command;
-
- /* query for pdc request */
- typedef struct {
- astring computer_name;
- astring mailslot_name;
- [flag(NDR_ALIGN2)] DATA_BLOB _pad;
- nstring unicode_name;
- uint32 nt_version;
- uint16 lmnt_token;
- uint16 lm20_token;
- } nbt_netlogon_query_for_pdc;
-
- /* query for pdc request - new style */
- typedef struct {
- uint16 request_count;
- nstring computer_name;
- nstring user_name;
- astring mailslot_name;
- uint32 unknown[2];
- uint32 nt_version;
- uint16 lmnt_token;
- uint16 lm20_token;
- } nbt_netlogon_query_for_pdc2;
+ /******************************************
+ * \MAILSLOT\NET\NETLOGON mailslot requests
+ * and
+ * \MAILSLOT\NET\NTLOGON mailslot requests
+ */
- /* response from pdc */
- typedef struct {
- astring pdc_name;
- [flag(NDR_ALIGN2)] DATA_BLOB _pad;
- nstring unicode_pdc_name;
- nstring domain_name;
- uint32 nt_version;
- uint16 lmnt_token;
- uint16 lm20_token;
- } nbt_netlogon_response_from_pdc;
+ typedef [public,gensize] struct {
+ uint32 sa_family;
+ [flag(NDR_BIG_ENDIAN)] ipv4address pdc_ip;
+ [flag(NDR_REMAINING)] DATA_BLOB remaining;
+ } nbt_sockaddr;
- typedef [bitmap32bit] bitmap {
+ typedef [bitmap32bit,public] bitmap {
NBT_SERVER_PDC = 0x00000001,
NBT_SERVER_GC = 0x00000004,
NBT_SERVER_LDAP = 0x00000008,
@@ -395,108 +362,90 @@ interface nbt
NBT_SERVER_GOOD_TIMESERV = 0x00000200
} nbt_server_type;
- /* response from pdc - type2 */
- typedef struct {
- [flag(NDR_ALIGN4)] DATA_BLOB _pad;
- nbt_server_type server_type;
- GUID domain_uuid;
- nbt_string forest;
- nbt_string dns_domain;
- nbt_string pdc_dns_name;
- nbt_string domain;
- nbt_string pdc_name;
- nbt_string user_name;
- nbt_string server_site;
- nbt_string client_site;
- uint8 unknown;
- uint32 unknown2;
- [flag(NDR_BIG_ENDIAN)]
- ipv4address pdc_ip;
- uint32 unknown3[2];
- uint32 nt_version;
+ typedef [bitmap32bit,public] bitmap {
+ NETLOGON_NT_VERSION_1 = 0x00000001,
+ NETLOGON_NT_VERSION_5 = 0x00000002,
+ NETLOGON_NT_VERSION_5EX = 0x00000004,
+ NETLOGON_NT_VERSION_5EX_WITH_IP = 0x00000008,
+ NETLOGON_NT_VERSION_WITH_CLOSEST_SITE = 0x00000010,
+ NETLOGON_NT_VERSION_AVIOD_NT4EMUL = 0x01000000,
+ NETLOGON_NT_VERSION_PDC = 0x10000000,
+ NETLOGON_NT_VERSION_IP = 0x20000000,
+ NETLOGON_NT_VERSION_LOCAL = 0x40000000,
+ NETLOGON_NT_VERSION_GC = 0x80000000
+ } netlogon_nt_version_flags;
+
+
+ typedef [enum16bit,public] enum {
+ LOGON_PRIMARY_QUERY = 7, /* Was also NETLOGON_QUERY_FOR_PDC */
+ NETLOGON_ANNOUNCE_UAS = 10,
+ NETLOGON_RESPONSE_FROM_PDC = 12,
+ LOGON_SAM_LOGON_REQUEST = 18, /* Was also NETLOGON_QUERY_FOR_PDC2, NTLOGON_SAM_LOGON */
+ LOGON_SAM_LOGON_RESPONSE = 19, /* Was also NTLOGON_SAM_LOGON_REPLY */
+ LOGON_SAM_LOGON_PAUSE_RESPONSE = 20,
+ LOGON_SAM_LOGON_USER_UNKNOWN = 21, /* Was also NTLOGON_SAM_LOGON_REPLY15 */
+ LOGON_SAM_LOGON_RESPONSE_EX = 23, /* was NETLOGON_RESPONSE_FROM_PDC2 */
+ LOGON_SAM_LOGON_PAUSE_RESPONSE_EX = 24,
+ LOGON_SAM_LOGON_USER_UNKNOWN_EX = 25 /* was NETLOGON_RESPONSE_FROM_PDC_USER */
+ } netlogon_command;
+
+ typedef bitmap samr_AcctFlags samr_AcctFlags;
+
+ /* query to dc hand marshaled, as it has 'optional'
+ * parts */
+ typedef [nopull,nopush] struct {
+ uint16 request_count;
+ nstring computer_name;
+ nstring user_name;
+ astring mailslot_name;
+ samr_AcctFlags acct_control;
+ [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size;
+ /* The manual alignment is required because this
+ * structure is marked flag(NDR_NOALIGN) via the
+ * nbt_netlogon_packet below.
+ *
+ * However, both MUST only be present if sid_size > 0
+ */
+ [flag(NDR_ALIGN4)] DATA_BLOB _pad;
+ [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid;
+ netlogon_nt_version_flags nt_version;
uint16 lmnt_token;
uint16 lm20_token;
- } nbt_netlogon_response_from_pdc2;
-
- typedef enum netr_SamDatabaseID netr_SamDatabaseID;
-
- /* announce change to UAS or SAM */
- typedef struct {
- netr_SamDatabaseID db_index;
- hyper serial;
- NTTIME timestamp;
- } nbt_db_change;
-
- /* used to announce SAM changes */
- typedef struct {
- uint32 serial_lo;
- time_t timestamp;
- uint32 pulse;
- uint32 random;
- astring pdc_name;
- astring domain;
- [flag(NDR_ALIGN2)] DATA_BLOB _pad;
- nstring unicode_pdc_name;
- nstring unicode_domain;
- uint32 db_count;
- nbt_db_change dbchange[db_count];
- [value(ndr_size_dom_sid(&sid, ndr->flags))] uint32 sid_size;
- [flag(NDR_ALIGN4)] DATA_BLOB _pad2;
- dom_sid sid;
- uint32 nt_version;
- uint16 lmnt_token;
- uint16 lm20_token;
- } nbt_netlogon_announce_uas;
-
- typedef [nodiscriminant] union {
- [case(NETLOGON_QUERY_FOR_PDC)] nbt_netlogon_query_for_pdc pdc;
- [case(NETLOGON_QUERY_FOR_PDC2)] nbt_netlogon_query_for_pdc2 pdc2;
- [case(NETLOGON_ANNOUNCE_UAS)] nbt_netlogon_announce_uas uas;
- [case(NETLOGON_RESPONSE_FROM_PDC)] nbt_netlogon_response_from_pdc response;
- [case(NETLOGON_RESPONSE_FROM_PDC2)] nbt_netlogon_response_from_pdc2 response2;
- [case(NETLOGON_RESPONSE_FROM_PDC_USER)] nbt_netlogon_response_from_pdc2 response2;
- } nbt_netlogon_request;
+ } NETLOGON_SAM_LOGON_REQUEST;
typedef [flag(NDR_NOALIGN),public] struct {
- nbt_netlogon_command command;
- [switch_is(command)] nbt_netlogon_request req;
- } nbt_netlogon_packet;
-
- /*******************************************/
- /* CLDAP netlogon response */
-
- /* note that these structures are very similar to, but not
- quite identical to, the netlogon structures above */
-
- typedef struct {
- uint16 type;
- nstring pdc_name;
+ netlogon_command command;
+ nstring server;
nstring user_name;
- nstring domain_name;
- [value(1)] uint32 nt_version;
+ nstring domain;
+ netlogon_nt_version_flags nt_version;
uint16 lmnt_token;
- uint16 lm20_token;
- } nbt_cldap_netlogon_1;
+ uint16 lm20_token;
+ } NETLOGON_SAM_LOGON_RESPONSE_NT40;
- typedef struct {
- uint16 type;
+ typedef [flag(NDR_NOALIGN),public] struct {
+ netlogon_command command;
nstring pdc_name;
nstring user_name;
nstring domain_name;
GUID domain_uuid;
- GUID unknown_uuid;
+ GUID zero_uuid;
nbt_string forest;
nbt_string dns_domain;
nbt_string pdc_dns_name;
ipv4address pdc_ip;
nbt_server_type server_type;
- [value(3)] uint32 nt_version;
+ netlogon_nt_version_flags nt_version;
uint16 lmnt_token;
uint16 lm20_token;
- } nbt_cldap_netlogon_3;
+ } NETLOGON_SAM_LOGON_RESPONSE;
- typedef struct {
- uint32 type;
+ /* response from pdc hand marshaled (we have an additional
+ * function that uses this structure), as it has 'optional'
+ * parts */
+ typedef [flag(NDR_NOALIGN),public] struct {
+ netlogon_command command;
+ uint16 sbz; /* From the docs */
nbt_server_type server_type;
GUID domain_uuid;
nbt_string forest;
@@ -507,86 +456,91 @@ interface nbt
nbt_string user_name;
nbt_string server_site;
nbt_string client_site;
- [value(5)] uint32 nt_version;
- uint16 lmnt_token;
- uint16 lm20_token;
- } nbt_cldap_netlogon_5;
- typedef struct {
- uint32 type;
- nbt_server_type server_type;
- GUID domain_uuid;
- nbt_string forest;
- nbt_string dns_domain;
- nbt_string pdc_dns_name;
- nbt_string domain;
- nbt_string pdc_name;
- nbt_string user_name;
- nbt_string server_site;
- nbt_string client_site;
- uint8 unknown;
- uint32 unknown2;
- [flag(NDR_BIG_ENDIAN)]
- ipv4address pdc_ip;
- uint32 unknown3[2];
- [value(13)] uint32 nt_version;
+ /* Optional on NETLOGON_NT_VERSION_5EX_WITH_IP */
+ [value(ndr_size_nbt_sockaddr(&sockaddr, ndr->flags))] uint8 sockaddr_size;
+ [subcontext(0),subcontext_size(sockaddr_size)] nbt_sockaddr sockaddr;
+
+ /* Optional on NETLOGON_NT_VERSION_WITH_CLOSEST_SITE */
+ nbt_string next_closest_site;
+
+ netlogon_nt_version_flags nt_version;
uint16 lmnt_token;
uint16 lm20_token;
- } nbt_cldap_netlogon_13;
-
- typedef [flag(NDR_NOALIGN),public,nodiscriminant] union {
- [case(0)] nbt_cldap_netlogon_1 logon1;
- [case(1)] nbt_cldap_netlogon_1 logon1;
- [case(2)] nbt_cldap_netlogon_3 logon3;
- [case(3)] nbt_cldap_netlogon_3 logon3;
- [case(4)] nbt_cldap_netlogon_5 logon5;
- [case(5)] nbt_cldap_netlogon_5 logon5;
- [case(6)] nbt_cldap_netlogon_5 logon5;
- [case(7)] nbt_cldap_netlogon_5 logon5;
- [default] nbt_cldap_netlogon_13 logon13;
- } nbt_cldap_netlogon;
-
- /*******************************************/
- /* \MAILSLOT\NET\NTLOGON mailslot requests */
- typedef enum {
- NTLOGON_SAM_LOGON = 0x12,
- NTLOGON_SAM_LOGON_REPLY = 0x13,
- NTLOGON_SAM_LOGON_REPLY15 = 0x15
- } nbt_ntlogon_command;
+ } NETLOGON_SAM_LOGON_RESPONSE_EX;
+ /* query for pdc request */
typedef struct {
- uint16 request_count;
- nstring computer_name;
- nstring user_name;
+ astring computer_name;
astring mailslot_name;
- uint32 acct_control;
- [value(ndr_size_dom_sid(&sid, ndr->flags))] uint32 sid_size;
- [flag(NDR_ALIGN4)] DATA_BLOB _pad;
- dom_sid sid;
- uint32 nt_version;
+ [flag(NDR_ALIGN2)] DATA_BLOB _pad;
+ nstring unicode_name;
+ netlogon_nt_version_flags nt_version;
uint16 lmnt_token;
uint16 lm20_token;
- } nbt_ntlogon_sam_logon;
+ } nbt_netlogon_query_for_pdc;
- typedef struct {
- nstring server;
- nstring user_name;
- nstring domain;
- uint32 nt_version;
+ /* response from pdc */
+ typedef [flag(NDR_NOALIGN),public] struct {
+ netlogon_command command;
+ astring pdc_name;
+ [flag(NDR_ALIGN2)] DATA_BLOB _pad;
+ nstring unicode_pdc_name;
+ nstring domain_name;
+ netlogon_nt_version_flags nt_version;
uint16 lmnt_token;
uint16 lm20_token;
- } nbt_ntlogon_sam_logon_reply;
+ } nbt_netlogon_response_from_pdc;
+
+ typedef enum netr_SamDatabaseID netr_SamDatabaseID;
+
+ /* used to announce SAM changes - MS-NRPC 2.2.1.5.1 */
+ typedef struct {
+ netr_SamDatabaseID db_index;
+ hyper serial;
+ NTTIME timestamp;
+ } nbt_db_change_info;
+
+ typedef struct {
+ uint32 serial_lo;
+ time_t timestamp;
+ uint32 pulse;
+ uint32 random;
+ astring pdc_name;
+ astring domain;
+ [flag(NDR_ALIGN2)] DATA_BLOB _pad;
+ nstring unicode_pdc_name;
+ nstring unicode_domain;
+ uint32 db_count;
+ nbt_db_change_info dbchange[db_count];
+ [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size;
+ [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid;
+ uint32 message_format_version;
+ uint32 message_token;
+ } NETLOGON_DB_CHANGE;
typedef [nodiscriminant] union {
- [case(NTLOGON_SAM_LOGON)] nbt_ntlogon_sam_logon logon;
- [case(NTLOGON_SAM_LOGON_REPLY)] nbt_ntlogon_sam_logon_reply reply;
- [case(NTLOGON_SAM_LOGON_REPLY15)] nbt_ntlogon_sam_logon_reply reply;
- } nbt_ntlogon_request;
+ [case(LOGON_SAM_LOGON_REQUEST)] NETLOGON_SAM_LOGON_REQUEST logon;
+ [case(LOGON_PRIMARY_QUERY)] nbt_netlogon_query_for_pdc pdc;
+ [case(NETLOGON_ANNOUNCE_UAS)] NETLOGON_DB_CHANGE uas;
+ } nbt_netlogon_request;
+
+#if 0
+ [case(NETLOGON_RESPONSE_FROM_PDC)] nbt_netlogon_response_from_pdc response;
+ [case(NETLOGON_RESPONSE_FROM_PDC_USER)] nbt_netlogon_response_from_pdc2 response2;
+
+ [case(LOGON_SAM_LOGON_PAUSE_RESPONSE)] NETLOGON_SAM_LOGON_RESPONSE reply;
+ [case(LOGON_SAM_LOGON_RESPONSE)] NETLOGON_SAM_LOGON_RESPONSE reply;
+ [case(LOGON_SAM_LOGON_USER_UNKNOWN)] NETLOGON_SAM_LOGON_RESPONSE reply;
+ [case(LOGON_SAM_LOGON_RESPONSE_EX)] NETLOGON_SAM_LOGON_RESPONSE_EX reply_ex;
+ [case(LOGON_SAM_LOGON_PAUSE_RESPONSE_EX)] NETLOGON_SAM_LOGON_RESPONSE_EX reply_ex;
+ [case(LOGON_SAM_LOGON_USER_UNKNOWN_EX)] NETLOGON_SAM_LOGON_RESPONSE_EX reply_ex;
+#endif
typedef [flag(NDR_NOALIGN),public] struct {
- nbt_ntlogon_command command;
- [switch_is(command)] nbt_ntlogon_request req;
- } nbt_ntlogon_packet;
+ netlogon_command command;
+ [switch_is(command)] nbt_netlogon_request req;
+ } nbt_netlogon_packet;
/********************************************************/
/* \MAILSLOT\BROWSE mailslot requests */
diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl
index b29fc50bfa..6da496a486 100644
--- a/source4/librpc/idl/netlogon.idl
+++ b/source4/librpc/idl/netlogon.idl
@@ -983,11 +983,11 @@ interface netlogon
/*****************/
/* Function 0x15 */
- WERROR netr_NETRLOGONDUMMYROUTINE1();
+ [todo] WERROR netr_NETRLOGONDUMMYROUTINE1();
/****************/
/* Function 0x16 */
- WERROR netr_NETRLOGONSETSERVICEBITS();
+ [todo] WERROR netr_NETRLOGONSETSERVICEBITS();
/****************/
/* Function 0x17 */
@@ -999,11 +999,11 @@ interface netlogon
/****************/
/* Function 0x18 */
- WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
+ [todo] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
/****************/
/* Function 0x19 */
- WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
+ [todo] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
/****************/
/* Function 0x1a */
@@ -1128,7 +1128,7 @@ interface netlogon
/****************/
/* Function 0x20 */
- WERROR netr_NETRLOGONSENDTOSAM();
+ [todo] WERROR netr_NETRLOGONSENDTOSAM();
/****************/
/* Function 0x21 */
@@ -1164,7 +1164,7 @@ interface netlogon
/****************/
/* Function 0x23 */
- WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
+ [todo] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
/****************/
/* Function 0x24 */
@@ -1332,5 +1332,5 @@ interface netlogon
/****************/
/* Function 0x2e */
- WERROR netr_NETRSERVERGETTRUSTINFO();
+ [todo] WERROR netr_NETRSERVERGETTRUSTINFO();
}
diff --git a/source4/librpc/idl/ntsvcs.idl b/source4/librpc/idl/ntsvcs.idl
index 05ba68e727..1cdf8eecaa 100644
--- a/source4/librpc/idl/ntsvcs.idl
+++ b/source4/librpc/idl/ntsvcs.idl
@@ -9,69 +9,69 @@
]
interface ntsvcs
{
- void PNP_Disconnect();
- void PNP_Connect();
- void PNP_GetVersion();
- void PNP_GetGlobalState();
- void PNP_InitDetection();
- void PNP_ReportLogOn();
- void PNP_ValidateDeviceInstance();
- void PNP_GetRootDeviceInstance();
- void PNP_GetRelatedDeviceInstance();
- void PNP_EnumerateSubKeys();
- void PNP_GetDeviceList();
- void PNP_GetDeviceListSize();
- void PNP_GetDepth();
- void PNP_GetDeviceRegProp();
- void PNP_SetDeviceRegProp();
- void PNP_GetClassInstance();
- void PNP_CreateKey();
- void PNP_DeleteRegistryKey();
- void PNP_GetClassCount();
- void PNP_GetClassName();
- void PNP_DeleteClassKey();
- void PNP_GetInterfaceDeviceAlias();
- void PNP_GetInterfaceDeviceList();
- void PNP_GetInterfaceDeviceListSize();
- void PNP_RegisterDeviceClassAssociation();
- void PNP_UnregisterDeviceClassAssociation();
- void PNP_GetClassRegProp();
- void PNP_SetClassRegProp();
- void PNP_CreateDevInst();
- void PNP_DeviceInstanceAction();
- void PNP_GetDeviceStatus();
- void PNP_SetDeviceProblem();
- void PNP_DisableDevInst();
- void PNP_UninstallDevInst();
- void PNP_AddID();
- void PNP_RegisterDriver();
- void PNP_QueryRemove();
- void PNP_RequestDeviceEject();
- void PNP_IsDockStationPresent();
- void PNP_RequestEjectPC();
- void PNP_HwProfFlags();
- void PNP_GetHwProfInfo();
- void PNP_AddEmptyLogConf();
- void PNP_FreeLogConf();
- void PNP_GetFirstLogConf();
- void PNP_GetNextLogConf();
- void PNP_GetLogConfPriority();
- void PNP_AddResDes();
- void PNP_FreeResDes();
- void PNP_GetNextResDes();
- void PNP_GetResDesData();
- void PNP_GetResDesDataSize();
- void PNP_ModifyResDes();
- void PNP_DetectResourceLimit();
- void PNP_QueryResConfList();
- void PNP_SetHwProf();
- void PNP_QueryArbitratorFreeData();
- void PNP_QueryArbitratorFreeSize();
- void PNP_RunDetection();
- void PNP_RegisterNotification();
- void PNP_UnregisterNotification();
- void PNP_GetCustomDevProp();
- void PNP_GetVersionInternal();
- void PNP_GetBlockedDriverInfo();
- void PNP_GetServerSideDeviceInstallFlags();
+ [todo] void PNP_Disconnect();
+ [todo] void PNP_Connect();
+ [todo] void PNP_GetVersion();
+ [todo] void PNP_GetGlobalState();
+ [todo] void PNP_InitDetection();
+ [todo] void PNP_ReportLogOn();
+ [todo] void PNP_ValidateDeviceInstance();
+ [todo] void PNP_GetRootDeviceInstance();
+ [todo] void PNP_GetRelatedDeviceInstance();
+ [todo] void PNP_EnumerateSubKeys();
+ [todo] void PNP_GetDeviceList();
+ [todo] void PNP_GetDeviceListSize();
+ [todo] void PNP_GetDepth();
+ [todo] void PNP_GetDeviceRegProp();
+ [todo] void PNP_SetDeviceRegProp();
+ [todo] void PNP_GetClassInstance();
+ [todo] void PNP_CreateKey();
+ [todo] void PNP_DeleteRegistryKey();
+ [todo] void PNP_GetClassCount();
+ [todo] void PNP_GetClassName();
+ [todo] void PNP_DeleteClassKey();
+ [todo] void PNP_GetInterfaceDeviceAlias();
+ [todo] void PNP_GetInterfaceDeviceList();
+ [todo] void PNP_GetInterfaceDeviceListSize();
+ [todo] void PNP_RegisterDeviceClassAssociation();
+ [todo] void PNP_UnregisterDeviceClassAssociation();
+ [todo] void PNP_GetClassRegProp();
+ [todo] void PNP_SetClassRegProp();
+ [todo] void PNP_CreateDevInst();
+ [todo] void PNP_DeviceInstanceAction();
+ [todo] void PNP_GetDeviceStatus();
+ [todo] void PNP_SetDeviceProblem();
+ [todo] void PNP_DisableDevInst();
+ [todo] void PNP_UninstallDevInst();
+ [todo] void PNP_AddID();
+ [todo] void PNP_RegisterDriver();
+ [todo] void PNP_QueryRemove();
+ [todo] void PNP_RequestDeviceEject();
+ [todo] void PNP_IsDockStationPresent();
+ [todo] void PNP_RequestEjectPC();
+ [todo] void PNP_HwProfFlags();
+ [todo] void PNP_GetHwProfInfo();
+ [todo] void PNP_AddEmptyLogConf();
+ [todo] void PNP_FreeLogConf();
+ [todo] void PNP_GetFirstLogConf();
+ [todo] void PNP_GetNextLogConf();
+ [todo] void PNP_GetLogConfPriority();
+ [todo] void PNP_AddResDes();
+ [todo] void PNP_FreeResDes();
+ [todo] void PNP_GetNextResDes();
+ [todo] void PNP_GetResDesData();
+ [todo] void PNP_GetResDesDataSize();
+ [todo] void PNP_ModifyResDes();
+ [todo] void PNP_DetectResourceLimit();
+ [todo] void PNP_QueryResConfList();
+ [todo] void PNP_SetHwProf();
+ [todo] void PNP_QueryArbitratorFreeData();
+ [todo] void PNP_QueryArbitratorFreeSize();
+ [todo] void PNP_RunDetection();
+ [todo] void PNP_RegisterNotification();
+ [todo] void PNP_UnregisterNotification();
+ [todo] void PNP_GetCustomDevProp();
+ [todo] void PNP_GetVersionInternal();
+ [todo] void PNP_GetBlockedDriverInfo();
+ [todo] void PNP_GetServerSideDeviceInstallFlags();
}
diff --git a/source4/librpc/idl/policyagent.idl b/source4/librpc/idl/policyagent.idl
index 295b70a2a1..ab137faf27 100644
--- a/source4/librpc/idl/policyagent.idl
+++ b/source4/librpc/idl/policyagent.idl
@@ -9,5 +9,5 @@
{
/*****************/
/* Function 0x00 */
- WERROR policyagent_Dummy();
+ [todo] WERROR policyagent_Dummy();
}
diff --git a/source4/librpc/idl/security.idl b/source4/librpc/idl/security.idl
index 753fad85cf..314846c53f 100644
--- a/source4/librpc/idl/security.idl
+++ b/source4/librpc/idl/security.idl
@@ -22,6 +22,9 @@ cpp_quote("#define dom_sid2 dom_sid")
/* same struct as dom_sid but inside a 28 bytes fixed buffer in NDR */
cpp_quote("#define dom_sid28 dom_sid")
+/* same struct as dom_sid but in a variable byte buffer, which is maybe empty in NDR */
+cpp_quote("#define dom_sid0 dom_sid")
+
[
pointer_default(unique)
]
diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl
index 64cfd46b0e..6b4b0b8a16 100644
--- a/source4/librpc/idl/spoolss.idl
+++ b/source4/librpc/idl/spoolss.idl
@@ -386,14 +386,14 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x05 */
- WERROR spoolss_AddPrinter(
+ [todo] WERROR spoolss_AddPrinter(
/* This function is not implemented in Samba 3 as no
clients have been observed using it. */
);
/******************/
/* Function: 0x06 */
- WERROR spoolss_DeletePrinter(
+ [todo] WERROR spoolss_DeletePrinter(
);
/******************/
@@ -442,7 +442,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x09 */
- WERROR spoolss_AddPrinterDriver(
+ [todo] WERROR spoolss_AddPrinterDriver(
);
typedef struct {
@@ -564,7 +564,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x0b */
- WERROR spoolss_GetPrinterDriver(
+ [todo] WERROR spoolss_GetPrinterDriver(
);
/******************/
@@ -602,7 +602,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x0e */
- WERROR spoolss_AddPrintProcessor(
+ [todo] WERROR spoolss_AddPrintProcessor(
);
/******************/
@@ -644,7 +644,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x10 */
- WERROR spoolss_GetPrintProcessorDirectory(
+ [todo] WERROR spoolss_GetPrintProcessorDirectory(
);
/******************/
@@ -713,12 +713,12 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x18 */
- WERROR spoolss_AddJob(
+ [todo] WERROR spoolss_AddJob(
);
/******************/
/* Function: 0x19 */
- WERROR spoolss_ScheduleJob(
+ [todo] WERROR spoolss_ScheduleJob(
);
/******************/
@@ -806,7 +806,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x1c */
- WERROR spoolss_WaitForPrinterChange(
+ [todo] WERROR spoolss_WaitForPrinterChange(
);
/******************/
@@ -1022,79 +1022,79 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x26 */
- WERROR spoolss_ConfigurePort(
+ [todo] WERROR spoolss_ConfigurePort(
);
/******************/
/* Function: 0x27 */
- WERROR spoolss_DeletePort(
+ [todo] WERROR spoolss_DeletePort(
);
/******************/
/* Function: 0x28 */
- WERROR spoolss_CreatePrinterIC(
+ [todo] WERROR spoolss_CreatePrinterIC(
);
/******************/
/* Function: 0x29 */
- WERROR spoolss_PlayGDIScriptOnPrinterIC(
+ [todo] WERROR spoolss_PlayGDIScriptOnPrinterIC(
);
/******************/
/* Function: 0x2a */
- WERROR spoolss_DeletePrinterIC(
+ [todo] WERROR spoolss_DeletePrinterIC(
);
/******************/
/* Function: 0x2b */
- WERROR spoolss_AddPrinterConnection(
+ [todo] WERROR spoolss_AddPrinterConnection(
);
/******************/
/* Function: 0x2c */
- WERROR spoolss_DeletePrinterConnection(
+ [todo] WERROR spoolss_DeletePrinterConnection(
);
/******************/
/* Function: 0x2d */
- WERROR spoolss_PrinterMessageBox(
+ [todo] WERROR spoolss_PrinterMessageBox(
/* Marked as obsolete in MSDN. "Not necessary and has
no effect". */
);
/******************/
/* Function: 0x2e */
- WERROR spoolss_AddMonitor(
+ [todo] WERROR spoolss_AddMonitor(
);
/******************/
/* Function: 0x2f */
- WERROR spoolss_DeleteMonitor(
+ [todo] WERROR spoolss_DeleteMonitor(
);
/******************/
/* Function: 0x30 */
- WERROR spoolss_DeletePrintProcessor(
+ [todo] WERROR spoolss_DeletePrintProcessor(
);
/******************/
/* Function: 0x31 */
- WERROR spoolss_AddPrintProvidor(
+ [todo] WERROR spoolss_AddPrintProvidor(
);
/******************/
/* Function: 0x32 */
- WERROR spoolss_DeletePrintProvidor(
+ [todo] WERROR spoolss_DeletePrintProvidor(
);
/******************/
/* Function: 0x33 */
- WERROR spoolss_EnumPrintProcDataTypes(
+ [todo] WERROR spoolss_EnumPrintProcDataTypes(
);
/******************/
/* Function: 0x34 */
- WERROR spoolss_ResetPrinter(
+ [todo] WERROR spoolss_ResetPrinter(
);
/******************/
@@ -1115,12 +1115,12 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x36 */
- WERROR spoolss_FindFirstPrinterChangeNotification(
+ [todo] WERROR spoolss_FindFirstPrinterChangeNotification(
);
/******************/
/* Function: 0x37 */
- WERROR spoolss_FindNextPrinterChangeNotification(
+ [todo] WERROR spoolss_FindNextPrinterChangeNotification(
);
/******************/
@@ -1131,7 +1131,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x39 */
- WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
+ [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
);
/******************/
@@ -1147,7 +1147,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x3b */
- WERROR spoolss_RouterReplyPrinter(
+ [todo] WERROR spoolss_RouterReplyPrinter(
);
/******************/
@@ -1158,22 +1158,22 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x3d */
- WERROR spoolss_AddPortEx(
+ [todo] WERROR spoolss_AddPortEx(
);
/******************/
/* Function: 0x3e */
- WERROR spoolss_RouterFindFirstPrinterChangeNotification(
+ [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotification(
);
/******************/
/* Function: 0x3f */
- WERROR spoolss_SpoolerInit(
+ [todo] WERROR spoolss_SpoolerInit(
);
/******************/
/* Function: 0x40 */
- WERROR spoolss_ResetPrinterEx(
+ [todo] WERROR spoolss_ResetPrinterEx(
);
typedef [enum16bit] enum {
@@ -1239,7 +1239,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x42 */
- WERROR spoolss_RouterRefreshPrinterChangeNotification(
+ [todo] WERROR spoolss_RouterRefreshPrinterChangeNotification(
);
typedef struct {
@@ -1295,7 +1295,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x44 */
- WERROR spoolss_44(
+ [todo] WERROR spoolss_44(
);
typedef struct {
@@ -1399,7 +1399,7 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x47 */
- WERROR spoolss_47(
+ [todo] WERROR spoolss_47(
);
/******************/
@@ -1425,17 +1425,17 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x4a */
- WERROR spoolss_4a(
+ [todo] WERROR spoolss_4a(
);
/******************/
/* Function: 0x4b */
- WERROR spoolss_4b(
+ [todo] WERROR spoolss_4b(
);
/******************/
/* Function: 0x4c */
- WERROR spoolss_4c(
+ [todo] WERROR spoolss_4c(
);
/******************/
@@ -1492,32 +1492,32 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x52 */
- WERROR spoolss_DeletePrinterKey(
+ [todo] WERROR spoolss_DeletePrinterKey(
);
/******************/
/* Function: 0x53 */
- WERROR spoolss_53(
+ [todo] WERROR spoolss_53(
);
/******************/
/* Function: 0x54 */
- WERROR spoolss_DeletePrinterDriverEx(
+ [todo] WERROR spoolss_DeletePrinterDriverEx(
);
/******************/
/* Function: 0x55 */
- WERROR spoolss_55(
+ [todo] WERROR spoolss_55(
);
/******************/
/* Function: 0x56 */
- WERROR spoolss_56(
+ [todo] WERROR spoolss_56(
);
/******************/
/* Function: 0x57 */
- WERROR spoolss_57(
+ [todo] WERROR spoolss_57(
);
/******************/
@@ -1536,36 +1536,36 @@ import "misc.idl", "security.idl", "winreg.idl";
/******************/
/* Function: 0x59 */
- [public] WERROR spoolss_AddPrinterDriverEx(
+ [public,todo] WERROR spoolss_AddPrinterDriverEx(
);
/******************/
/* Function: 0x5a */
- WERROR spoolss_5a(
+ [todo] WERROR spoolss_5a(
);
/******************/
/* Function: 0x5b */
- WERROR spoolss_5b(
+ [todo] WERROR spoolss_5b(
);
/******************/
/* Function: 0x5c */
- WERROR spoolss_5c(
+ [todo] WERROR spoolss_5c(
);
/******************/
/* Function: 0x5d */
- WERROR spoolss_5d(
+ [todo] WERROR spoolss_5d(
);
/******************/
/* Function: 0x5e */
- WERROR spoolss_5e(
+ [todo] WERROR spoolss_5e(
);
/******************/
/* Function: 0x5f */
- WERROR spoolss_5f(
+ [todo] WERROR spoolss_5f(
);
}
diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl
index 8ef49413bc..703f3281cf 100644
--- a/source4/librpc/idl/srvsvc.idl
+++ b/source4/librpc/idl/srvsvc.idl
@@ -1370,7 +1370,7 @@ import "security.idl", "svcctl.idl";
/******************/
/* Function: 0x22 */
- WERROR srvsvc_NETRPRNAMECANONICALIZE(
+ [todo] WERROR srvsvc_NETRPRNAMECANONICALIZE(
);
/******************/
@@ -1464,56 +1464,56 @@ import "security.idl", "svcctl.idl";
/******************/
/* Function: 0x2b */
- WERROR srvsvc_NETRDFSGETVERSION(
+ [todo] WERROR srvsvc_NETRDFSGETVERSION(
);
/******************/
/* Function: 0x2c */
- WERROR srvsvc_NETRDFSCREATELOCALPARTITION(
+ [todo] WERROR srvsvc_NETRDFSCREATELOCALPARTITION(
);
/******************/
/* Function: 0x2d */
- WERROR srvsvc_NETRDFSDELETELOCALPARTITION(
+ [todo] WERROR srvsvc_NETRDFSDELETELOCALPARTITION(
);
/******************/
/* Function: 0x2e */
- WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE(
+ [todo] WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE(
);
/******************/
/* Function: 0x2f */
- WERROR srvsvc_NETRDFSSETSERVERINFO(
+ [todo] WERROR srvsvc_NETRDFSSETSERVERINFO(
);
/******************/
/* Function: 0x30 */
- WERROR srvsvc_NETRDFSCREATEEXITPOINT(
+ [todo] WERROR srvsvc_NETRDFSCREATEEXITPOINT(
);
/******************/
/* Function: 0x31 */
- WERROR srvsvc_NETRDFSDELETEEXITPOINT(
+ [todo] WERROR srvsvc_NETRDFSDELETEEXITPOINT(
);
/******************/
/* Function: 0x32 */
- WERROR srvsvc_NETRDFSMODIFYPREFIX(
+ [todo] WERROR srvsvc_NETRDFSMODIFYPREFIX(
);
/******************/
/* Function: 0x33 */
- WERROR srvsvc_NETRDFSFIXLOCALVOLUME(
+ [todo] WERROR srvsvc_NETRDFSFIXLOCALVOLUME(
);
/******************/
/* Function: 0x34 */
- WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO(
+ [todo] WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO(
);
/******************/
/* Function: 0x35 */
- WERROR srvsvc_NETRSERVERTRANSPORTDELEX(
+ [todo] WERROR srvsvc_NETRSERVERTRANSPORTDELEX(
);
}
diff --git a/source4/librpc/idl/svcctl.idl b/source4/librpc/idl/svcctl.idl
index 8f368ef878..615f4e3dab 100644
--- a/source4/librpc/idl/svcctl.idl
+++ b/source4/librpc/idl/svcctl.idl
@@ -115,12 +115,12 @@ import "misc.idl";
/*****************/
/* Function 0x04 */
- WERROR svcctl_QueryServiceObjectSecurity(
+ [todo] WERROR svcctl_QueryServiceObjectSecurity(
);
/*****************/
/* Function 0x05 */
- WERROR svcctl_SetServiceObjectSecurity(
+ [todo] WERROR svcctl_SetServiceObjectSecurity(
);
/*****************/
@@ -132,7 +132,7 @@ import "misc.idl";
/*****************/
/* Function 0x07 */
- WERROR svcctl_SetServiceStatus(
+ [todo] WERROR svcctl_SetServiceStatus(
);
/*****************/
@@ -143,7 +143,7 @@ import "misc.idl";
/*****************/
/* Function 0x09 */
- WERROR svcctl_NotifyBootConfigStatus(
+ [todo] WERROR svcctl_NotifyBootConfigStatus(
);
/*****************/
@@ -408,12 +408,12 @@ import "misc.idl";
/*****************/
/* Function 0x22 */
- WERROR svcctl_GetCurrentGroupeStateW(
+ [todo] WERROR svcctl_GetCurrentGroupeStateW(
);
/*****************/
/* Function 0x23 */
- WERROR svcctl_EnumServiceGroupW(
+ [todo] WERROR svcctl_EnumServiceGroupW(
);
/*****************/
@@ -494,6 +494,6 @@ import "misc.idl";
/*****************/
/* Function 0x2b */
- WERROR svcctl_SCSendTSMessage(
+ [todo] WERROR svcctl_SCSendTSMessage(
);
}
diff --git a/source4/librpc/idl/w32time.idl b/source4/librpc/idl/w32time.idl
index c3c6e014de..4839899629 100644
--- a/source4/librpc/idl/w32time.idl
+++ b/source4/librpc/idl/w32time.idl
@@ -14,8 +14,8 @@ interface w32time
/*****************/
/* Function 0x00 */
- WERROR w32time_SyncTime();
+ [todo] WERROR w32time_SyncTime();
- WERROR w32time_GetNetLogonServiceBits();
- WERROR w32time_QueryProviderStatus();
+ [todo] WERROR w32time_GetNetLogonServiceBits();
+ [todo] WERROR w32time_QueryProviderStatus();
}
diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl
index 5e5d5542b6..1e01a91197 100644
--- a/source4/librpc/idl/winreg.idl
+++ b/source4/librpc/idl/winreg.idl
@@ -249,7 +249,7 @@ import "lsa.idl", "security.idl";
/******************/
/* Function: 0x12 */
- WERROR winreg_ReplaceKey(
+ [todo] WERROR winreg_ReplaceKey(
);
/******************/
@@ -295,7 +295,7 @@ import "lsa.idl", "security.idl";
/******************/
/* Function: 0x17 */
- WERROR winreg_UnLoadKey(
+ [todo] WERROR winreg_UnLoadKey(
);
/******************/
@@ -375,7 +375,7 @@ import "lsa.idl", "security.idl";
/******************/
/* Function: 0x1f */
- WERROR winreg_SaveKeyEx(
+ [todo] WERROR winreg_SaveKeyEx(
);
/******************/
@@ -396,6 +396,6 @@ import "lsa.idl", "security.idl";
/******************/
/* Function: 0x22 */
- WERROR winreg_QueryMultipleValues2(
+ [todo] WERROR winreg_QueryMultipleValues2(
);
}
diff --git a/source4/librpc/idl/xattr.idl b/source4/librpc/idl/xattr.idl
index 7e73baee7d..2010d51ce1 100644
--- a/source4/librpc/idl/xattr.idl
+++ b/source4/librpc/idl/xattr.idl
@@ -31,8 +31,14 @@ interface xattr
NTTIME change_time;
} xattr_DosInfo1;
- const int XATTR_ATTRIB_FLAG_STICKY_WRITE_TIME = 0x1;
+/*
+ We use xattrDosInfo1 again when we store values.
+ Because the sticky write time is now stored in the opendb
+ and xattr_DosInfo2Old is only present to parse existing
+ values from disk.
+ const int XATTR_ATTRIB_FLAG_STICKY_WRITE_TIME = 0x1;
+*/
typedef struct {
uint32 flags;
uint32 attrib;
@@ -43,11 +49,11 @@ interface xattr
NTTIME change_time;
NTTIME write_time; /* only used when sticky write time is set */
utf8string name;
- } xattr_DosInfo2;
+ } xattr_DosInfo2Old;
typedef [switch_type(uint16)] union {
[case(1)] xattr_DosInfo1 info1;
- [case(2)] xattr_DosInfo2 info2;
+ [case(2)] xattr_DosInfo2Old oldinfo2;
} xattr_DosInfo;
typedef [public] struct {
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index 2439c386db..b719be2bab 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -336,6 +336,10 @@ enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const
enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags);
+enum ndr_err_code ndr_push_dom_sid0(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
+enum ndr_err_code ndr_pull_dom_sid0(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
+void ndr_print_dom_sid0(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
+size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags);
void ndr_print_ipv4_addr(struct ndr_print *ndr, const char *name, const struct in_addr *_ip);
void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid);
enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, const void *p, ndr_push_flags_fn_t fn);
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index 93a177f94e..1d2b47c850 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -196,7 +196,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, u
*/
_PUBLIC_ enum ndr_err_code ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v)
{
- intptr_t h;
+ uintptr_t h;
NDR_PULL_ALIGN(ndr, sizeof(h));
NDR_PULL_NEED_BYTES(ndr, sizeof(h));
memcpy(&h, ndr->data+ndr->offset, sizeof(h));
@@ -393,7 +393,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, u
*/
_PUBLIC_ enum ndr_err_code ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v)
{
- intptr_t h = (intptr_t)v;
+ uintptr_t h = (intptr_t)v;
NDR_PUSH_ALIGN(ndr, sizeof(h));
NDR_PUSH_NEED_BYTES(ndr, sizeof(h));
memcpy(ndr->data+ndr->offset, &h, sizeof(h));
diff --git a/source4/librpc/ndr/ndr_sec_helper.c b/source4/librpc/ndr/ndr_sec_helper.c
index 5a0178bd25..1256d7dd2d 100644
--- a/source4/librpc/ndr/ndr_sec_helper.c
+++ b/source4/librpc/ndr/ndr_sec_helper.c
@@ -48,6 +48,11 @@ size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags)
return 8 + 4*sid->num_auths;
}
+size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags)
+{
+ return ndr_size_dom_sid28(sid, flags);
+}
+
/*
return the wire size of a security_ace
*/
@@ -128,6 +133,11 @@ void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct d
ndr_print_dom_sid(ndr, name, sid);
}
+void ndr_print_dom_sid0(struct ndr_print *ndr, const char *name, const struct dom_sid *sid)
+{
+ ndr_print_dom_sid(ndr, name, sid);
+}
+
/*
parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field
@@ -225,3 +235,44 @@ enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const
return NDR_ERR_SUCCESS;
}
+/*
+ parse a dom_sid0 - this is a dom_sid in a variable byte buffer, which is maybe empty
+*/
+enum ndr_err_code ndr_pull_dom_sid0(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
+{
+ if (!(ndr_flags & NDR_SCALARS)) {
+ return NDR_ERR_SUCCESS;
+ }
+
+ if (ndr->data_size == ndr->offset) {
+ ZERO_STRUCTP(sid);
+ return NDR_ERR_SUCCESS;
+ }
+
+ return ndr_pull_dom_sid(ndr, ndr_flags, sid);
+}
+
+/*
+ push a dom_sid0 - this is a dom_sid in a variable byte buffer, which is maybe empty
+*/
+enum ndr_err_code ndr_push_dom_sid0(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid)
+{
+ struct dom_sid zero_sid;
+
+ if (!(ndr_flags & NDR_SCALARS)) {
+ return NDR_ERR_SUCCESS;
+ }
+
+ if (!sid) {
+ return NDR_ERR_SUCCESS;
+ }
+
+ ZERO_STRUCT(zero_sid);
+
+ if (memcmp(&zero_sid, sid, sizeof(zero_sid)) == 0) {
+ return NDR_ERR_SUCCESS;
+ }
+
+ return ndr_push_dom_sid(ndr, ndr_flags, sid);
+}
+
diff --git a/source4/librpc/rpc/binding.c b/source4/librpc/rpc/binding.c
new file mode 100644
index 0000000000..ae88dce1be
--- /dev/null
+++ b/source4/librpc/rpc/binding.c
@@ -0,0 +1,724 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ dcerpc utility functions
+
+ Copyright (C) Andrew Tridgell 2003
+ Copyright (C) Jelmer Vernooij 2004
+ Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
+ Copyright (C) Rafal Szczesniak 2006
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include "lib/events/events.h"
+#include "librpc/gen_ndr/ndr_epmapper_c.h"
+#include "librpc/gen_ndr/ndr_dcerpc.h"
+#include "librpc/gen_ndr/ndr_misc.h"
+
+#define MAX_PROTSEQ 10
+
+static const struct {
+ const char *name;
+ enum dcerpc_transport_t transport;
+ int num_protocols;
+ enum epm_protocol protseq[MAX_PROTSEQ];
+} transports[] = {
+ { "ncacn_np", NCACN_NP, 3,
+ { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_SMB, EPM_PROTOCOL_NETBIOS }},
+ { "ncacn_ip_tcp", NCACN_IP_TCP, 3,
+ { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP, EPM_PROTOCOL_IP } },
+ { "ncacn_http", NCACN_HTTP, 3,
+ { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_HTTP, EPM_PROTOCOL_IP } },
+ { "ncadg_ip_udp", NCACN_IP_UDP, 3,
+ { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UDP, EPM_PROTOCOL_IP } },
+ { "ncalrpc", NCALRPC, 2,
+ { EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_PIPE } },
+ { "ncacn_unix_stream", NCACN_UNIX_STREAM, 2,
+ { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_UNIX_DS } },
+ { "ncadg_unix_dgram", NCADG_UNIX_DGRAM, 2,
+ { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UNIX_DS } },
+ { "ncacn_at_dsp", NCACN_AT_DSP, 3,
+ { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DSP } },
+ { "ncadg_at_ddp", NCADG_AT_DDP, 3,
+ { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DDP } },
+ { "ncacn_vns_ssp", NCACN_VNS_SPP, 3,
+ { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_SPP } },
+ { "ncacn_vns_ipc", NCACN_VNS_IPC, 3,
+ { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_IPC }, },
+ { "ncadg_ipx", NCADG_IPX, 2,
+ { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_IPX },
+ },
+ { "ncacn_spx", NCACN_SPX, 3,
+ /* I guess some MS programmer confused the identifier for
+ * EPM_PROTOCOL_UUID (0x0D or 13) with the one for
+ * EPM_PROTOCOL_SPX (0x13) here. -- jelmer*/
+ { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_UUID },
+ },
+};
+
+static const struct {
+ const char *name;
+ uint32_t flag;
+} ncacn_options[] = {
+ {"sign", DCERPC_SIGN},
+ {"seal", DCERPC_SEAL},
+ {"connect", DCERPC_CONNECT},
+ {"spnego", DCERPC_AUTH_SPNEGO},
+ {"ntlm", DCERPC_AUTH_NTLM},
+ {"krb5", DCERPC_AUTH_KRB5},
+ {"validate", DCERPC_DEBUG_VALIDATE_BOTH},
+ {"print", DCERPC_DEBUG_PRINT_BOTH},
+ {"padcheck", DCERPC_DEBUG_PAD_CHECK},
+ {"bigendian", DCERPC_PUSH_BIGENDIAN},
+ {"smb2", DCERPC_SMB2}
+};
+
+const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)
+{
+ struct ndr_syntax_id syntax;
+ NTSTATUS status;
+
+ switch(epm_floor->lhs.protocol) {
+ case EPM_PROTOCOL_UUID:
+ status = dcerpc_floor_get_lhs_data(epm_floor, &syntax);
+ if (NT_STATUS_IS_OK(status)) {
+ /* lhs is used: UUID */
+ char *uuidstr;
+
+ if (GUID_equal(&syntax.uuid, &ndr_transfer_syntax.uuid)) {
+ return "NDR";
+ }
+
+ if (GUID_equal(&syntax.uuid, &ndr64_transfer_syntax.uuid)) {
+ return "NDR64";
+ }
+
+ uuidstr = GUID_string(mem_ctx, &syntax.uuid);
+
+ return talloc_asprintf(mem_ctx, " uuid %s/0x%02x", uuidstr, syntax.if_version);
+ } else { /* IPX */
+ return talloc_asprintf(mem_ctx, "IPX:%s",
+ data_blob_hex_string(mem_ctx, &epm_floor->rhs.uuid.unknown));
+ }
+
+ case EPM_PROTOCOL_NCACN:
+ return "RPC-C";
+
+ case EPM_PROTOCOL_NCADG:
+ return "RPC";
+
+ case EPM_PROTOCOL_NCALRPC:
+ return "NCALRPC";
+
+ case EPM_PROTOCOL_DNET_NSP:
+ return "DNET/NSP";
+
+ case EPM_PROTOCOL_IP:
+ return talloc_asprintf(mem_ctx, "IP:%s", epm_floor->rhs.ip.ipaddr);
+
+ case EPM_PROTOCOL_PIPE:
+ return talloc_asprintf(mem_ctx, "PIPE:%s", epm_floor->rhs.pipe.path);
+
+ case EPM_PROTOCOL_SMB:
+ return talloc_asprintf(mem_ctx, "SMB:%s", epm_floor->rhs.smb.unc);
+
+ case EPM_PROTOCOL_UNIX_DS:
+ return talloc_asprintf(mem_ctx, "Unix:%s", epm_floor->rhs.unix_ds.path);
+
+ case EPM_PROTOCOL_NETBIOS:
+ return talloc_asprintf(mem_ctx, "NetBIOS:%s", epm_floor->rhs.netbios.name);
+
+ case EPM_PROTOCOL_NETBEUI:
+ return "NETBeui";
+
+ case EPM_PROTOCOL_SPX:
+ return "SPX";
+
+ case EPM_PROTOCOL_NB_IPX:
+ return "NB_IPX";
+
+ case EPM_PROTOCOL_HTTP:
+ return talloc_asprintf(mem_ctx, "HTTP:%d", epm_floor->rhs.http.port);
+
+ case EPM_PROTOCOL_TCP:
+ return talloc_asprintf(mem_ctx, "TCP:%d", epm_floor->rhs.tcp.port);
+
+ case EPM_PROTOCOL_UDP:
+ return talloc_asprintf(mem_ctx, "UDP:%d", epm_floor->rhs.udp.port);
+
+ default:
+ return talloc_asprintf(mem_ctx, "UNK(%02x):", epm_floor->lhs.protocol);
+ }
+}
+
+
+/*
+ form a binding string from a binding structure
+*/
+_PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b)
+{
+ char *s = talloc_strdup(mem_ctx, "");
+ int i;
+ const char *t_name = NULL;
+
+ if (b->transport != NCA_UNKNOWN) {
+ for (i=0;i<ARRAY_SIZE(transports);i++) {
+ if (transports[i].transport == b->transport) {
+ t_name = transports[i].name;
+ }
+ }
+ if (!t_name) {
+ return NULL;
+ }
+ }
+
+ if (!GUID_all_zero(&b->object.uuid)) {
+ s = talloc_asprintf(s, "%s@",
+ GUID_string(mem_ctx, &b->object.uuid));
+ }
+
+ if (t_name != NULL) {
+ s = talloc_asprintf_append_buffer(s, "%s:", t_name);
+ if (s == NULL) {
+ return NULL;
+ }
+ }
+
+ if (b->host) {
+ s = talloc_asprintf_append_buffer(s, "%s", b->host);
+ }
+
+ if (!b->endpoint && !b->options && !b->flags) {
+ return s;
+ }
+
+ s = talloc_asprintf_append_buffer(s, "[");
+
+ if (b->endpoint) {
+ s = talloc_asprintf_append_buffer(s, "%s", b->endpoint);
+ }
+
+ /* this is a *really* inefficent way of dealing with strings,
+ but this is rarely called and the strings are always short,
+ so I don't care */
+ for (i=0;b->options && b->options[i];i++) {
+ s = talloc_asprintf_append_buffer(s, ",%s", b->options[i]);
+ if (!s) return NULL;
+ }
+
+ for (i=0;i<ARRAY_SIZE(ncacn_options);i++) {
+ if (b->flags & ncacn_options[i].flag) {
+ s = talloc_asprintf_append_buffer(s, ",%s", ncacn_options[i].name);
+ if (!s) return NULL;
+ }
+ }
+
+ s = talloc_asprintf_append_buffer(s, "]");
+
+ return s;
+}
+
+/*
+ parse a binding string into a dcerpc_binding structure
+*/
+_PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out)
+{
+ struct dcerpc_binding *b;
+ char *options;
+ char *p;
+ int i, j, comma_count;
+
+ b = talloc(mem_ctx, struct dcerpc_binding);
+ if (!b) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ p = strchr(s, '@');
+
+ if (p && PTR_DIFF(p, s) == 36) { /* 36 is the length of a UUID */
+ NTSTATUS status;
+
+ status = GUID_from_string(s, &b->object.uuid);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ DEBUG(0, ("Failed parsing UUID\n"));
+ return status;
+ }
+
+ s = p + 1;
+ } else {
+ ZERO_STRUCT(b->object);
+ }
+
+ b->object.if_version = 0;
+
+ p = strchr(s, ':');
+
+ if (p == NULL) {
+ b->transport = NCA_UNKNOWN;
+ } else {
+ char *type = talloc_strndup(mem_ctx, s, PTR_DIFF(p, s));
+ if (!type) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ for (i=0;i<ARRAY_SIZE(transports);i++) {
+ if (strcasecmp(type, transports[i].name) == 0) {
+ b->transport = transports[i].transport;
+ break;
+ }
+ }
+
+ if (i==ARRAY_SIZE(transports)) {
+ DEBUG(0,("Unknown dcerpc transport '%s'\n", type));
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ talloc_free(type);
+
+ s = p+1;
+ }
+
+ p = strchr(s, '[');
+ if (p) {
+ b->host = talloc_strndup(b, s, PTR_DIFF(p, s));
+ options = talloc_strdup(mem_ctx, p+1);
+ if (options[strlen(options)-1] != ']') {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+ options[strlen(options)-1] = 0;
+ } else {
+ b->host = talloc_strdup(b, s);
+ options = NULL;
+ }
+ if (!b->host) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ b->target_hostname = b->host;
+
+ b->options = NULL;
+ b->flags = 0;
+ b->assoc_group_id = 0;
+ b->endpoint = NULL;
+
+ if (!options) {
+ *b_out = b;
+ return NT_STATUS_OK;
+ }
+
+ comma_count = count_chars(options, ',');
+
+ b->options = talloc_array(b, const char *, comma_count+2);
+ if (!b->options) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ for (i=0; (p = strchr(options, ',')); i++) {
+ b->options[i] = talloc_strndup(b, options, PTR_DIFF(p, options));
+ if (!b->options[i]) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ options = p+1;
+ }
+ b->options[i] = options;
+ b->options[i+1] = NULL;
+
+ /* some options are pre-parsed for convenience */
+ for (i=0;b->options[i];i++) {
+ for (j=0;j<ARRAY_SIZE(ncacn_options);j++) {
+ if (strcasecmp(ncacn_options[j].name, b->options[i]) == 0) {
+ int k;
+ b->flags |= ncacn_options[j].flag;
+ for (k=i;b->options[k];k++) {
+ b->options[k] = b->options[k+1];
+ }
+ i--;
+ break;
+ }
+ }
+ }
+
+ if (b->options[0]) {
+ /* Endpoint is first option */
+ b->endpoint = b->options[0];
+ if (strlen(b->endpoint) == 0) b->endpoint = NULL;
+
+ for (i=0;b->options[i];i++) {
+ b->options[i] = b->options[i+1];
+ }
+ }
+
+ if (b->options[0] == NULL)
+ b->options = NULL;
+
+ *b_out = b;
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax)
+{
+ TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data");
+ struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
+ enum ndr_err_code ndr_err;
+ uint16_t if_version=0;
+
+ ndr->flags |= LIBNDR_FLAG_NOALIGN;
+
+ ndr_err = ndr_pull_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(mem_ctx);
+ return ndr_map_error2ntstatus(ndr_err);
+ }
+
+ ndr_err = ndr_pull_uint16(ndr, NDR_SCALARS, &if_version);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(mem_ctx);
+ return ndr_map_error2ntstatus(ndr_err);
+ }
+
+ syntax->if_version = if_version;
+
+ talloc_free(mem_ctx);
+
+ return NT_STATUS_OK;
+}
+
+static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax)
+{
+ struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx, NULL);
+
+ ndr->flags |= LIBNDR_FLAG_NOALIGN;
+
+ ndr_push_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
+ ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version);
+
+ return ndr_push_blob(ndr);
+}
+
+const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)
+{
+ switch (epm_floor->lhs.protocol) {
+ case EPM_PROTOCOL_TCP:
+ if (epm_floor->rhs.tcp.port == 0) return NULL;
+ return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.tcp.port);
+
+ case EPM_PROTOCOL_UDP:
+ if (epm_floor->rhs.udp.port == 0) return NULL;
+ return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.udp.port);
+
+ case EPM_PROTOCOL_HTTP:
+ if (epm_floor->rhs.http.port == 0) return NULL;
+ return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.http.port);
+
+ case EPM_PROTOCOL_IP:
+ return talloc_strdup(mem_ctx, epm_floor->rhs.ip.ipaddr);
+
+ case EPM_PROTOCOL_NCACN:
+ return NULL;
+
+ case EPM_PROTOCOL_NCADG:
+ return NULL;
+
+ case EPM_PROTOCOL_SMB:
+ if (strlen(epm_floor->rhs.smb.unc) == 0) return NULL;
+ return talloc_strdup(mem_ctx, epm_floor->rhs.smb.unc);
+
+ case EPM_PROTOCOL_PIPE:
+ if (strlen(epm_floor->rhs.pipe.path) == 0) return NULL;
+ return talloc_strdup(mem_ctx, epm_floor->rhs.pipe.path);
+
+ case EPM_PROTOCOL_NETBIOS:
+ if (strlen(epm_floor->rhs.netbios.name) == 0) return NULL;
+ return talloc_strdup(mem_ctx, epm_floor->rhs.netbios.name);
+
+ case EPM_PROTOCOL_NCALRPC:
+ return NULL;
+
+ case EPM_PROTOCOL_VINES_SPP:
+ return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_spp.port);
+
+ case EPM_PROTOCOL_VINES_IPC:
+ return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_ipc.port);
+
+ case EPM_PROTOCOL_STREETTALK:
+ return talloc_strdup(mem_ctx, epm_floor->rhs.streettalk.streettalk);
+
+ case EPM_PROTOCOL_UNIX_DS:
+ if (strlen(epm_floor->rhs.unix_ds.path) == 0) return NULL;
+ return talloc_strdup(mem_ctx, epm_floor->rhs.unix_ds.path);
+
+ case EPM_PROTOCOL_NULL:
+ return NULL;
+
+ default:
+ DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol));
+ break;
+ }
+
+ return NULL;
+}
+
+static NTSTATUS dcerpc_floor_set_rhs_data(TALLOC_CTX *mem_ctx,
+ struct epm_floor *epm_floor,
+ const char *data)
+{
+ switch (epm_floor->lhs.protocol) {
+ case EPM_PROTOCOL_TCP:
+ epm_floor->rhs.tcp.port = atoi(data);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_UDP:
+ epm_floor->rhs.udp.port = atoi(data);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_HTTP:
+ epm_floor->rhs.http.port = atoi(data);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_IP:
+ epm_floor->rhs.ip.ipaddr = talloc_strdup(mem_ctx, data);
+ NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.ip.ipaddr);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_NCACN:
+ epm_floor->rhs.ncacn.minor_version = 0;
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_NCADG:
+ epm_floor->rhs.ncadg.minor_version = 0;
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_SMB:
+ epm_floor->rhs.smb.unc = talloc_strdup(mem_ctx, data);
+ NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.smb.unc);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_PIPE:
+ epm_floor->rhs.pipe.path = talloc_strdup(mem_ctx, data);
+ NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.pipe.path);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_NETBIOS:
+ epm_floor->rhs.netbios.name = talloc_strdup(mem_ctx, data);
+ NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.netbios.name);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_NCALRPC:
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_VINES_SPP:
+ epm_floor->rhs.vines_spp.port = atoi(data);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_VINES_IPC:
+ epm_floor->rhs.vines_ipc.port = atoi(data);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_STREETTALK:
+ epm_floor->rhs.streettalk.streettalk = talloc_strdup(mem_ctx, data);
+ NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.streettalk.streettalk);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_UNIX_DS:
+ epm_floor->rhs.unix_ds.path = talloc_strdup(mem_ctx, data);
+ NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.unix_ds.path);
+ return NT_STATUS_OK;
+
+ case EPM_PROTOCOL_NULL:
+ return NT_STATUS_OK;
+
+ default:
+ DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol));
+ break;
+ }
+
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
+enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot)
+{
+ int i;
+
+ /* Find a transport that has 'prot' as 4th protocol */
+ for (i=0;i<ARRAY_SIZE(transports);i++) {
+ if (transports[i].num_protocols >= 2 &&
+ transports[i].protseq[1] == prot) {
+ return transports[i].transport;
+ }
+ }
+
+ /* Unknown transport */
+ return (unsigned int)-1;
+}
+
+_PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower)
+{
+ int i;
+
+ /* Find a transport that matches this tower */
+ for (i=0;i<ARRAY_SIZE(transports);i++) {
+ int j;
+ if (transports[i].num_protocols != tower->num_floors - 2) {
+ continue;
+ }
+
+ for (j = 0; j < transports[i].num_protocols; j++) {
+ if (transports[i].protseq[j] != tower->floors[j+2].lhs.protocol) {
+ break;
+ }
+ }
+
+ if (j == transports[i].num_protocols) {
+ return transports[i].transport;
+ }
+ }
+
+ /* Unknown transport */
+ return (unsigned int)-1;
+}
+
+_PUBLIC_ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx,
+ struct epm_tower *tower,
+ struct dcerpc_binding **b_out)
+{
+ NTSTATUS status;
+ struct dcerpc_binding *binding;
+
+ binding = talloc(mem_ctx, struct dcerpc_binding);
+ NT_STATUS_HAVE_NO_MEMORY(binding);
+
+ ZERO_STRUCT(binding->object);
+ binding->options = NULL;
+ binding->host = NULL;
+ binding->target_hostname = NULL;
+ binding->flags = 0;
+ binding->assoc_group_id = 0;
+
+ binding->transport = dcerpc_transport_by_tower(tower);
+
+ if (binding->transport == (unsigned int)-1) {
+ return NT_STATUS_NOT_SUPPORTED;
+ }
+
+ if (tower->num_floors < 1) {
+ return NT_STATUS_OK;
+ }
+
+ /* Set object uuid */
+ status = dcerpc_floor_get_lhs_data(&tower->floors[0], &binding->object);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("Error pulling object uuid and version: %s", nt_errstr(status)));
+ return status;
+ }
+
+ /* Ignore floor 1, it contains the NDR version info */
+
+ binding->options = NULL;
+
+ /* Set endpoint */
+ if (tower->num_floors >= 4) {
+ binding->endpoint = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[3]);
+ } else {
+ binding->endpoint = NULL;
+ }
+
+ /* Set network address */
+ if (tower->num_floors >= 5) {
+ binding->host = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[4]);
+ NT_STATUS_HAVE_NO_MEMORY(binding->host);
+ binding->target_hostname = binding->host;
+ }
+ *b_out = binding;
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, struct epm_tower *tower)
+{
+ const enum epm_protocol *protseq = NULL;
+ int num_protocols = -1, i;
+ NTSTATUS status;
+
+ /* Find transport */
+ for (i=0;i<ARRAY_SIZE(transports);i++) {
+ if (transports[i].transport == binding->transport) {
+ protseq = transports[i].protseq;
+ num_protocols = transports[i].num_protocols;
+ break;
+ }
+ }
+
+ if (num_protocols == -1) {
+ DEBUG(0, ("Unable to find transport with id '%d'\n", binding->transport));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
+ tower->num_floors = 2 + num_protocols;
+ tower->floors = talloc_array(mem_ctx, struct epm_floor, tower->num_floors);
+
+ /* Floor 0 */
+ tower->floors[0].lhs.protocol = EPM_PROTOCOL_UUID;
+
+ tower->floors[0].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx, &binding->object);
+
+ tower->floors[0].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2);
+
+ /* Floor 1 */
+ tower->floors[1].lhs.protocol = EPM_PROTOCOL_UUID;
+
+ tower->floors[1].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx,
+ &ndr_transfer_syntax);
+
+ tower->floors[1].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2);
+
+ /* Floor 2 to num_protocols */
+ for (i = 0; i < num_protocols; i++) {
+ tower->floors[2 + i].lhs.protocol = protseq[i];
+ tower->floors[2 + i].lhs.lhs_data = data_blob_talloc(mem_ctx, NULL, 0);
+ ZERO_STRUCT(tower->floors[2 + i].rhs);
+ dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[2 + i], "");
+ }
+
+ /* The 4th floor contains the endpoint */
+ if (num_protocols >= 2 && binding->endpoint) {
+ status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[3], binding->endpoint);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+ }
+
+ /* The 5th contains the network address */
+ if (num_protocols >= 3 && binding->host) {
+ if (is_ipaddress(binding->host)) {
+ status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4],
+ binding->host);
+ } else {
+ /* note that we don't attempt to resolve the
+ name here - when we get a hostname here we
+ are in the client code, and want to put in
+ a wildcard all-zeros IP for the server to
+ fill in */
+ status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4],
+ "0.0.0.0");
+ }
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+ }
+
+ return NT_STATUS_OK;
+}
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 5e32f6f5bf..4758189d3b 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -67,22 +67,15 @@ static struct dcerpc_connection *dcerpc_connection_init(TALLOC_CTX *mem_ctx,
return NULL;
}
- if (ev == NULL) {
- ev = event_context_init(c);
- if (ev == NULL) {
- talloc_free(c);
- return NULL;
- }
- }
-
c->iconv_convenience = talloc_reference(c, ic);
- c->event_ctx = ev;
-
- if (!talloc_reference(c, ev)) {
+ c->event_ctx = talloc_reference(c, ev);
+
+ if (c->event_ctx == NULL) {
talloc_free(c);
return NULL;
}
+
c->call_id = 1;
c->security_state.auth_info = NULL;
c->security_state.session_key = dcerpc_generic_session_key;
diff --git a/source4/librpc/rpc/dcerpc.py b/source4/librpc/rpc/dcerpc.py
index 7e4d82d7c4..db5b95cee8 100644
--- a/source4/librpc/rpc/dcerpc.py
+++ b/source4/librpc/rpc/dcerpc.py
@@ -1,5 +1,5 @@
# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.33
+# Version 1.3.35
#
# Don't modify this file, modify the SWIG interface instead.
@@ -57,8 +57,6 @@ def _swig_setattr_nondynamic_method(set):
return set_attr
-import credentials
-import param
pipe_connect = _dcerpc.pipe_connect
dcerpc_server_name = _dcerpc.dcerpc_server_name
diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c
index cc7f2ddbaa..a22cad9a4a 100644
--- a/source4/librpc/rpc/dcerpc_connect.c
+++ b/source4/librpc/rpc/dcerpc_connect.c
@@ -717,12 +717,6 @@ _PUBLIC_ struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent
struct pipe_connect_state *s;
struct event_context *new_ev = NULL;
- if (ev == NULL) {
- new_ev = event_context_init(parent_ctx);
- if (new_ev == NULL) return NULL;
- ev = new_ev;
- }
-
/* composite context allocation and setup */
c = composite_create(parent_ctx, ev);
if (c == NULL) {
@@ -844,21 +838,12 @@ _PUBLIC_ struct composite_context* dcerpc_pipe_connect_send(TALLOC_CTX *parent_c
struct pipe_conn_state *s;
struct dcerpc_binding *b;
struct composite_context *pipe_conn_req;
- struct event_context *new_ev = NULL;
-
- if (ev == NULL) {
- new_ev = event_context_init(parent_ctx);
- if (new_ev == NULL) return NULL;
- ev = new_ev;
- }
/* composite context allocation and setup */
c = composite_create(parent_ctx, ev);
if (c == NULL) {
- talloc_free(new_ev);
return NULL;
}
- talloc_steal(c, new_ev);
s = talloc_zero(c, struct pipe_conn_state);
if (composite_nomem(s, c)) return c;
diff --git a/source4/librpc/rpc/dcerpc_smb2.c b/source4/librpc/rpc/dcerpc_smb2.c
index 8adca4caba..4767165fba 100644
--- a/source4/librpc/rpc/dcerpc_smb2.c
+++ b/source4/librpc/rpc/dcerpc_smb2.c
@@ -83,7 +83,7 @@ static void smb2_read_callback(struct smb2_request *req)
uint16_t frag_length;
NTSTATUS status;
- state = talloc_get_type(req->async.private, struct smb2_read_state);
+ state = talloc_get_type(req->async.private_data, struct smb2_read_state);
smb = talloc_get_type(state->c->transport.private_data, struct smb2_private);
status = smb2_read_recv(req, state, &io);
@@ -136,7 +136,7 @@ static void smb2_read_callback(struct smb2_request *req)
}
req->async.fn = smb2_read_callback;
- req->async.private = state;
+ req->async.private_data = state;
}
@@ -180,7 +180,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO
}
req->async.fn = smb2_read_callback;
- req->async.private = state;
+ req->async.private_data = state;
return NT_STATUS_OK;
}
@@ -212,7 +212,7 @@ struct smb2_trans_state {
*/
static void smb2_trans_callback(struct smb2_request *req)
{
- struct smb2_trans_state *state = talloc_get_type(req->async.private,
+ struct smb2_trans_state *state = talloc_get_type(req->async.private_data,
struct smb2_trans_state);
struct dcerpc_connection *c = state->c;
NTSTATUS status;
@@ -269,7 +269,7 @@ static NTSTATUS smb2_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *
}
req->async.fn = smb2_trans_callback;
- req->async.private = state;
+ req->async.private_data = state;
talloc_steal(state, req);
@@ -281,7 +281,7 @@ static NTSTATUS smb2_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *
*/
static void smb2_write_callback(struct smb2_request *req)
{
- struct dcerpc_connection *c = (struct dcerpc_connection *)req->async.private;
+ struct dcerpc_connection *c = (struct dcerpc_connection *)req->async.private_data;
if (!NT_STATUS_IS_OK(req->status)) {
DEBUG(0,("dcerpc_smb2: write callback error\n"));
@@ -319,7 +319,7 @@ static NTSTATUS smb2_send_request(struct dcerpc_connection *c, DATA_BLOB *blob,
}
req->async.fn = smb2_write_callback;
- req->async.private = c;
+ req->async.private_data = c;
return NT_STATUS_OK;
}
@@ -444,7 +444,7 @@ struct composite_context *dcerpc_pipe_open_smb2_send(struct dcerpc_pipe *p,
static void pipe_open_recv(struct smb2_request *req)
{
struct pipe_open_smb2_state *state =
- talloc_get_type(req->async.private,
+ talloc_get_type(req->async.private_data,
struct pipe_open_smb2_state);
struct composite_context *ctx = state->ctx;
struct dcerpc_connection *c = state->c;
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 3b8768ccc2..71c6d5f2cc 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -97,701 +97,6 @@ NTSTATUS ncacn_push_auth(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
-#define MAX_PROTSEQ 10
-
-static const struct {
- const char *name;
- enum dcerpc_transport_t transport;
- int num_protocols;
- enum epm_protocol protseq[MAX_PROTSEQ];
-} transports[] = {
- { "ncacn_np", NCACN_NP, 3,
- { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_SMB, EPM_PROTOCOL_NETBIOS }},
- { "ncacn_ip_tcp", NCACN_IP_TCP, 3,
- { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP, EPM_PROTOCOL_IP } },
- { "ncacn_http", NCACN_HTTP, 3,
- { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_HTTP, EPM_PROTOCOL_IP } },
- { "ncadg_ip_udp", NCACN_IP_UDP, 3,
- { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UDP, EPM_PROTOCOL_IP } },
- { "ncalrpc", NCALRPC, 2,
- { EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_PIPE } },
- { "ncacn_unix_stream", NCACN_UNIX_STREAM, 2,
- { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_UNIX_DS } },
- { "ncadg_unix_dgram", NCADG_UNIX_DGRAM, 2,
- { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UNIX_DS } },
- { "ncacn_at_dsp", NCACN_AT_DSP, 3,
- { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DSP } },
- { "ncadg_at_ddp", NCADG_AT_DDP, 3,
- { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DDP } },
- { "ncacn_vns_ssp", NCACN_VNS_SPP, 3,
- { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_SPP } },
- { "ncacn_vns_ipc", NCACN_VNS_IPC, 3,
- { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_IPC }, },
- { "ncadg_ipx", NCADG_IPX, 2,
- { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_IPX },
- },
- { "ncacn_spx", NCACN_SPX, 3,
- /* I guess some MS programmer confused the identifier for
- * EPM_PROTOCOL_UUID (0x0D or 13) with the one for
- * EPM_PROTOCOL_SPX (0x13) here. -- jelmer*/
- { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_UUID },
- },
-};
-
-static const struct {
- const char *name;
- uint32_t flag;
-} ncacn_options[] = {
- {"sign", DCERPC_SIGN},
- {"seal", DCERPC_SEAL},
- {"connect", DCERPC_CONNECT},
- {"spnego", DCERPC_AUTH_SPNEGO},
- {"ntlm", DCERPC_AUTH_NTLM},
- {"krb5", DCERPC_AUTH_KRB5},
- {"validate", DCERPC_DEBUG_VALIDATE_BOTH},
- {"print", DCERPC_DEBUG_PRINT_BOTH},
- {"padcheck", DCERPC_DEBUG_PAD_CHECK},
- {"bigendian", DCERPC_PUSH_BIGENDIAN},
- {"smb2", DCERPC_SMB2}
-};
-
-const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)
-{
- struct ndr_syntax_id syntax;
- NTSTATUS status;
-
- switch(epm_floor->lhs.protocol) {
- case EPM_PROTOCOL_UUID:
- status = dcerpc_floor_get_lhs_data(epm_floor, &syntax);
- if (NT_STATUS_IS_OK(status)) {
- /* lhs is used: UUID */
- char *uuidstr;
-
- if (GUID_equal(&syntax.uuid, &ndr_transfer_syntax.uuid)) {
- return "NDR";
- }
-
- if (GUID_equal(&syntax.uuid, &ndr64_transfer_syntax.uuid)) {
- return "NDR64";
- }
-
- uuidstr = GUID_string(mem_ctx, &syntax.uuid);
-
- return talloc_asprintf(mem_ctx, " uuid %s/0x%02x", uuidstr, syntax.if_version);
- } else { /* IPX */
- return talloc_asprintf(mem_ctx, "IPX:%s",
- data_blob_hex_string(mem_ctx, &epm_floor->rhs.uuid.unknown));
- }
-
- case EPM_PROTOCOL_NCACN:
- return "RPC-C";
-
- case EPM_PROTOCOL_NCADG:
- return "RPC";
-
- case EPM_PROTOCOL_NCALRPC:
- return "NCALRPC";
-
- case EPM_PROTOCOL_DNET_NSP:
- return "DNET/NSP";
-
- case EPM_PROTOCOL_IP:
- return talloc_asprintf(mem_ctx, "IP:%s", epm_floor->rhs.ip.ipaddr);
-
- case EPM_PROTOCOL_PIPE:
- return talloc_asprintf(mem_ctx, "PIPE:%s", epm_floor->rhs.pipe.path);
-
- case EPM_PROTOCOL_SMB:
- return talloc_asprintf(mem_ctx, "SMB:%s", epm_floor->rhs.smb.unc);
-
- case EPM_PROTOCOL_UNIX_DS:
- return talloc_asprintf(mem_ctx, "Unix:%s", epm_floor->rhs.unix_ds.path);
-
- case EPM_PROTOCOL_NETBIOS:
- return talloc_asprintf(mem_ctx, "NetBIOS:%s", epm_floor->rhs.netbios.name);
-
- case EPM_PROTOCOL_NETBEUI:
- return "NETBeui";
-
- case EPM_PROTOCOL_SPX:
- return "SPX";
-
- case EPM_PROTOCOL_NB_IPX:
- return "NB_IPX";
-
- case EPM_PROTOCOL_HTTP:
- return talloc_asprintf(mem_ctx, "HTTP:%d", epm_floor->rhs.http.port);
-
- case EPM_PROTOCOL_TCP:
- return talloc_asprintf(mem_ctx, "TCP:%d", epm_floor->rhs.tcp.port);
-
- case EPM_PROTOCOL_UDP:
- return talloc_asprintf(mem_ctx, "UDP:%d", epm_floor->rhs.udp.port);
-
- default:
- return talloc_asprintf(mem_ctx, "UNK(%02x):", epm_floor->lhs.protocol);
- }
-}
-
-
-/*
- form a binding string from a binding structure
-*/
-_PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b)
-{
- char *s = talloc_strdup(mem_ctx, "");
- int i;
- const char *t_name = NULL;
-
- if (b->transport != NCA_UNKNOWN) {
- for (i=0;i<ARRAY_SIZE(transports);i++) {
- if (transports[i].transport == b->transport) {
- t_name = transports[i].name;
- }
- }
- if (!t_name) {
- return NULL;
- }
- }
-
- if (!GUID_all_zero(&b->object.uuid)) {
- s = talloc_asprintf(s, "%s@",
- GUID_string(mem_ctx, &b->object.uuid));
- }
-
- if (t_name != NULL) {
- s = talloc_asprintf_append_buffer(s, "%s:", t_name);
- if (s == NULL) {
- return NULL;
- }
- }
-
- if (b->host) {
- s = talloc_asprintf_append_buffer(s, "%s", b->host);
- }
-
- if (!b->endpoint && !b->options && !b->flags) {
- return s;
- }
-
- s = talloc_asprintf_append_buffer(s, "[");
-
- if (b->endpoint) {
- s = talloc_asprintf_append_buffer(s, "%s", b->endpoint);
- }
-
- /* this is a *really* inefficent way of dealing with strings,
- but this is rarely called and the strings are always short,
- so I don't care */
- for (i=0;b->options && b->options[i];i++) {
- s = talloc_asprintf_append_buffer(s, ",%s", b->options[i]);
- if (!s) return NULL;
- }
-
- for (i=0;i<ARRAY_SIZE(ncacn_options);i++) {
- if (b->flags & ncacn_options[i].flag) {
- s = talloc_asprintf_append_buffer(s, ",%s", ncacn_options[i].name);
- if (!s) return NULL;
- }
- }
-
- s = talloc_asprintf_append_buffer(s, "]");
-
- return s;
-}
-
-/*
- parse a binding string into a dcerpc_binding structure
-*/
-_PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out)
-{
- struct dcerpc_binding *b;
- char *options;
- char *p;
- int i, j, comma_count;
-
- b = talloc(mem_ctx, struct dcerpc_binding);
- if (!b) {
- return NT_STATUS_NO_MEMORY;
- }
-
- p = strchr(s, '@');
-
- if (p && PTR_DIFF(p, s) == 36) { /* 36 is the length of a UUID */
- NTSTATUS status;
-
- status = GUID_from_string(s, &b->object.uuid);
-
- if (NT_STATUS_IS_ERR(status)) {
- DEBUG(0, ("Failed parsing UUID\n"));
- return status;
- }
-
- s = p + 1;
- } else {
- ZERO_STRUCT(b->object);
- }
-
- b->object.if_version = 0;
-
- p = strchr(s, ':');
-
- if (p == NULL) {
- b->transport = NCA_UNKNOWN;
- } else {
- char *type = talloc_strndup(mem_ctx, s, PTR_DIFF(p, s));
- if (!type) {
- return NT_STATUS_NO_MEMORY;
- }
-
- for (i=0;i<ARRAY_SIZE(transports);i++) {
- if (strcasecmp(type, transports[i].name) == 0) {
- b->transport = transports[i].transport;
- break;
- }
- }
-
- if (i==ARRAY_SIZE(transports)) {
- DEBUG(0,("Unknown dcerpc transport '%s'\n", type));
- return NT_STATUS_INVALID_PARAMETER;
- }
-
- talloc_free(type);
-
- s = p+1;
- }
-
- p = strchr(s, '[');
- if (p) {
- b->host = talloc_strndup(b, s, PTR_DIFF(p, s));
- options = talloc_strdup(mem_ctx, p+1);
- if (options[strlen(options)-1] != ']') {
- return NT_STATUS_INVALID_PARAMETER;
- }
- options[strlen(options)-1] = 0;
- } else {
- b->host = talloc_strdup(b, s);
- options = NULL;
- }
- if (!b->host) {
- return NT_STATUS_NO_MEMORY;
- }
-
- b->target_hostname = b->host;
-
- b->options = NULL;
- b->flags = 0;
- b->assoc_group_id = 0;
- b->endpoint = NULL;
-
- if (!options) {
- *b_out = b;
- return NT_STATUS_OK;
- }
-
- comma_count = count_chars(options, ',');
-
- b->options = talloc_array(b, const char *, comma_count+2);
- if (!b->options) {
- return NT_STATUS_NO_MEMORY;
- }
-
- for (i=0; (p = strchr(options, ',')); i++) {
- b->options[i] = talloc_strndup(b, options, PTR_DIFF(p, options));
- if (!b->options[i]) {
- return NT_STATUS_NO_MEMORY;
- }
- options = p+1;
- }
- b->options[i] = options;
- b->options[i+1] = NULL;
-
- /* some options are pre-parsed for convenience */
- for (i=0;b->options[i];i++) {
- for (j=0;j<ARRAY_SIZE(ncacn_options);j++) {
- if (strcasecmp(ncacn_options[j].name, b->options[i]) == 0) {
- int k;
- b->flags |= ncacn_options[j].flag;
- for (k=i;b->options[k];k++) {
- b->options[k] = b->options[k+1];
- }
- i--;
- break;
- }
- }
- }
-
- if (b->options[0]) {
- /* Endpoint is first option */
- b->endpoint = b->options[0];
- if (strlen(b->endpoint) == 0) b->endpoint = NULL;
-
- for (i=0;b->options[i];i++) {
- b->options[i] = b->options[i+1];
- }
- }
-
- if (b->options[0] == NULL)
- b->options = NULL;
-
- *b_out = b;
- return NT_STATUS_OK;
-}
-
-_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax)
-{
- TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data");
- struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
- enum ndr_err_code ndr_err;
- uint16_t if_version=0;
-
- ndr->flags |= LIBNDR_FLAG_NOALIGN;
-
- ndr_err = ndr_pull_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(mem_ctx);
- return ndr_map_error2ntstatus(ndr_err);
- }
-
- ndr_err = ndr_pull_uint16(ndr, NDR_SCALARS, &if_version);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(mem_ctx);
- return ndr_map_error2ntstatus(ndr_err);
- }
-
- syntax->if_version = if_version;
-
- talloc_free(mem_ctx);
-
- return NT_STATUS_OK;
-}
-
-static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax)
-{
- struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx, NULL);
-
- ndr->flags |= LIBNDR_FLAG_NOALIGN;
-
- ndr_push_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
- ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version);
-
- return ndr_push_blob(ndr);
-}
-
-const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)
-{
- switch (epm_floor->lhs.protocol) {
- case EPM_PROTOCOL_TCP:
- if (epm_floor->rhs.tcp.port == 0) return NULL;
- return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.tcp.port);
-
- case EPM_PROTOCOL_UDP:
- if (epm_floor->rhs.udp.port == 0) return NULL;
- return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.udp.port);
-
- case EPM_PROTOCOL_HTTP:
- if (epm_floor->rhs.http.port == 0) return NULL;
- return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.http.port);
-
- case EPM_PROTOCOL_IP:
- return talloc_strdup(mem_ctx, epm_floor->rhs.ip.ipaddr);
-
- case EPM_PROTOCOL_NCACN:
- return NULL;
-
- case EPM_PROTOCOL_NCADG:
- return NULL;
-
- case EPM_PROTOCOL_SMB:
- if (strlen(epm_floor->rhs.smb.unc) == 0) return NULL;
- return talloc_strdup(mem_ctx, epm_floor->rhs.smb.unc);
-
- case EPM_PROTOCOL_PIPE:
- if (strlen(epm_floor->rhs.pipe.path) == 0) return NULL;
- return talloc_strdup(mem_ctx, epm_floor->rhs.pipe.path);
-
- case EPM_PROTOCOL_NETBIOS:
- if (strlen(epm_floor->rhs.netbios.name) == 0) return NULL;
- return talloc_strdup(mem_ctx, epm_floor->rhs.netbios.name);
-
- case EPM_PROTOCOL_NCALRPC:
- return NULL;
-
- case EPM_PROTOCOL_VINES_SPP:
- return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_spp.port);
-
- case EPM_PROTOCOL_VINES_IPC:
- return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_ipc.port);
-
- case EPM_PROTOCOL_STREETTALK:
- return talloc_strdup(mem_ctx, epm_floor->rhs.streettalk.streettalk);
-
- case EPM_PROTOCOL_UNIX_DS:
- if (strlen(epm_floor->rhs.unix_ds.path) == 0) return NULL;
- return talloc_strdup(mem_ctx, epm_floor->rhs.unix_ds.path);
-
- case EPM_PROTOCOL_NULL:
- return NULL;
-
- default:
- DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol));
- break;
- }
-
- return NULL;
-}
-
-static NTSTATUS dcerpc_floor_set_rhs_data(TALLOC_CTX *mem_ctx,
- struct epm_floor *epm_floor,
- const char *data)
-{
- switch (epm_floor->lhs.protocol) {
- case EPM_PROTOCOL_TCP:
- epm_floor->rhs.tcp.port = atoi(data);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_UDP:
- epm_floor->rhs.udp.port = atoi(data);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_HTTP:
- epm_floor->rhs.http.port = atoi(data);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_IP:
- epm_floor->rhs.ip.ipaddr = talloc_strdup(mem_ctx, data);
- NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.ip.ipaddr);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_NCACN:
- epm_floor->rhs.ncacn.minor_version = 0;
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_NCADG:
- epm_floor->rhs.ncadg.minor_version = 0;
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_SMB:
- epm_floor->rhs.smb.unc = talloc_strdup(mem_ctx, data);
- NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.smb.unc);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_PIPE:
- epm_floor->rhs.pipe.path = talloc_strdup(mem_ctx, data);
- NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.pipe.path);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_NETBIOS:
- epm_floor->rhs.netbios.name = talloc_strdup(mem_ctx, data);
- NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.netbios.name);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_NCALRPC:
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_VINES_SPP:
- epm_floor->rhs.vines_spp.port = atoi(data);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_VINES_IPC:
- epm_floor->rhs.vines_ipc.port = atoi(data);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_STREETTALK:
- epm_floor->rhs.streettalk.streettalk = talloc_strdup(mem_ctx, data);
- NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.streettalk.streettalk);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_UNIX_DS:
- epm_floor->rhs.unix_ds.path = talloc_strdup(mem_ctx, data);
- NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.unix_ds.path);
- return NT_STATUS_OK;
-
- case EPM_PROTOCOL_NULL:
- return NT_STATUS_OK;
-
- default:
- DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol));
- break;
- }
-
- return NT_STATUS_NOT_SUPPORTED;
-}
-
-enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot)
-{
- int i;
-
- /* Find a transport that has 'prot' as 4th protocol */
- for (i=0;i<ARRAY_SIZE(transports);i++) {
- if (transports[i].num_protocols >= 2 &&
- transports[i].protseq[1] == prot) {
- return transports[i].transport;
- }
- }
-
- /* Unknown transport */
- return (unsigned int)-1;
-}
-
-_PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower)
-{
- int i;
-
- /* Find a transport that matches this tower */
- for (i=0;i<ARRAY_SIZE(transports);i++) {
- int j;
- if (transports[i].num_protocols != tower->num_floors - 2) {
- continue;
- }
-
- for (j = 0; j < transports[i].num_protocols; j++) {
- if (transports[i].protseq[j] != tower->floors[j+2].lhs.protocol) {
- break;
- }
- }
-
- if (j == transports[i].num_protocols) {
- return transports[i].transport;
- }
- }
-
- /* Unknown transport */
- return (unsigned int)-1;
-}
-
-_PUBLIC_ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx,
- struct epm_tower *tower,
- struct dcerpc_binding **b_out)
-{
- NTSTATUS status;
- struct dcerpc_binding *binding;
-
- binding = talloc(mem_ctx, struct dcerpc_binding);
- NT_STATUS_HAVE_NO_MEMORY(binding);
-
- ZERO_STRUCT(binding->object);
- binding->options = NULL;
- binding->host = NULL;
- binding->target_hostname = NULL;
- binding->flags = 0;
- binding->assoc_group_id = 0;
-
- binding->transport = dcerpc_transport_by_tower(tower);
-
- if (binding->transport == (unsigned int)-1) {
- return NT_STATUS_NOT_SUPPORTED;
- }
-
- if (tower->num_floors < 1) {
- return NT_STATUS_OK;
- }
-
- /* Set object uuid */
- status = dcerpc_floor_get_lhs_data(&tower->floors[0], &binding->object);
-
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(1, ("Error pulling object uuid and version: %s", nt_errstr(status)));
- return status;
- }
-
- /* Ignore floor 1, it contains the NDR version info */
-
- binding->options = NULL;
-
- /* Set endpoint */
- if (tower->num_floors >= 4) {
- binding->endpoint = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[3]);
- } else {
- binding->endpoint = NULL;
- }
-
- /* Set network address */
- if (tower->num_floors >= 5) {
- binding->host = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[4]);
- NT_STATUS_HAVE_NO_MEMORY(binding->host);
- binding->target_hostname = binding->host;
- }
- *b_out = binding;
- return NT_STATUS_OK;
-}
-
-_PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, struct epm_tower *tower)
-{
- const enum epm_protocol *protseq = NULL;
- int num_protocols = -1, i;
- NTSTATUS status;
-
- /* Find transport */
- for (i=0;i<ARRAY_SIZE(transports);i++) {
- if (transports[i].transport == binding->transport) {
- protseq = transports[i].protseq;
- num_protocols = transports[i].num_protocols;
- break;
- }
- }
-
- if (num_protocols == -1) {
- DEBUG(0, ("Unable to find transport with id '%d'\n", binding->transport));
- return NT_STATUS_UNSUCCESSFUL;
- }
-
- tower->num_floors = 2 + num_protocols;
- tower->floors = talloc_array(mem_ctx, struct epm_floor, tower->num_floors);
-
- /* Floor 0 */
- tower->floors[0].lhs.protocol = EPM_PROTOCOL_UUID;
-
- tower->floors[0].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx, &binding->object);
-
- tower->floors[0].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2);
-
- /* Floor 1 */
- tower->floors[1].lhs.protocol = EPM_PROTOCOL_UUID;
-
- tower->floors[1].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx,
- &ndr_transfer_syntax);
-
- tower->floors[1].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2);
-
- /* Floor 2 to num_protocols */
- for (i = 0; i < num_protocols; i++) {
- tower->floors[2 + i].lhs.protocol = protseq[i];
- tower->floors[2 + i].lhs.lhs_data = data_blob_talloc(mem_ctx, NULL, 0);
- ZERO_STRUCT(tower->floors[2 + i].rhs);
- dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[2 + i], "");
- }
-
- /* The 4th floor contains the endpoint */
- if (num_protocols >= 2 && binding->endpoint) {
- status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[3], binding->endpoint);
- if (NT_STATUS_IS_ERR(status)) {
- return status;
- }
- }
-
- /* The 5th contains the network address */
- if (num_protocols >= 3 && binding->host) {
- if (is_ipaddress(binding->host)) {
- status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4],
- binding->host);
- } else {
- /* note that we don't attempt to resolve the
- name here - when we get a hostname here we
- are in the client code, and want to put in
- a wildcard all-zeros IP for the server to
- fill in */
- status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4],
- "0.0.0.0");
- }
- if (NT_STATUS_IS_ERR(status)) {
- return status;
- }
- }
-
- return NT_STATUS_OK;
-}
-
struct epm_map_binding_state {
struct dcerpc_binding *binding;
@@ -904,32 +209,20 @@ struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx,
struct epm_map_binding_state *s;
struct composite_context *pipe_connect_req;
struct cli_credentials *anon_creds;
- struct event_context *new_ev = NULL;
NTSTATUS status;
struct dcerpc_binding *epmapper_binding;
int i;
- /* Try to find event context in memory context in case passed
- * event_context (argument) was NULL. If there's none, just
- * create a new one.
- */
if (ev == NULL) {
- ev = event_context_find(mem_ctx);
- if (ev == NULL) {
- new_ev = event_context_init(mem_ctx);
- if (new_ev == NULL) return NULL;
- ev = new_ev;
- }
+ return NULL;
}
/* composite context allocation and setup */
c = composite_create(mem_ctx, ev);
if (c == NULL) {
- talloc_free(new_ev);
return NULL;
}
- talloc_steal(c, new_ev);
s = talloc_zero(c, struct epm_map_binding_state);
if (composite_nomem(s, c)) return c;
@@ -940,7 +233,6 @@ struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx,
/* anonymous credentials for rpc connection used to get endpoint mapping */
anon_creds = cli_credentials_init(mem_ctx);
- cli_credentials_set_event_context(anon_creds, ev);
cli_credentials_set_anonymous(anon_creds);
/*
diff --git a/source4/librpc/rpc/dcerpc_wrap.c b/source4/librpc/rpc/dcerpc_wrap.c
index bae41c2c22..ff5cdbd390 100644
--- a/source4/librpc/rpc/dcerpc_wrap.c
+++ b/source4/librpc/rpc/dcerpc_wrap.c
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.33
+ * Version 1.3.35
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
@@ -126,7 +126,7 @@
/* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "3"
+#define SWIG_RUNTIME_VERSION "4"
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
@@ -161,6 +161,7 @@
/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN 0x1
+#define SWIG_CAST_NEW_MEMORY 0x2
/* Flags for new pointer objects */
#define SWIG_POINTER_OWN 0x1
@@ -301,10 +302,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
extern "C" {
#endif
-typedef void *(*swig_converter_func)(void *);
+typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);
-/* Structure to store inforomation on one type */
+/* Structure to store information on one type */
typedef struct swig_type_info {
const char *name; /* mangled name of this type */
const char *str; /* human readable name of this type */
@@ -431,8 +432,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
- return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}
/*
@@ -856,7 +857,7 @@ SWIG_Python_AddErrorMsg(const char* mesg)
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_SetString(PyExc_RuntimeError, mesg);
}
}
@@ -1416,7 +1417,7 @@ PySwigObject_dealloc(PyObject *v)
{
PySwigObject *sobj = (PySwigObject *) v;
PyObject *next = sobj->next;
- if (sobj->own) {
+ if (sobj->own == SWIG_POINTER_OWN) {
swig_type_info *ty = sobj->ty;
PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
PyObject *destroy = data ? data->destroy : 0;
@@ -1434,12 +1435,13 @@ PySwigObject_dealloc(PyObject *v)
res = ((*meth)(mself, v));
}
Py_XDECREF(res);
- } else {
- const char *name = SWIG_TypePrettyName(ty);
+ }
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
- printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
-#endif
+ else {
+ const char *name = SWIG_TypePrettyName(ty);
+ printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
}
+#endif
}
Py_XDECREF(next);
PyObject_DEL(v);
@@ -1944,7 +1946,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
- if (own) {
+ if (own == SWIG_POINTER_OWN) {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
if (sobj) {
int oldown = sobj->own;
@@ -1965,6 +1967,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
return SWIG_OK;
} else {
PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+ if (own)
+ *own = 0;
while (sobj) {
void *vptr = sobj->ptr;
if (ty) {
@@ -1978,7 +1982,15 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
if (!tc) {
sobj = (PySwigObject *)sobj->next;
} else {
- if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+ if (ptr) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ if (newmemory == SWIG_CAST_NEW_MEMORY) {
+ assert(own);
+ if (own)
+ *own = *own | SWIG_CAST_NEW_MEMORY;
+ }
+ }
break;
}
}
@@ -1988,7 +2000,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
}
}
if (sobj) {
- if (own) *own = sobj->own;
+ if (own)
+ *own = *own | sobj->own;
if (flags & SWIG_POINTER_DISOWN) {
sobj->own = 0;
}
@@ -2053,8 +2066,13 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
}
if (ty) {
swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
- if (!tc) return SWIG_ERROR;
- *ptr = SWIG_TypeCast(tc,vptr);
+ if (tc) {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+ assert(!newmemory); /* newmemory handling not yet implemented */
+ } else {
+ return SWIG_ERROR;
+ }
} else {
*ptr = vptr;
}
@@ -2510,7 +2528,7 @@ static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0};
#define SWIG_name "_dcerpc"
-#define SWIGVERSION 0x010333
+#define SWIGVERSION 0x010335
#define SWIG_VERSION SWIGVERSION
@@ -2912,7 +2930,7 @@ SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
- int found;
+ int found, init;
clientdata = clientdata;
@@ -2922,6 +2940,9 @@ SWIG_InitializeModule(void *clientdata) {
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
swig_module.next = &swig_module;
+ init = 1;
+ } else {
+ init = 0;
}
/* Try and load any already created modules */
@@ -2950,6 +2971,12 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module;
}
+ /* When multiple interpeters are used, a module could have already been initialized in
+ a different interpreter, but not yet have a pointer in this interpreter.
+ In this case, we do not want to continue adding types... everything should be
+ set up already */
+ if (init == 0) return;
+
/* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: size %d\n", swig_module.size);
diff --git a/source4/librpc/scripts/build_idl.sh b/source4/librpc/scripts/build_idl.sh
new file mode 100755
index 0000000000..3f13b64a2e
--- /dev/null
+++ b/source4/librpc/scripts/build_idl.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+FULLBUILD=$1
+IDLDIR=$2
+OUTDIR=$3
+shift 3
+PIDL_EXTRA_ARGS="$*"
+
+[ -d $OUTDIR ] || mkdir -p $OUTDIR || exit 1
+
+PIDL="$PIDL --outputdir $OUTDIR --header --ndr-parser --server --client --swig --python $PIDL_EXTRA_ARGS"
+
+if [ x$FULLBUILD = xFULL ]; then
+ echo Rebuilding all idl files in $IDLDIR
+ $PIDL $IDLDIR/*.idl || exit 1
+ exit 0
+fi
+
+list=""
+
+for f in $IDLDIR/*.idl ; do
+ basename=`basename $f .idl`
+ ndr="$OUTDIR/ndr_$basename.c"
+ # blergh - most shells don't have the -nt function
+ if [ -f $ndr ]; then
+ if [ x`find $f -newer $ndr -print` = x$f ]; then
+ list="$list $f"
+ fi
+ else
+ list="$list $f"
+ fi
+done
+
+if [ "x$list" != x ]; then
+ $PIDL $list || exit 1
+fi
+
+exit 0