diff --git a/MANIFEST b/MANIFEST index dfd18bbf8..db5c821a1 100644 --- a/MANIFEST +++ b/MANIFEST @@ -71,6 +71,8 @@ include/compat/glob.h include/compat/nss_dbdefs.h include/compat/sha2.h include/compat/stdbool.h +include/log_server.pb-c.h +include/protobuf-c/protobuf-c.h include/sudo_compat.h include/sudo_conf.h include/sudo_debug.h @@ -97,6 +99,10 @@ lib/iolog/iolog_util.c lib/iolog/regress/iolog_path/check_iolog_path.c lib/iolog/regress/iolog_path/data lib/iolog/regress/iolog_util/check_iolog_util.c +lib/logsrv/Makefile.in +lib/logsrv/log_server.pb-c.c +lib/logsrv/log_server.proto +lib/logsrv/protobuf-c.c lib/util/Makefile.in lib/util/aix.c lib/util/arc4random.c @@ -258,16 +264,11 @@ log2cl.pl logsrvd/Makefile.in logsrvd/eventlog.c logsrvd/iolog_writer.c -logsrvd/log_server.pb-c.c -logsrvd/log_server.pb-c.h -logsrvd/log_server.proto logsrvd/logsrv_util.c logsrvd/logsrv_util.h logsrvd/logsrvd.c logsrvd/logsrvd.h logsrvd/logsrvd_conf.c -logsrvd/protobuf-c/protobuf-c.c -logsrvd/protobuf-c/protobuf-c.h logsrvd/sendlog.c logsrvd/sendlog.h ltmain.sh diff --git a/Makefile.in b/Makefile.in index d4bd392f9..f947b937c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -49,8 +49,9 @@ sudoers_gid = @SUDOERS_GID@ sudoers_mode = @SUDOERS_MODE@ shlib_mode = @SHLIB_MODE@ -SUBDIRS = lib/util @ZLIB_SRC@ lib/iolog logsrvd plugins/group_file \ - plugins/sudoers plugins/system_group src include doc examples +SUBDIRS = lib/util @ZLIB_SRC@ lib/iolog lib/logsrv logsrvd \ + plugins/group_file plugins/sudoers plugins/system_group \ + src include doc examples SAMPLES = plugins/sample @@ -189,12 +190,14 @@ siglist.c signame.c: depend: siglist.c signame.c $(top_srcdir)/mkdep.pl --builddir=`pwd` --srcdir=$(top_srcdir) \ lib/util/Makefile.in lib/zlib/Makefile.in lib/iolog/Makefile.in \ - logsrvd/Makefile.in plugins/group_file/Makefile.in \ - plugins/sample/Makefile.in plugins/sudoers/Makefile.in \ - plugins/system_group/Makefile.in src/Makefile.in && \ + lib/logsrv/Makefile.in logsrvd/Makefile.in \ + plugins/group_file/Makefile.in plugins/sample/Makefile.in \ + plugins/sudoers/Makefile.in plugins/system_group/Makefile.in \ + src/Makefile.in && \ $(top_builddir)/config.status --file $(top_builddir)/lib/util/Makefile \ --file $(top_builddir)/lib/zlib/Makefile \ --file $(top_builddir)/lib/iolog/Makefile \ + --file $(top_builddir)/lib/logsrv/Makefile \ --file $(top_builddir)/logsrvd/Makefile \ --file $(top_builddir)/plugins/sample/Makefile \ --file $(top_builddir)/plugins/group_file/Makefile \ diff --git a/configure b/configure index 734a0ac48..66cb86aaa 100755 --- a/configure +++ b/configure @@ -27177,7 +27177,7 @@ elif test X"$TMPFILES_D" != X""; then ac_config_files="$ac_config_files init.d/sudo.conf" fi -ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile include/Makefile lib/iolog/Makefile lib/util/Makefile lib/util/util.exp logsrvd/Makefile src/sudo_usage.h src/Makefile plugins/sample/Makefile plugins/group_file/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers" +ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile include/Makefile lib/iolog/Makefile lib/logsrv/Makefile lib/util/Makefile lib/util/util.exp logsrvd/Makefile src/sudo_usage.h src/Makefile plugins/sample/Makefile plugins/group_file/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -28176,6 +28176,7 @@ do "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "lib/iolog/Makefile") CONFIG_FILES="$CONFIG_FILES lib/iolog/Makefile" ;; + "lib/logsrv/Makefile") CONFIG_FILES="$CONFIG_FILES lib/logsrv/Makefile" ;; "lib/util/Makefile") CONFIG_FILES="$CONFIG_FILES lib/util/Makefile" ;; "lib/util/util.exp") CONFIG_FILES="$CONFIG_FILES lib/util/util.exp" ;; "logsrvd/Makefile") CONFIG_FILES="$CONFIG_FILES logsrvd/Makefile" ;; diff --git a/configure.ac b/configure.ac index e047033d5..2b1af476d 100644 --- a/configure.ac +++ b/configure.ac @@ -4510,7 +4510,7 @@ if test X"$INIT_SCRIPT" != X""; then elif test X"$TMPFILES_D" != X""; then AC_CONFIG_FILES([init.d/sudo.conf]) fi -AC_CONFIG_FILES([Makefile doc/Makefile examples/Makefile include/Makefile lib/iolog/Makefile lib/util/Makefile lib/util/util.exp logsrvd/Makefile src/sudo_usage.h src/Makefile plugins/sample/Makefile plugins/group_file/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers]) +AC_CONFIG_FILES([Makefile doc/Makefile examples/Makefile include/Makefile lib/iolog/Makefile lib/logsrv/Makefile lib/util/Makefile lib/util/util.exp logsrvd/Makefile src/sudo_usage.h src/Makefile plugins/sample/Makefile plugins/group_file/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers]) AC_OUTPUT dnl diff --git a/logsrvd/log_server.pb-c.h b/include/log_server.pb-c.h similarity index 99% rename from logsrvd/log_server.pb-c.h rename to include/log_server.pb-c.h index bbe311b0c..916cae262 100644 --- a/logsrvd/log_server.pb-c.h +++ b/include/log_server.pb-c.h @@ -1,8 +1,8 @@ /* Generated by the protocol buffer compiler. DO NOT EDIT! */ /* Generated from: log_server.proto */ -#ifndef PROTOBUF_C_audit_5fserver_2eproto__INCLUDED -#define PROTOBUF_C_audit_5fserver_2eproto__INCLUDED +#ifndef PROTOBUF_C_log_5fserver_2eproto__INCLUDED +#define PROTOBUF_C_log_5fserver_2eproto__INCLUDED #include @@ -736,4 +736,4 @@ extern const ProtobufCMessageDescriptor server_hello__descriptor; PROTOBUF_C__END_DECLS -#endif /* PROTOBUF_C_audit_5fserver_2eproto__INCLUDED */ +#endif /* PROTOBUF_C_log_5fserver_2eproto__INCLUDED */ diff --git a/logsrvd/protobuf-c/protobuf-c.h b/include/protobuf-c/protobuf-c.h similarity index 100% rename from logsrvd/protobuf-c/protobuf-c.h rename to include/protobuf-c/protobuf-c.h diff --git a/lib/logsrv/Makefile.in b/lib/logsrv/Makefile.in new file mode 100644 index 000000000..ffe7f14dc --- /dev/null +++ b/lib/logsrv/Makefile.in @@ -0,0 +1,179 @@ +# +# SPDX-License-Identifier: ISC +# +# Copyright (c) 2019 Todd C. Miller +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +# @configure_input@ +# + +#### Start of system configuration section. #### + +srcdir = @srcdir@ +devdir = @devdir@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +incdir = $(top_srcdir)/include + +# Compiler & tools to use +CC = @CC@ +LIBTOOL = @LIBTOOL@ + +# C preprocessor flags +CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@ + +# Usually -O and/or -g +CFLAGS = @CFLAGS@ + +# Flags to pass to libtool +LTFLAGS = @LT_STATIC@ + +# Address sanitizer flags +ASAN_CFLAGS = @ASAN_CFLAGS@ +ASAN_LDFLAGS = @ASAN_LDFLAGS@ + +# PIE flags +PIE_CFLAGS = @PIE_CFLAGS@ +PIE_LDFLAGS = @PIE_LDFLAGS@ + +# Stack smashing protection flags +SSP_CFLAGS = @SSP_CFLAGS@ +SSP_LDFLAGS = @SSP_LDFLAGS@ + +# cppcheck options, usually set in the top-level Makefile +CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64 + +# splint options, usually set in the top-level Makefile +SPLINT_OPTS = -D__restrict= -checks + +# PVS-studio options +PVS_CFG = $(top_srcdir)/PVS-Studio.cfg +PVS_IGNORE = 'V707,V011,V002,V536' +PVS_LOG_OPTS = -a 'GA:1,2' -e -t errorfile -d $(PVS_IGNORE) + +# Set to non-empty for development mode +DEVEL = @DEVEL@ + +#### End of system configuration section. #### + +SHELL = @SHELL@ + +LIBLOGSRV_OBJS = protobuf-c.lo log_server.pb-c.lo + +IOBJS = $(LIBLOGSRV_OBJS:.lo=.i) + +POBJS = $(IOBJS:.i=.plog) + +GENERATED = log_server.pb-c.h log_server.pb-c.c + +all: liblogsrv.la + +pvs-log-files: $(POBJS) + +pvs-studio: $(POBJS) + plog-converter $(PVS_LOG_OPTS) $(POBJS) + +depend: + $(top_srcdir)/mkdep.pl --srcdir=$(top_srcdir) \ + --builddir=`pwd`/$(top_builddir) lib/logsrv/Makefile.in + cd $(top_builddir) && ./config.status --file lib/logsrv/Makefile + +Makefile: $(srcdir)/Makefile.in + cd $(top_builddir) && ./config.status --file lib/logsrv/Makefile + +.SUFFIXES: .c .h .i .lo .plog + +.c.lo: + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $< + +.c.i: + $(CC) -E -o $@ $(CPPFLAGS) $< + +.i.plog: + ifile=$<; rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $${ifile%i}c --i-file $< --output-file $@ + +$(devdir)/log_server.pb-c.c: $(srcdir)/log_server.proto + @if [ -n "$(DEVEL)" ]; then \ + cmd='protoc-c --c_out=$(devdir) --proto_path=$(srcdir) $(srcdir)/log_server.proto'; \ + echo "$$cmd"; eval $$cmd; \ + if [ "$(devdir)" == "$(srcdir)" ]; then \ + cmd='mv -f $(devdir)/log_server.pb-c.h $(incdir)/log_server.pb-c.h'; \ + else \ + cmd='mv -f $(devdir)/log_server.pb-c.h $(top_builddir)/log_server.pb-c.h'; \ + fi; \ + echo "$$cmd"; eval $$cmd; \ + fi + +liblogsrv.la: $(LIBLOGSRV_OBJS) + $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) -o $@ $(LIBLOGSRV_OBJS) + +pre-install: + +install: + +install-binaries: + +install-includes: + +install-doc: + +install-plugin: + +uninstall: + +splint: + splint $(SPLINT_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c + +cppcheck: + cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c + +pvs-log-files: $(POBJS) + +check: + +clean: + -$(LIBTOOL) $(LTFLAGS) --mode=clean rm -f *.lo *.o \ + *.la *.a *.i *.plog stamp-* core *.core core.* + +mostlyclean: clean + +distclean: clean + -rm -rf Makefile .libs + @if [ -n "$(DEVEL)" -a "$(devdir)" != "$(srcdir)" ]; then \ + cmd='rm -rf $(GENERATED)'; \ + echo "$$cmd"; eval $$cmd; \ + fi + +clobber: distclean + +realclean: distclean + rm -f TAGS tags + +cleandir: realclean + +# Autogenerated dependencies, do not modify +log_server.pb-c.lo: $(srcdir)/log_server.pb-c.c $(incdir)/log_server.pb-c.h \ + $(incdir)/protobuf-c/protobuf-c.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(srcdir)/log_server.pb-c.c +log_server.pb-c.i: $(srcdir)/log_server.pb-c.c $(incdir)/log_server.pb-c.h \ + $(incdir)/protobuf-c/protobuf-c.h + $(CC) -E -o $@ $(CPPFLAGS) $< +log_server.pb-c.plog: log_server.pb-c.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/log_server.pb-c.c --i-file $< --output-file $@ +protobuf-c.lo: $(srcdir)/protobuf-c.c $(incdir)/protobuf-c/protobuf-c.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(srcdir)/protobuf-c.c +protobuf-c.i: $(srcdir)/protobuf-c.c $(incdir)/protobuf-c/protobuf-c.h + $(CC) -E -o $@ $(CPPFLAGS) $< +protobuf-c.plog: protobuf-c.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/protobuf-c.c --i-file $< --output-file $@ diff --git a/logsrvd/log_server.pb-c.c b/lib/logsrv/log_server.pb-c.c similarity index 100% rename from logsrvd/log_server.pb-c.c rename to lib/logsrv/log_server.pb-c.c diff --git a/logsrvd/log_server.proto b/lib/logsrv/log_server.proto similarity index 100% rename from logsrvd/log_server.proto rename to lib/logsrv/log_server.proto diff --git a/logsrvd/protobuf-c/protobuf-c.c b/lib/logsrv/protobuf-c.c similarity index 99% rename from logsrvd/protobuf-c/protobuf-c.c rename to lib/logsrv/protobuf-c.c index 4733b0a65..7a6b56d32 100644 --- a/logsrvd/protobuf-c/protobuf-c.c +++ b/lib/logsrv/protobuf-c.c @@ -48,7 +48,7 @@ #include /* for malloc, free */ #include /* for strcmp, strlen, memcpy, memmove, memset */ -#include "protobuf-c.h" +#include "protobuf-c/protobuf-c.h" #define TRUE 1 #define FALSE 0 diff --git a/logsrvd/Makefile.in b/logsrvd/Makefile.in index f5bc9b98f..ca94dadda 100644 --- a/logsrvd/Makefile.in +++ b/logsrvd/Makefile.in @@ -39,7 +39,8 @@ INSTALL_OWNER = -o $(install_uid) -g $(install_gid) INSTALL_BACKUP = @INSTALL_BACKUP@ # Libraries -LT_LIBS = $(top_builddir)/lib/iolog/libsudo_iolog.la +LT_LIBS = $(top_builddir)/lib/iolog/libsudo_iolog.la \ + $(top_builddir)/lib/logsrv/liblogsrv.la LIBS = $(LT_LIBS) @LIBTLS@ # C preprocessor defines @@ -98,19 +99,15 @@ localstatedir = @localstatedir@ install_uid = 0 install_gid = 0 -# Set to non-empty for development mode -DEVEL = @DEVEL@ - #### End of system configuration section. #### SHELL = @SHELL@ PROGS = sudo_logsrvd sudo_sendlog -LOGSRVD_OBJS = log_server.pb-c.o logsrv_util.o eventlog.o iolog_writer.o \ - logsrvd.o logsrvd_conf.o protobuf-c.o +LOGSRVD_OBJS = logsrv_util.o eventlog.o iolog_writer.o logsrvd.o logsrvd_conf.o -SENDLOG_OBJS = log_server.pb-c.o logsrv_util.o protobuf-c.o sendlog.o +SENDLOG_OBJS = logsrv_util.o sendlog.o IOBJS = $(LOGSRVD_OBJS:.o=.i) $(SENDLOG_OBJS:.o=.i) @@ -150,14 +147,6 @@ sudo_logsrvd: $(LOGSRVD_OBJS) $(LT_LIBS) sudo_sendlog: $(SENDLOG_OBJS) $(LT_LIBS) $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) -o $@ $(SENDLOG_OBJS) $(LDFLAGS) $(ASAN_LDFLAGS) $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(LIBS) -GENERATED = log_server.pb-c.h log_server.pb-c.c - -$(devdir)/log_server.pb-c.c $(devdir)/log_server.pb-c.h: $(srcdir)/log_server.proto - @if [ -n "$(DEVEL)" ]; then \ - cmd='protoc-c --c_out=$(devdir) --proto_path=$(srcdir) $(srcdir)/log_server.proto'; \ - echo "$$cmd"; eval $$cmd; \ - fi - pre-install: install: install-binaries @@ -203,10 +192,6 @@ mostlyclean: clean distclean: clean -rm -rf Makefile .libs - @if [ -n "$(DEVEL)" -a "$(devdir)" != "$(srcdir)" ]; then \ - cmd='rm -rf $(GENERATED)'; \ - echo "$$cmd"; eval $$cmd; \ - fi clobber: distclean @@ -216,50 +201,42 @@ realclean: distclean cleandir: realclean # Autogenerated dependencies, do not modify -eventlog.o: $(srcdir)/eventlog.c $(devdir)/log_server.pb-c.h \ - $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ - $(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h \ - $(incdir)/sudo_gettext.h $(incdir)/sudo_iolog.h \ - $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ - $(srcdir)/logsrv_util.h $(srcdir)/logsrvd.h \ - $(srcdir)/protobuf-c/protobuf-c.h $(top_builddir)/config.h +eventlog.o: $(srcdir)/eventlog.c $(incdir)/compat/stdbool.h \ + $(incdir)/log_server.pb-c.h $(incdir)/protobuf-c/protobuf-c.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_debug.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_iolog.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/logsrv_util.h $(srcdir)/logsrvd.h \ + $(top_builddir)/config.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(srcdir)/eventlog.c -eventlog.i: $(srcdir)/eventlog.c $(devdir)/log_server.pb-c.h \ - $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ - $(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h \ - $(incdir)/sudo_gettext.h $(incdir)/sudo_iolog.h \ - $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ - $(srcdir)/logsrv_util.h $(srcdir)/logsrvd.h \ - $(srcdir)/protobuf-c/protobuf-c.h $(top_builddir)/config.h +eventlog.i: $(srcdir)/eventlog.c $(incdir)/compat/stdbool.h \ + $(incdir)/log_server.pb-c.h $(incdir)/protobuf-c/protobuf-c.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_debug.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_iolog.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/logsrv_util.h $(srcdir)/logsrvd.h \ + $(top_builddir)/config.h $(CC) -E -o $@ $(CPPFLAGS) $< eventlog.plog: eventlog.i rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/eventlog.c --i-file $< --output-file $@ -iolog_writer.o: $(srcdir)/iolog_writer.c $(devdir)/log_server.pb-c.h \ - $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ - $(incdir)/sudo_debug.h $(incdir)/sudo_gettext.h \ - $(incdir)/sudo_iolog.h $(incdir)/sudo_queue.h \ - $(incdir)/sudo_util.h $(srcdir)/logsrv_util.h \ - $(srcdir)/logsrvd.h $(srcdir)/protobuf-c/protobuf-c.h \ +iolog_writer.o: $(srcdir)/iolog_writer.c $(incdir)/compat/stdbool.h \ + $(incdir)/log_server.pb-c.h $(incdir)/protobuf-c/protobuf-c.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_debug.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_iolog.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/logsrv_util.h $(srcdir)/logsrvd.h \ $(top_builddir)/config.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(srcdir)/iolog_writer.c -iolog_writer.i: $(srcdir)/iolog_writer.c $(devdir)/log_server.pb-c.h \ - $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ - $(incdir)/sudo_debug.h $(incdir)/sudo_gettext.h \ - $(incdir)/sudo_iolog.h $(incdir)/sudo_queue.h \ - $(incdir)/sudo_util.h $(srcdir)/logsrv_util.h \ - $(srcdir)/logsrvd.h $(srcdir)/protobuf-c/protobuf-c.h \ +iolog_writer.i: $(srcdir)/iolog_writer.c $(incdir)/compat/stdbool.h \ + $(incdir)/log_server.pb-c.h $(incdir)/protobuf-c/protobuf-c.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_debug.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_iolog.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/logsrv_util.h $(srcdir)/logsrvd.h \ $(top_builddir)/config.h $(CC) -E -o $@ $(CPPFLAGS) $< iolog_writer.plog: iolog_writer.i rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/iolog_writer.c --i-file $< --output-file $@ -log_server.pb-c.o: $(srcdir)/log_server.pb-c.c $(devdir)/log_server.pb-c.h \ - $(srcdir)/protobuf-c/protobuf-c.h - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(srcdir)/log_server.pb-c.c -log_server.pb-c.i: $(srcdir)/log_server.pb-c.c $(devdir)/log_server.pb-c.h \ - $(srcdir)/protobuf-c/protobuf-c.h - $(CC) -E -o $@ $(CPPFLAGS) $< -log_server.pb-c.plog: log_server.pb-c.i - rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/log_server.pb-c.c --i-file $< --output-file $@ logsrv_util.o: $(srcdir)/logsrv_util.c $(incdir)/compat/stdbool.h \ $(incdir)/sudo_compat.h $(incdir)/sudo_debug.h \ $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ @@ -276,71 +253,63 @@ logsrv_util.i: $(srcdir)/logsrv_util.c $(incdir)/compat/stdbool.h \ $(CC) -E -o $@ $(CPPFLAGS) $< logsrv_util.plog: logsrv_util.i rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/logsrv_util.c --i-file $< --output-file $@ -logsrvd.o: $(srcdir)/logsrvd.c $(devdir)/log_server.pb-c.h \ - $(incdir)/compat/getopt.h $(incdir)/compat/stdbool.h \ - $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ - $(incdir)/sudo_debug.h $(incdir)/sudo_event.h \ +logsrvd.o: $(srcdir)/logsrvd.c $(incdir)/compat/getopt.h \ + $(incdir)/compat/stdbool.h $(incdir)/log_server.pb-c.h \ + $(incdir)/protobuf-c/protobuf-c.h $(incdir)/sudo_compat.h \ + $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h $(incdir)/sudo_event.h \ $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ $(incdir)/sudo_iolog.h $(incdir)/sudo_queue.h $(incdir)/sudo_rand.h \ $(incdir)/sudo_util.h $(srcdir)/logsrv_util.h $(srcdir)/logsrvd.h \ - $(srcdir)/protobuf-c/protobuf-c.h $(top_builddir)/config.h \ - $(top_builddir)/pathnames.h + $(top_builddir)/config.h $(top_builddir)/pathnames.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(srcdir)/logsrvd.c -logsrvd.i: $(srcdir)/logsrvd.c $(devdir)/log_server.pb-c.h \ - $(incdir)/compat/getopt.h $(incdir)/compat/stdbool.h \ - $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ - $(incdir)/sudo_debug.h $(incdir)/sudo_event.h \ +logsrvd.i: $(srcdir)/logsrvd.c $(incdir)/compat/getopt.h \ + $(incdir)/compat/stdbool.h $(incdir)/log_server.pb-c.h \ + $(incdir)/protobuf-c/protobuf-c.h $(incdir)/sudo_compat.h \ + $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h $(incdir)/sudo_event.h \ $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ $(incdir)/sudo_iolog.h $(incdir)/sudo_queue.h $(incdir)/sudo_rand.h \ $(incdir)/sudo_util.h $(srcdir)/logsrv_util.h $(srcdir)/logsrvd.h \ - $(srcdir)/protobuf-c/protobuf-c.h $(top_builddir)/config.h \ - $(top_builddir)/pathnames.h + $(top_builddir)/config.h $(top_builddir)/pathnames.h $(CC) -E -o $@ $(CPPFLAGS) $< logsrvd.plog: logsrvd.i rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/logsrvd.c --i-file $< --output-file $@ -logsrvd_conf.o: $(srcdir)/logsrvd_conf.c $(devdir)/log_server.pb-c.h \ - $(incdir)/compat/getaddrinfo.h $(incdir)/compat/stdbool.h \ - $(incdir)/sudo_compat.h $(incdir)/sudo_debug.h \ - $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ - $(incdir)/sudo_iolog.h $(incdir)/sudo_queue.h \ - $(incdir)/sudo_util.h $(srcdir)/logsrv_util.h \ - $(srcdir)/logsrvd.h $(srcdir)/protobuf-c/protobuf-c.h \ +logsrvd_conf.o: $(srcdir)/logsrvd_conf.c $(incdir)/compat/getaddrinfo.h \ + $(incdir)/compat/stdbool.h $(incdir)/log_server.pb-c.h \ + $(incdir)/protobuf-c/protobuf-c.h $(incdir)/sudo_compat.h \ + $(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_iolog.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/logsrv_util.h $(srcdir)/logsrvd.h \ $(top_builddir)/config.h $(top_builddir)/pathnames.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(srcdir)/logsrvd_conf.c -logsrvd_conf.i: $(srcdir)/logsrvd_conf.c $(devdir)/log_server.pb-c.h \ - $(incdir)/compat/getaddrinfo.h $(incdir)/compat/stdbool.h \ - $(incdir)/sudo_compat.h $(incdir)/sudo_debug.h \ - $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ - $(incdir)/sudo_iolog.h $(incdir)/sudo_queue.h \ - $(incdir)/sudo_util.h $(srcdir)/logsrv_util.h \ - $(srcdir)/logsrvd.h $(srcdir)/protobuf-c/protobuf-c.h \ +logsrvd_conf.i: $(srcdir)/logsrvd_conf.c $(incdir)/compat/getaddrinfo.h \ + $(incdir)/compat/stdbool.h $(incdir)/log_server.pb-c.h \ + $(incdir)/protobuf-c/protobuf-c.h $(incdir)/sudo_compat.h \ + $(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_iolog.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/logsrv_util.h $(srcdir)/logsrvd.h \ $(top_builddir)/config.h $(top_builddir)/pathnames.h $(CC) -E -o $@ $(CPPFLAGS) $< logsrvd_conf.plog: logsrvd_conf.i rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/logsrvd_conf.c --i-file $< --output-file $@ -protobuf-c.o: $(srcdir)/protobuf-c/protobuf-c.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(srcdir)/protobuf-c/protobuf-c.c -protobuf-c.i: $(srcdir)/protobuf-c/protobuf-c.c - $(CC) -E -o $@ $(CPPFLAGS) $< -protobuf-c.plog: protobuf-c.i - rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/protobuf-c/protobuf-c.c --i-file $< --output-file $@ -sendlog.o: $(srcdir)/sendlog.c $(devdir)/log_server.pb-c.h \ - $(incdir)/compat/getaddrinfo.h $(incdir)/compat/getopt.h \ - $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ - $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h $(incdir)/sudo_event.h \ +sendlog.o: $(srcdir)/sendlog.c $(incdir)/compat/getaddrinfo.h \ + $(incdir)/compat/getopt.h $(incdir)/compat/stdbool.h \ + $(incdir)/log_server.pb-c.h $(incdir)/protobuf-c/protobuf-c.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ + $(incdir)/sudo_debug.h $(incdir)/sudo_event.h \ $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ $(incdir)/sudo_iolog.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ - $(srcdir)/logsrv_util.h $(srcdir)/protobuf-c/protobuf-c.h \ - $(srcdir)/sendlog.h $(top_builddir)/config.h + $(srcdir)/logsrv_util.h $(srcdir)/sendlog.h $(top_builddir)/config.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(srcdir)/sendlog.c -sendlog.i: $(srcdir)/sendlog.c $(devdir)/log_server.pb-c.h \ - $(incdir)/compat/getaddrinfo.h $(incdir)/compat/getopt.h \ - $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ - $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h $(incdir)/sudo_event.h \ +sendlog.i: $(srcdir)/sendlog.c $(incdir)/compat/getaddrinfo.h \ + $(incdir)/compat/getopt.h $(incdir)/compat/stdbool.h \ + $(incdir)/log_server.pb-c.h $(incdir)/protobuf-c/protobuf-c.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ + $(incdir)/sudo_debug.h $(incdir)/sudo_event.h \ $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ $(incdir)/sudo_iolog.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ - $(srcdir)/logsrv_util.h $(srcdir)/protobuf-c/protobuf-c.h \ - $(srcdir)/sendlog.h $(top_builddir)/config.h + $(srcdir)/logsrv_util.h $(srcdir)/sendlog.h $(top_builddir)/config.h $(CC) -E -o $@ $(CPPFLAGS) $< sendlog.plog: sendlog.i rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/sendlog.c --i-file $< --output-file $@