diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2019-10-31 16:28:28 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-12-10 07:50:28 +0000 |
commit | 7b265830ad6796dbbe721f7abfd62a19c2185b65 (patch) | |
tree | 86dea325c0e73ef5765b6768a1a8bfade35602d2 /librpc/idl | |
parent | ef5d79e24ba8aec226419e594de0cf91c24d7fc4 (diff) | |
download | samba-7b265830ad6796dbbe721f7abfd62a19c2185b65.tar.gz |
lib/fuzzing: add fuzz_ndr_X
This NDR fuzzer links with each "interface" in the IDL files to
create avsingle binary. This tries to matches what the fuzzing
engines desire.
It started as a copy of ndrdump but very little of that remains
in place.
The fancy build rules try to avoid needing a lof of boilerplate
in the wscript_build files and ensure new fuzzers are generated
and run when new IDL is added automatically.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'librpc/idl')
-rw-r--r-- | librpc/idl/wscript_build | 72 |
1 files changed, 59 insertions, 13 deletions
diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build index c9b19c4aac4..5dda944ca71 100644 --- a/librpc/idl/wscript_build +++ b/librpc/idl/wscript_build @@ -5,16 +5,26 @@ bld.SAMBA_PIDL_LIST('PIDL', eventlog.idl browser.idl dssetup.idl frsapi.idl spoolss.idl - dnsserver.idl echo.idl lsa.idl + dnsserver.idl samr.idl srvsvc.idl winreg.idl mgmt.idl netlogon.idl svcctl.idl wkssvc.idl eventlog6.idl backupkey.idl - fsrvp.idl witness.idl clusapi.idl - mdssvc.idl - winspool.idl''', + witness.idl clusapi.idl + mdssvc.idl''', options='--header --ndr-parser --samba3-ndr-server --server --client --python', output_dir='../gen_ndr') +# The interface names here are not the same as the IDL name, so the +# auto-genration of the fuzzer fails to link +bld.SAMBA_PIDL_LIST('PIDL', + '''echo.idl + fsrvp.idl + lsa.idl + winspool.idl''', + options='--header --ndr-parser --samba3-ndr-server --server --client --python', + output_dir='../gen_ndr', + generate_fuzzers=False) + # Services that we only have a client for bld.SAMBA_PIDL_LIST('PIDL', '''atsvc.idl''', @@ -23,26 +33,42 @@ bld.SAMBA_PIDL_LIST('PIDL', # Services that we only have a server in the source3 style bld.SAMBA_PIDL_LIST('PIDL', - '''dfs.idl initshutdown.idl ntsvcs.idl''', + '''initshutdown.idl ntsvcs.idl''', options='--header --ndr-parser --client --python --samba3-ndr-server', output_dir='../gen_ndr') -# Services that we only have a server in the source4 style +# The interface names here are not the same as the IDL name, so the +# auto-genration of the fuzzer fails to link +bld.SAMBA_PIDL_LIST('PIDL', + '''dfs.idl''', + options='--header --ndr-parser --client --python --samba3-ndr-server', + output_dir='../gen_ndr', + generate_fuzzers=False) + +# Services that we only have a server in the source4 style. + bld.SAMBA_PIDL_LIST('PIDL', '''unixinfo.idl''', options='--header --ndr-parser --client --python --server', output_dir='../gen_ndr') # DCOM stuff + +# The interface names here are not the same as the IDL name, so the +# auto-genration of the fuzzer fails to link bld.SAMBA_PIDL_LIST('PIDL', '''oxidresolver.idl remact.idl''', options='--header --ndr-parser --client', - output_dir='../gen_ndr') + output_dir='../gen_ndr', + generate_fuzzers=False) +# The interface names here are not the same as the IDL name, so the +# auto-genration of the fuzzer fails to link bld.SAMBA_PIDL_LIST('PIDL', 'wmi.idl dcom.idl', options='--header --ndr-parser --server --client --dcom-proxy --com-header', - output_dir='../gen_ndr') + output_dir='../gen_ndr', + generate_fuzzers=False) # DCE/RPC protocols which Samba does not implement a client or server # for @@ -50,13 +76,11 @@ bld.SAMBA_PIDL_LIST('PIDL', bld.SAMBA_PIDL_LIST('PIDL', ''' audiosrv.idl - dsbackup.idl efs.idl frstrans.idl frsrpc.idl keysvc.idl msgsvc.idl - orpc.idl policyagent.idl rot.idl scerpc.idl @@ -67,6 +91,18 @@ bld.SAMBA_PIDL_LIST('PIDL', options='--header --ndr-parser', output_dir='../gen_ndr') +# The interface names here are not the same as the IDL name, so the +# auto-genration of the fuzzer fails to link + +bld.SAMBA_PIDL_LIST('PIDL', + ''' + dsbackup.idl + orpc.idl + ''', + options='--header --ndr-parser', + output_dir='../gen_ndr', + generate_fuzzers=False) + # Non-DCE/RPC protocols encoded in IDL for Samba or helper IDLs for # DCE/RPC protocols (eg defining constands or structures but not # functions) @@ -78,14 +114,11 @@ bld.SAMBA_PIDL_LIST('PIDL', file_id.idl fscc.idl fsrvp_state.idl - ioctl.idl named_pipe_auth.idl negoex.idl - nfs4acl.idl notify.idl ntprinting.idl printcap.idl - quota.idl rap.idl schannel.idl smb2_lease_struct.idl @@ -93,6 +126,19 @@ bld.SAMBA_PIDL_LIST('PIDL', options='--header --ndr-parser', output_dir='../gen_ndr') +# The interface names here are not the same as the IDL name, so the +# auto-genration of the fuzzer fails to link + +bld.SAMBA_PIDL_LIST('PIDL', + ''' + ioctl.idl + nfs4acl.idl + quota.idl + ''', + options='--header --ndr-parser', + output_dir='../gen_ndr', + generate_fuzzers=False) + # Non-DCE/RPC protocls with Python bindings # (for structures or constants) |