forked from osmocom/wireshark
Move privileges.c and unicode-utils.c from epan to wsutil (so things like
capinfos and dumpcap don't need to depend on libwireshark nor directly pull in those modules). Because capinfos and editcap were only being linked with privileges.c if we had plugins, this allows those programs to be linked when someone is compiling --without-plugins. svn path=/trunk/; revision=25640daniel/osmux
parent
6d4f9c1eda
commit
83f9ecf96f
|
@ -268,7 +268,6 @@ plugin_ldadd = \
|
|||
WTAP_PLUGIN_SOURCES = \
|
||||
epan/plugins.c \
|
||||
epan/report_err.c \
|
||||
epan/privileges.c \
|
||||
epan/filesystem.c
|
||||
|
||||
else # HAVE_PLUGINS
|
||||
|
|
|
@ -236,18 +236,14 @@ dumpcap_SOURCES = \
|
|||
ringbuffer.c \
|
||||
sync_pipe_write.c \
|
||||
tempfile.c \
|
||||
version_info.c \
|
||||
epan/unicode-utils.c \
|
||||
epan/privileges.c
|
||||
version_info.c
|
||||
|
||||
# corresponding headers
|
||||
dumpcap_INCLUDES = \
|
||||
capture_stop_conditions.h \
|
||||
conditions.h \
|
||||
pcapio.h \
|
||||
ringbuffer.h \
|
||||
epan/unicode-utils.h \
|
||||
epan/privileges.h
|
||||
ringbuffer.h
|
||||
|
||||
# this target needed for distribution only
|
||||
noinst_HEADERS = \
|
||||
|
|
|
@ -29,7 +29,6 @@ PLATFORM_SRC = capture-wpcap.c capture_wpcap_packet.c
|
|||
WTAP_PLUGIN_SOURCES = \
|
||||
epan/plugins.c \
|
||||
epan/report_err.c \
|
||||
epan/privileges.c \
|
||||
epan/filesystem.c
|
||||
|
||||
include Makefile.common
|
||||
|
@ -207,7 +206,7 @@ $(RESOURCES): image
|
|||
|
||||
wiretap\wiretap-$(WTAP_VERSION).lib: image $(ZLIB_DLL) wiretap
|
||||
|
||||
wireshark.exe : $(LIBS_CHECK) config.h svnversion.h $(wireshark_OBJECTS) getopt.obj inet_ntop.obj inet_pton.obj codecs epan gtk image\wireshark.res wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
|
||||
wireshark.exe : $(LIBS_CHECK) config.h svnversion.h $(wireshark_OBJECTS) getopt.obj inet_ntop.obj inet_pton.obj codecs epan gtk image\wireshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
|
||||
@echo Linking $@
|
||||
$(LINK) @<<
|
||||
/OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) getopt.obj inet_ntop.obj inet_pton.obj $(GTK_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res
|
||||
|
@ -216,7 +215,7 @@ wireshark.exe : $(LIBS_CHECK) config.h svnversion.h $(wireshark_OBJECTS) getopt.
|
|||
mt.exe -nologo -manifest "wireshark.exe.manifest" -outputresource:wireshark.exe;1
|
||||
!ENDIF
|
||||
|
||||
tshark.exe : $(LIBS_CHECK) config.h svnversion.h $(tshark_OBJECTS) getopt.obj inet_ntop.obj epan image\tshark.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
|
||||
tshark.exe : $(LIBS_CHECK) config.h svnversion.h $(tshark_OBJECTS) getopt.obj inet_ntop.obj epan image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
|
||||
@echo Linking $@
|
||||
$(LINK) @<<
|
||||
/OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) getopt.obj inet_ntop.obj image\tshark.res
|
||||
|
@ -225,7 +224,7 @@ tshark.exe : $(LIBS_CHECK) config.h svnversion.h $(tshark_OBJECTS) getopt.obj in
|
|||
mt.exe -nologo -manifest "tshark.exe.manifest" -outputresource:tshark.exe;1
|
||||
!ENDIF
|
||||
|
||||
rawshark.exe : $(LIBS_CHECK) config.h svnversion.h $(rawshark_OBJECTS) getopt.obj inet_ntop.obj epan image\rawshark.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
|
||||
rawshark.exe : $(LIBS_CHECK) config.h svnversion.h $(rawshark_OBJECTS) getopt.obj inet_ntop.obj epan image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
|
||||
@echo Linking $@
|
||||
$(LINK) @<<
|
||||
/OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(rawshark_LIBS) $(rawshark_OBJECTS) getopt.obj inet_ntop.obj image\rawshark.res
|
||||
|
@ -233,10 +232,10 @@ rawshark.exe : $(LIBS_CHECK) config.h svnversion.h $(rawshark_OBJECTS) getopt.ob
|
|||
|
||||
# XXX: This makefile does not properly handle doing a 'nmake ... capinfos.exe' directly since some of the .objs
|
||||
# (e.g. epan\plugins.obj) must be built first using epan\Makefile.nmake (which happens for 'nmake ... all').
|
||||
capinfos.exe : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) getopt.obj epan/unicode-utils.obj wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
|
||||
capinfos.exe : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
|
||||
@echo Linking $@
|
||||
$(LINK) @<<
|
||||
/OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(capinfos_OBJECTS) getopt.obj epan/unicode-utils.obj $(capinfos_LIBS) image\capinfos.res
|
||||
/OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(capinfos_OBJECTS) getopt.obj $(capinfos_LIBS) image\capinfos.res
|
||||
<<
|
||||
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
|
||||
mt.exe -nologo -manifest "capinfos.exe.manifest" -outputresource:capinfos.exe;1
|
||||
|
@ -244,16 +243,16 @@ capinfos.exe : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) getopt.obj epan/unicod
|
|||
|
||||
# XXX: This makefile does not properly handle doing a 'nmake ... editcap.exe' directly since some of the .objs
|
||||
# (e.g. epan\plugins.obj) must be built first using epan\Makefile.nmake (which happens for 'nmake ... all').
|
||||
editcap.exe : $(LIBS_CHECK) config.h $(editcap_OBJECTS) getopt.obj strptime.obj epan/unicode-utils.obj wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
|
||||
editcap.exe : $(LIBS_CHECK) config.h $(editcap_OBJECTS) getopt.obj strptime.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
|
||||
@echo Linking $@
|
||||
$(LINK) @<<
|
||||
/OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(editcap_OBJECTS) getopt.obj strptime.obj epan/unicode-utils.obj $(editcap_LIBS) image\editcap.res
|
||||
/OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(editcap_OBJECTS) getopt.obj strptime.obj $(editcap_LIBS) image\editcap.res
|
||||
<<
|
||||
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
|
||||
mt.exe -nologo -manifest "editcap.exe.manifest" -outputresource:editcap.exe;1
|
||||
!ENDIF
|
||||
|
||||
mergecap.exe : $(LIBS_CHECK) config.h svnversion.h mergecap.obj merge.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
|
||||
mergecap.exe : $(LIBS_CHECK) config.h svnversion.h mergecap.obj merge.obj getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
|
||||
@echo Linking $@
|
||||
$(LINK) @<<
|
||||
/OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj merge.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
|
||||
|
@ -262,7 +261,7 @@ mergecap.exe : $(LIBS_CHECK) config.h svnversion.h mergecap.obj merge.obj getop
|
|||
mt.exe -nologo -manifest "mergecap.exe.manifest" -outputresource:mergecap.exe;1
|
||||
!ENDIF
|
||||
|
||||
text2pcap.exe : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib strptime.obj image\text2pcap.res
|
||||
text2pcap.exe : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib strptime.obj image\text2pcap.res
|
||||
@echo Linking $@
|
||||
$(LINK) @<<
|
||||
/OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj $(text2pcap_LIBS) strptime.obj image\text2pcap.res
|
||||
|
@ -289,7 +288,7 @@ randpkt.exe : $(randpkt_OBJECTS) getopt.obj
|
|||
mt.exe -nologo -manifest "randpkt.exe.manifest" -outputresource:randpkt.exe;1
|
||||
!ENDIF
|
||||
|
||||
dumpcap.exe : $(LIBS_CHECK) config.h svnversion.h $(dumpcap_OBJECTS) getopt.obj epan/unicode-utils.obj inet_ntop.obj mkstemp.obj wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res
|
||||
dumpcap.exe : $(LIBS_CHECK) config.h svnversion.h $(dumpcap_OBJECTS) getopt.obj inet_ntop.obj mkstemp.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res
|
||||
@echo Linking $@
|
||||
$(LINK) @<<
|
||||
/OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dumpcap_LIBS) $(dumpcap_OBJECTS) getopt.obj inet_ntop.obj mkstemp.obj image\dumpcap.res
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include <epan/plugins.h>
|
||||
#include <epan/report_err.h>
|
||||
#include "wtap.h"
|
||||
#include <epan/privileges.h>
|
||||
#include <wsutil/privileges.h>
|
||||
|
||||
#ifdef NEED_GETOPT_H
|
||||
#include "getopt.h"
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include <signal.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "epan/unicode-utils.h"
|
||||
#include <wsutil/unicode-utils.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
|
|
2
dftest.c
2
dftest.c
|
@ -43,7 +43,7 @@
|
|||
#include <epan/timestamp.h>
|
||||
#include <epan/plugins.h>
|
||||
#include <epan/filesystem.h>
|
||||
#include <epan/privileges.h>
|
||||
#include <wsutil/privileges.h>
|
||||
#include <epan/prefs.h>
|
||||
#include "util.h"
|
||||
#include "epan/dfilter/dfilter.h"
|
||||
|
|
|
@ -79,10 +79,10 @@
|
|||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "epan/unicode-utils.h"
|
||||
#include <wsutil/unicode-utils.h>
|
||||
#endif
|
||||
|
||||
#include "epan/privileges.h"
|
||||
#include <wsutil/privileges.h>
|
||||
|
||||
#include "sync_pipe.h"
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#include "epan/plugins.h"
|
||||
#include "epan/report_err.h"
|
||||
#include "epan/filesystem.h"
|
||||
#include <epan/privileges.h>
|
||||
#include <wsutil/privileges.h>
|
||||
#include "epan/nstime.h"
|
||||
|
||||
#include "svnversion.h"
|
||||
|
|
|
@ -69,7 +69,6 @@ LIBWIRESHARK_SRC = \
|
|||
packet.c \
|
||||
plugins.c \
|
||||
prefs.c \
|
||||
privileges.c \
|
||||
proto.c \
|
||||
range.c \
|
||||
reassemble.c \
|
||||
|
@ -93,7 +92,6 @@ LIBWIRESHARK_SRC = \
|
|||
tvbparse.c \
|
||||
tvbuff.c \
|
||||
uat.c \
|
||||
unicode-utils.c \
|
||||
value_string.c \
|
||||
xdlc.c \
|
||||
xmlstub.c
|
||||
|
@ -201,7 +199,6 @@ LIBWIRESHARK_INCLUDES = \
|
|||
ppptypes.h \
|
||||
prefs.h \
|
||||
prefs-int.h \
|
||||
privileges.h \
|
||||
proto.h \
|
||||
ptvcursor.h \
|
||||
range.h \
|
||||
|
|
|
@ -50,13 +50,13 @@
|
|||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <shlobj.h>
|
||||
#include "epan/unicode-utils.h"
|
||||
#include <wsutil/unicode-utils.h>
|
||||
#else
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
#include "filesystem.h"
|
||||
#include "privileges.h"
|
||||
#include <wsutil/privileges.h>
|
||||
#include <wsutil/file_util.h>
|
||||
|
||||
#define PROFILES_DIR "profiles"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include <glib.h>
|
||||
#include <epan/epan.h>
|
||||
#include <epan/unicode-utils.h>
|
||||
#include <wsutil/unicode-utils.h>
|
||||
#include <epan/emem.h>
|
||||
#include "guid-utils.h"
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#endif
|
||||
|
||||
#include "filesystem.h"
|
||||
#include "privileges.h"
|
||||
#include <wsutil/privileges.h>
|
||||
#include <wsutil/file_util.h>
|
||||
#include "report_err.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <math.h>
|
||||
#include <epan/expert.h>
|
||||
#include <epan/ex-opt.h>
|
||||
#include <epan/privileges.h>
|
||||
#include <wsutil/privileges.h>
|
||||
#include <wsutil/file_util.h>
|
||||
|
||||
static lua_State* L = NULL;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "epan/filesystem.h"
|
||||
#include "epan/addr_resolv.h"
|
||||
#include "epan/prefs.h"
|
||||
#include "epan/unicode-utils.h"
|
||||
#include <wsutil/unicode-utils.h>
|
||||
|
||||
#include "../globals.h"
|
||||
#include "../alert_box.h"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <epan/unicode-utils.h>
|
||||
#include <wsutil/unicode-utils.h>
|
||||
#endif
|
||||
|
||||
#include "../simple_dialog.h"
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#ifdef HHC_DIR
|
||||
#include <windows.h>
|
||||
#include <htmlhelp.h>
|
||||
#include "epan/unicode-utils.h"
|
||||
#include <wsutil/unicode-utils.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
#include <epan/epan.h>
|
||||
#include <epan/filesystem.h>
|
||||
#include <epan/privileges.h>
|
||||
#include <wsutil/privileges.h>
|
||||
#include <epan/epan_dissect.h>
|
||||
#include <epan/timestamp.h>
|
||||
#include <epan/packet.h>
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
#include <windows.h>
|
||||
/* We're using Unicode */
|
||||
#include <tchar.h>
|
||||
#include <epan/unicode-utils.h>
|
||||
#include <wsutil/unicode-utils.h>
|
||||
/* if WIN32_LEAN_AND_MEAN is defined, shellapi.h is needed too */
|
||||
#include <shellapi.h>
|
||||
#elif defined (HAVE_OS_X_FRAMEWORKS)
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
#include <glib.h>
|
||||
#include <epan/epan.h>
|
||||
#include <epan/filesystem.h>
|
||||
#include <epan/privileges.h>
|
||||
#include <wsutil/privileges.h>
|
||||
#include <wsutil/file_util.h>
|
||||
|
||||
#include "globals.h"
|
||||
|
@ -96,7 +96,7 @@
|
|||
#include <epan/epan_dissect.h>
|
||||
#include <epan/stat_cmd_args.h>
|
||||
#include <epan/timestamp.h>
|
||||
#include <epan/unicode-utils.h>
|
||||
#include <wsutil/unicode-utils.h>
|
||||
#include "epan/column-utils.h"
|
||||
#include "epan/proto.h"
|
||||
#include <epan/tap.h>
|
||||
|
|
2
tshark.c
2
tshark.c
|
@ -62,7 +62,7 @@
|
|||
#include <glib.h>
|
||||
#include <epan/epan.h>
|
||||
#include <epan/filesystem.h>
|
||||
#include <epan/privileges.h>
|
||||
#include <wsutil/privileges.h>
|
||||
|
||||
#include "globals.h"
|
||||
#include <epan/timestamp.h>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
#include "version_info.h"
|
||||
#include "capture-pcap-util.h"
|
||||
#include "epan/unicode-utils.h"
|
||||
#include <wsutil/unicode-utils.h>
|
||||
|
||||
#include "svnversion.h"
|
||||
|
||||
|
|
|
@ -28,9 +28,13 @@
|
|||
# into a list of object files by replacing ".c" with ".obj") or files
|
||||
# generated from YACC or Lex files (as Automake doesn't want them in
|
||||
# _SOURCES variables).
|
||||
LIBWSUTIL_SRC = \
|
||||
mpeg-audio.c
|
||||
LIBWSUTIL_SRC = \
|
||||
mpeg-audio.c \
|
||||
privileges.c \
|
||||
unicode-utils.c
|
||||
|
||||
# Header files that are not generated from other files
|
||||
LIBWSUTIL_INCLUDES = \
|
||||
mpeg-audio.h
|
||||
LIBWSUTIL_INCLUDES = \
|
||||
mpeg-audio.h \
|
||||
privileges.h \
|
||||
unicode-utils.h
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "privileges.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "emem.h"
|
||||
#include <windows.h>
|
||||
#include <wchar.h>
|
||||
#include <tchar.h>
|
||||
|
@ -147,7 +146,6 @@ npf_sys_is_running() {
|
|||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "emem.h"
|
||||
|
||||
static uid_t ruid, euid;
|
||||
static gid_t rgid, egid;
|
Loading…
Reference in New Issue