File work-around-dropped-headers.patch of Package winexe
From: Kali Developers <devel@kali.org>
Date: Mon, 7 Oct 2019 16:17:19 +0200
Subject: work-around-dropped-headers
---
source/async.c | 2 +-
source/svcinstall.c | 5 ++---
source/winexe.c | 3 +--
source/wscript | 9 ++++-----
4 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/source/async.c b/source/async.c
index b92084c..5cd7be4 100644
--- a/source/async.c
+++ b/source/async.c
@@ -12,7 +12,7 @@
#include <core/werror.h>
#include <util/data_blob.h>
#include <util/time.h>
-#include <smb_cliraw.h>
+#include <libcli/libcli.h>
#include <util/debug.h>
#include "async.h"
diff --git a/source/svcinstall.c b/source/svcinstall.c
index 06848cc..3d337a9 100644
--- a/source/svcinstall.c
+++ b/source/svcinstall.c
@@ -11,9 +11,8 @@
#include <credentials.h>
#include <util/time.h>
#include <gen_ndr/ndr_svcctl_c.h>
-#include <smb_cliraw.h>
-#include <smb_cli.h>
-#include <smb_composite.h>
+#include <libcli/libcli.h>
+#include <libcli/smb_composite/smb_composite.h>
#include <util/debug.h>
#include "winexesvc.h"
diff --git a/source/winexe.c b/source/winexe.c
index 0a47664..96a847b 100644
--- a/source/winexe.c
+++ b/source/winexe.c
@@ -17,8 +17,7 @@
#include <credentials.h>
#include <util/time.h>
#include <util/debug.h>
-#include <smb_cliraw.h>
-#include <smb_cli.h>
+#include <libcli/libcli.h>
#include <dcerpc.h>
#include <iconv.h>
#include <errno.h>
diff --git a/source/wscript b/source/wscript
index 6a0d9ca..97c9b35 100644
--- a/source/wscript
+++ b/source/wscript
@@ -45,7 +45,7 @@ def configure(ctx):
ctx.check_cfg(package='dcerpc', uselib_store='DCERPC', args=['--cflags', '--libs'])
ctx.check_cfg(package='talloc', uselib_store='TALLOC', args=['--cflags', '--libs'])
if ctx.options.SAMBA_INCS:
- ctx.env.SAMBA_INCS = ctx.options.SAMBA_INCS
+ ctx.env.SAMBA_INCS = ctx.options.SAMBA_INCS.split(':')
else:
ctx.env.SAMBA_INCS = '/usr/include/samba-4.0'
ctx.msg('SAMBA_INCS set to', ctx.env.SAMBA_INCS)
@@ -65,20 +65,19 @@ def configure(ctx):
ctx.msg('SAMBA_LIBS set to', ctx.env.SAMBA_LIBS)
try:
- for h in 'samba_util.h core/error.h credentials.h dcerpc.h gen_ndr/ndr_svcctl_c.h popt.h smb_cli.h smb_cliraw.h smb_composite.h tevent.h util/debug.h'.split():
+ for h in 'core/error.h credentials.h dcerpc.h gen_ndr/ndr_svcctl_c.h popt.h tevent.h util/debug.h'.split():
ctx.check(includes=ctx.env.SAMBA_INCS, msg='Checking for ' + h, fragment='''
#include <stdint.h>
#include <stdbool.h>
#if %d
- #include <samba_util.h>
#include <core/error.h>
#endif
#include <%s>
int main() {return 0;}
- ''' % (h in 'smb_cli.h smb_cliraw.h smb_composite.h util/debug.h'.split(), h))
+ ''' % (h in 'util/debug.h'.split(), h))
libs = []
- for l in 'cli-ldap dcerpc dcerpc-samba errors popt talloc ndr-standard samba-hostconfig samba-credentials smbclient-raw samba-debug'.split():
+ for l in 'cli-ldap dcerpc dcerpc-samba samba-errors popt talloc ndr-standard samba-hostconfig samba-credentials smbclient-raw samba-debug'.split():
if ctx.check(lib=l, libpath=ctx.env.SAMBA_LIBS, mandatory=False):
libs.append(l)
else: