auth: Move auth_session_info into IDL
[samba.git] / source4 / librpc / wscript_build
index 790f1a34e47997536c9bfe1e7b4b5d4d246397d1..ce015ccaa52785763f41fa86401aeb9592827025 100755 (executable)
@@ -4,10 +4,10 @@ bld.RECURSE('../../librpc/idl')
 bld.RECURSE('../../librpc/tools')
 bld.RECURSE('idl')
 
-bld.SAMBA_SUBSYSTEM('NDR_SECURITY',
-       source='../../librpc/gen_ndr/ndr_security.c ../../librpc/ndr/ndr_sec_helper.c gen_ndr/ndr_server_id.c',
-       deps='ndr security',
-       public_headers='../../librpc/gen_ndr/security.h gen_ndr/server_id.h',
+bld.SAMBA_SUBSYSTEM('NDR_SERVER_ID4',
+       source='gen_ndr/ndr_server_id4.c',
+       deps='ndr',
+       public_headers='gen_ndr/server_id4.h',
        header_path='gen_ndr'
        )
 
@@ -52,7 +52,7 @@ bld.SAMBA_SUBSYSTEM('NDR_OPENDB',
 
 bld.SAMBA_SUBSYSTEM('NDR_NOTIFY',
        source='gen_ndr/ndr_s4_notify.c',
-       public_deps='ndr'
+       public_deps='ndr NDR_SERVER_ID4'
        )
 
 
@@ -73,19 +73,6 @@ bld.SAMBA_SUBSYSTEM('NDR_WINBIND',
        public_deps='NDR_IDMAP ndr ndr-standard'
        )
 
-
-bld.SAMBA_LIBRARY('ndr-standard',
-       source='../../librpc/gen_ndr/ndr_atsvc.c ../../librpc/gen_ndr/ndr_eventlog6.c',
-       vnum='0.0.1',
-       pc_files='../../librpc/ndr_standard.pc',
-       deps='''NDR_SECURITY NDR_LSA NDR_SAMR NDR_NETLOGON NDR_EVENTLOG NDR_DFS
-       NDR_NTSVCS NDR_SVCCTL NDR_INITSHUTDOWN NDR_WKSSVC NDR_SRVSVC NDR_WINREG
-       NDR_ECHO security NDR_DNS''',
-       public_deps='ndr',
-       public_headers='../../librpc/gen_ndr/samr.h ../../librpc/gen_ndr/ndr_samr.h ../../librpc/gen_ndr/lsa.h ../../librpc/gen_ndr/netlogon.h ../../librpc/gen_ndr/atsvc.h ../../librpc/gen_ndr/ndr_atsvc.h ../../librpc/gen_ndr/ndr_svcctl.h ../../librpc/gen_ndr/svcctl.h',
-       header_path='gen_ndr'
-       )
-
 # create a grouping library to consolidate our samba4 specific NDR code
 bld.SAMBA_LIBRARY('ndr-samba4',
        source=[],
@@ -105,19 +92,24 @@ bld.SAMBA_LIBRARY('dcerpc-samba4',
 
 bld.SAMBA_PIDL_TABLES('GEN_NDR_TABLES', 'gen_ndr/tables.c')
 
+if bld.env.enable_s3build:
+    s3_ndr = "NDR_WBINT"
+else:
+    s3_ndr = ""
+
 bld.SAMBA_SUBSYSTEM('ndr-table',
        source='../../librpc/ndr/ndr_table.c gen_ndr/tables.c',
         public_deps='''ndr-standard NDR_AUDIOSRV NDR_DSBACKUP NDR_EFS
         NDR_DRSUAPI NDR_POLICYAGENT NDR_UNIXINFO NDR_SPOOLSS NDR_EPMAPPER
         NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINSIF NDR_MGMT
         NDR_OXIDRESOLVER NDR_REMACT NDR_WZCSVC
-        NDR_BROWSER NDR_W32TIME NDR_SCERPC NDR_TRKWKS NDR_KEYSVC NDR_KRB5PAC
+        NDR_BROWSER NDR_W32TIME NDR_SCERPC NDR_TRKWKS NDR_KEYSVC ndr-krb5pac
         NDR_XATTR NDR_SCHANNEL NDR_ROT NDR_DRSBLOBS NDR_NBT NDR_WINSREPL
         NDR_SECURITY NDR_DNSSERVER NDR_WINSTATION NDR_IRPC NDR_OPENDB
         NDR_SASL_HELPERS NDR_NOTIFY NDR_WINBIND NDR_FRSRPC NDR_FRSAPI
         NDR_FRSTRANS NDR_NFS4ACL NDR_NTP_SIGND NDR_DCOM NDR_WMI
         NDR_NAMED_PIPE_AUTH NDR_NTLMSSP NDR_DFSBLOBS NDR_DNSP
-        NDR_NTPRINTING NDR_DNS NDR_BACKUPKEY NDR_PREG''',
+        NDR_NTPRINTING NDR_DNS NDR_BACKUPKEY NDR_PREG ''' + s3_ndr,
         depends_on='GEN_NDR_TABLES'
         )
 
@@ -134,20 +126,20 @@ bld.SAMBA_SUBSYSTEM('RPC_NDR_WINBIND',
 
 
 bld.SAMBA_LIBRARY('dcerpc-samr',
-       source='../../librpc/gen_ndr/ndr_samr_c.c',
+       source='',
        pc_files='dcerpc_samr.pc',
        vnum='0.0.1',
-       public_deps='dcerpc ndr-standard',
+       public_deps='dcerpc ndr-standard RPC_NDR_SAMR',
        public_headers='../../librpc/gen_ndr/ndr_samr_c.h',
        header_path='gen_ndr'
        )
 
 
 bld.SAMBA_LIBRARY('dcerpc-atsvc',
-       source='../../librpc/gen_ndr/ndr_atsvc_c.c',
+       source='',
        pc_files='dcerpc_atsvc.pc',
        vnum='0.0.1',
-       public_deps='dcerpc ndr-standard',
+       public_deps='dcerpc ndr-standard RPC_NDR_ATSVC',
        public_headers='../../librpc/gen_ndr/ndr_atsvc_c.h',
        header_path='gen_ndr'
        )
@@ -159,25 +151,26 @@ bld.SAMBA_SUBSYSTEM('RPC_NDR_WINSIF',
        )
 
 
-bld.SAMBA_SUBSYSTEM('NDR_DCERPC',
-       source='../../librpc/gen_ndr/ndr_dcerpc.c',
-       public_deps='ndr',
-       public_headers='rpc/dcerpc.h ../../librpc/gen_ndr/ndr_dcerpc.h ../../librpc/gen_ndr/dcerpc.h',
-       header_path= [ ('*gen_ndr*', 'gen_ndr') ],
-       )
-
 bld.SAMBA_LIBRARY('dcerpc',
        source='''rpc/dcerpc.c rpc/dcerpc_auth.c rpc/dcerpc_schannel.c
        rpc/dcerpc_util.c rpc/dcerpc_smb.c rpc/dcerpc_smb2.c rpc/dcerpc_sock.c
-       rpc/dcerpc_connect.c rpc/dcerpc_secondary.c ../../librpc/rpc/binding.c
-       ../../librpc/rpc/dcerpc_error.c ../../librpc/rpc/dcerpc_util.c
-       ../../librpc/rpc/binding_handle.c''',
+       rpc/dcerpc_connect.c rpc/dcerpc_secondary.c''',
        pc_files='dcerpc.pc',
-       deps='samba_socket LIBCLI_RESOLVE LIBCLI_SMB LIBCLI_SMB2 ndr NDR_DCERPC RPC_NDR_EPMAPPER NDR_SCHANNEL RPC_NDR_NETLOGON RPC_NDR_MGMT gensec LIBCLI_AUTH LIBCLI_RAW LP_RESOLVE UTIL_TEVENT',
+       deps='samba_socket LIBCLI_RESOLVE LIBCLI_SMB LIBCLI_SMB2 ndr NDR_DCERPC RPC_NDR_EPMAPPER NDR_SCHANNEL RPC_NDR_NETLOGON RPC_NDR_MGMT gensec LIBCLI_AUTH LIBCLI_RAW LP_RESOLVE UTIL_TEVENT rpccommon',
        autoproto='rpc/dcerpc_proto.h',
        public_deps='credentials tevent talloc',
-       public_headers='../../librpc/gen_ndr/mgmt.h ../../librpc/gen_ndr/ndr_mgmt.h ../../librpc/gen_ndr/ndr_mgmt_c.h ../../librpc/gen_ndr/epmapper.h ../../librpc/gen_ndr/ndr_epmapper.h ../../librpc/gen_ndr/ndr_epmapper_c.h',
-       header_path='gen_ndr',
+       public_headers='''rpc/dcerpc.h ../../librpc/gen_ndr/mgmt.h
+       ../../librpc/gen_ndr/ndr_mgmt.h ../../librpc/gen_ndr/ndr_mgmt_c.h
+       ../../librpc/gen_ndr/epmapper.h ../../librpc/gen_ndr/ndr_epmapper.h
+       ../../librpc/gen_ndr/ndr_epmapper_c.h ../../librpc/rpc/rpc_common.h''',
+       # It's very important to keep this form of construction
+       # it force the sambawaf extension to put everything that match the first element
+       # (*gen_ndr*) into the dir named by the second element (gen_ndr).
+       # If we just put header_path = 'gen_ndr' then all the public_headers will go
+       # in 'gen_ndr' and for dcerpc.h (at least) it will cause a problem as
+       # we have already a dcerpc.h installed by librpc/wscript_build
+       # and one will overright the other which is not what we expect.
+       header_path=[ ('*gen_ndr*', 'gen_ndr') ],
        vnum='0.0.1'
        )
 
@@ -206,6 +199,17 @@ bld.SAMBA_PYTHON('python_echo',
        realname='samba/dcerpc/echo.so'
        )
 
+bld.SAMBA_PYTHON('python_auth',
+       source='../../librpc/gen_ndr/py_auth.c',
+       deps='NDR_AUTH pytalloc-util pyrpc_util',
+       realname='samba/dcerpc/auth.so'
+       )
+
+bld.SAMBA_PYTHON('python_krb5pac',
+       source='../../librpc/gen_ndr/py_krb5pac.c',
+       deps='ndr-krb5pac pytalloc-util pyrpc_util',
+       realname='samba/dcerpc/krb5pac.so'
+       )
 
 bld.SAMBA_PYTHON('python_winreg',
        source='../../librpc/gen_ndr/py_winreg.c',
@@ -216,7 +220,7 @@ bld.SAMBA_PYTHON('python_winreg',
 
 bld.SAMBA_PYTHON('python_dcerpc_misc',
        source='../../librpc/gen_ndr/py_misc.c',
-       deps='pytalloc-util pyrpc_util NDR_KRB5PAC',
+       deps='pytalloc-util pyrpc_util ndr-krb5pac',
        realname='samba/dcerpc/misc.so'
        )