Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dteske@nplusfreebsd.sf keepalived $ ls
- .indent.pro INSTALL build_smule.sh* keepalived/
- .travis.yml Makefile.am clean_smule.sh* keepalived.spec.in
- AUTHOR README.md configure.ac lib/
- CONTRIBUTORS TODO doc/ patch_smule.txt
- COPYING bin/ docker/ snap/
- ChangeLog bin_install/ genhash/ test/
- Dockerfile build_setup* goodies/ tools/
- dteske@nplusfreebsd.sf keepalived $ ./build_smule.sh
- Hmm... Looks like a unified diff to me...
- The text leading up to this was:
- --------------------------
- |--- configure.ac.orig 2018-06-22 03:53:05.089252000 +0000
- |+++ configure.ac 2018-06-22 03:54:02.647049000 +0000
- --------------------------
- Patching file configure.ac using Plan A...
- Hunk #1 succeeded at 427.
- Hunk #2 succeeded at 436.
- Hmm... The next patch looks like a unified diff to me...
- The text leading up to this was:
- --------------------------
- |--- lib/utils.h.orig 2018-06-22 04:21:26.596551000 +0000
- |+++ lib/utils.h 2018-06-22 04:12:28.596077000 +0000
- --------------------------
- Patching file lib/utils.h using Plan A...
- Hunk #1 succeeded at 30.
- Hmm... The next patch looks like a unified diff to me...
- The text leading up to this was:
- --------------------------
- |--- lib/notify.c.orig 2018-06-22 05:00:23.289907000 +0000
- |+++ lib/notify.c 2018-06-22 05:01:48.485388000 +0000
- --------------------------
- Patching file lib/notify.c using Plan A...
- Hunk #1 succeeded at 33.
- Hunk #2 succeeded at 56.
- Hunk #3 succeeded at 84.
- Hunk #4 succeeded at 150.
- Hunk #5 succeeded at 266.
- Hmm... The next patch looks like a unified diff to me...
- The text leading up to this was:
- --------------------------
- |--- lib/scheduler.c.orig 2018-06-22 05:03:20.622974000 +0000
- |+++ lib/scheduler.c 2018-06-22 05:04:32.956661000 +0000
- --------------------------
- Patching file lib/scheduler.c using Plan A...
- Hunk #1 succeeded at 51.
- Hunk #2 succeeded at 296.
- Hmm... The next patch looks like a unified diff to me...
- The text leading up to this was:
- --------------------------
- |--- lib/parser.c.orig 2018-06-22 05:14:35.174543000 +0000
- |+++ lib/parser.c 2018-06-22 05:15:22.254116000 +0000
- --------------------------
- Patching file lib/parser.c using Plan A...
- Hunk #1 succeeded at 34.
- Hunk #2 succeeded at 504.
- done
- ==> ./build_setup
- configure.ac:254: installing './ar-lib'
- configure.ac:244: installing './compile'
- configure.ac:98: installing './install-sh'
- configure.ac:98: installing './missing'
- genhash/Makefile.am: installing './depcomp'
- ==> ./configure
- checking for a BSD-compatible install... /usr/bin/install -c
- checking whether build environment is sane... yes
- checking for a thread-safe mkdir -p... ./install-sh -c -d
- checking for gawk... no
- checking for mawk... no
- checking for nawk... nawk
- checking whether make sets $(MAKE)... yes
- checking whether make supports nested variables... yes
- checking whether make supports nested variables... (cached) yes
- checking for pkg-config... /usr/local/bin/pkg-config
- checking pkg-config is at least version 0.9.0... yes
- checking for gcc... gcc
- checking whether the C compiler works... yes
- checking for C compiler default output file name... a.out
- checking for suffix of executables...
- checking whether we are cross compiling... no
- checking for suffix of object files... o
- checking whether we are using the GNU C compiler... yes
- checking whether gcc accepts -g... yes
- checking for gcc option to accept ISO C89... none needed
- checking whether gcc understands -c and -o together... yes
- checking for style of include used by make... GNU
- checking dependency style of gcc... gcc3
- checking whether make sets $(MAKE)... (cached) yes
- checking for ranlib... ranlib
- checking for grep that handles long lines and -e... /usr/bin/grep
- checking whether ln -s works... yes
- checking for a sed that does not truncate output... /usr/bin/sed
- checking for strip... strip
- checking for ldd... ldd
- checking for ar... ar
- checking the archiver (ar) interface... ar
- checking for -Wimplicit-fallthrough... no
- checking for PIE support... yes
- checking for -Wformat -Werror=format-security support... yes
- checking for -Wp,-D_FORTIFY_SOURCE=2 support... yes
- checking for -fexceptions support... yes
- checking for -fstack-protector-strong support... yes
- checking for --param=ssp-buffer-size=4 support... yes
- checking for -grecord-gcc-switches support... yes
- checking for -Wl,-z,relro support... yes
- checking for -Wl,-z,now support... yes
- checking how to run the C preprocessor... gcc -E
- checking for egrep... /usr/bin/grep -E
- checking for ANSI C header files... Segmentation fault (core dumped)
- no
- checking for sys/types.h... yes
- checking for sys/stat.h... yes
- checking for stdlib.h... yes
- checking for string.h... yes
- checking for memory.h... yes
- checking for strings.h... yes
- checking for inttypes.h... yes
- checking for stdint.h... yes
- checking for unistd.h... yes
- checking arpa/inet.h usability... yes
- checking arpa/inet.h presence... yes
- checking for arpa/inet.h... yes
- checking fcntl.h usability... yes
- checking fcntl.h presence... yes
- checking for fcntl.h... yes
- checking limits.h usability... yes
- checking limits.h presence... yes
- checking for limits.h... yes
- checking netdb.h usability... yes
- checking netdb.h presence... yes
- checking for netdb.h... yes
- checking netinet/in.h usability... yes
- checking netinet/in.h presence... yes
- checking for netinet/in.h... yes
- checking for stdint.h... (cached) yes
- checking for stdlib.h... (cached) yes
- checking for string.h... (cached) yes
- checking sys/ioctl.h usability... yes
- checking sys/ioctl.h presence... yes
- checking for sys/ioctl.h... yes
- checking sys/param.h usability... yes
- checking sys/param.h presence... yes
- checking for sys/param.h... yes
- checking sys/socket.h usability... yes
- checking sys/socket.h presence... yes
- checking for sys/socket.h... yes
- checking sys/time.h usability... yes
- checking sys/time.h presence... yes
- checking for sys/time.h... yes
- checking syslog.h usability... yes
- checking syslog.h presence... yes
- checking for syslog.h... yes
- checking for unistd.h... (cached) yes
- checking for stdbool.h that conforms to C99... yes
- checking for _Bool... yes
- checking for inline... inline
- checking for int64_t... yes
- checking for pid_t... yes
- checking for size_t... yes
- checking for uint16_t... yes
- checking for uint32_t... yes
- checking for uint64_t... yes
- checking for uint8_t... yes
- checking for an ANSI C-conforming const... yes
- checking vfork.h usability... no
- checking vfork.h presence... no
- checking for vfork.h... no
- checking for fork... yes
- checking for vfork... yes
- checking for working fork... yes
- checking for working vfork... (cached) yes
- checking for stdlib.h... (cached) yes
- checking for GNU libc compatible malloc... yes
- checking for stdlib.h... (cached) yes
- checking for GNU libc compatible realloc... yes
- checking for dup2... yes
- checking for getcwd... yes
- checking for gettimeofday... yes
- checking for memmove... yes
- checking for memset... yes
- checking for select... yes
- checking for setenv... yes
- checking for socket... yes
- checking for strcasecmp... yes
- checking for strchr... yes
- checking for strdup... yes
- checking for strerror... yes
- checking for strpbrk... yes
- checking for strstr... yes
- checking for strtol... yes
- checking for strtoul... yes
- checking for uname... yes
- checking for pipe2... yes
- checking for signalfd... no
- checking for inotify_init1... no
- checking whether ETHERTYPE_IPV6 is declared... no
- checking openssl/ssl.h usability... yes
- checking openssl/ssl.h presence... yes
- checking for openssl/ssl.h... yes
- checking openssl/err.h usability... yes
- checking openssl/err.h presence... yes
- checking for openssl/err.h... yes
- checking openssl/md5.h usability... yes
- checking openssl/md5.h presence... yes
- checking for openssl/md5.h... yes
- checking for MD5_Init in -lcrypto... yes
- checking for SSL_CTX_new in -lssl... yes
- checking SSL_set_tlsext_host_name() - may be a definition... yes
- checking for SSL_CTX_set_verify_depth... yes
- checking for SSL_set0_rbio... no
- checking for OPENSSL_init_crypto... no
- checking for nl_socket_modify_cb in -lnl... no
- configure: WARNING: keepalived will be built without libnl support.
- checking for magic_open in -lmagic... yes
- checking whether RTA_ENCAP is declared... no
- checking whether RTA_EXPIRES is declared... no
- checking whether RTA_NEWDST is declared... no
- checking whether RTA_PREF is declared... no
- checking whether FRA_SUPPRESS_PREFIXLEN is declared... no
- checking whether FRA_SUPPRESS_IFGROUP is declared... no
- checking whether FRA_TUN_ID is declared... no
- checking whether RTAX_CC_ALGO is declared... no
- checking whether RTAX_QUICKACK is declared... no
- checking whether RTEXT_FILTER_SKIP_STATS is declared... no
- checking whether FRA_L3MDEV is declared... no
- checking whether FRA_UID_RANGE is declared... no
- checking whether RTAX_FASTOPEN_NO_COOKIE is declared... no
- checking whether RTA_VIA is declared... no
- checking whether FRA_OIFNAME is declared... no
- checking whether FRA_PROTOCOL is declared... no
- checking whether FRA_IP_PROTO is declared... no
- checking whether FRA_SPORT_RANGE is declared... no
- checking whether FRA_DPORT_RANGE is declared... no
- checking whether IFA_FLAGS is declared... no
- checking whether LWTUNNEL_ENCAP_MPLS is declared... no
- checking whether LWTUNNEL_ENCAP_ILA is declared... no
- checking linux/netfilter/x_tables.h usability... no
- checking linux/netfilter/x_tables.h presence... no
- checking for linux/netfilter/x_tables.h... no
- checking for linux/if.h and net/if.h namespace collision... yes
- checking for linux/if_ether.h then netinet/if_ether.h namespace collision... yes
- checking for libiptc/libiptc.h linux/if.h and net/if.h namespace collision... yes
- checking linux/ip_vs.h usability... no
- checking linux/ip_vs.h presence... no
- checking for linux/ip_vs.h... no
- checking whether IPVS_DEST_ATTR_ADDR_FAMILY is declared... no
- checking whether IPVS_DAEMON_ATTR_SYNC_MAXLEN is declared... no
- checking whether IPVS_DAEMON_ATTR_MCAST_GROUP is declared... no
- checking whether IPVS_DAEMON_ATTR_MCAST_GROUP6 is declared... no
- checking whether IPVS_DAEMON_ATTR_MCAST_PORT is declared... no
- checking whether IPVS_DAEMON_ATTR_MCAST_TTL is declared... no
- checking whether IPVS_SVC_ATTR_STATS64 is declared... no
- checking whether IPVS_DEST_ATTR_STATS64 is declared... no
- checking whether IFLA_MACVLAN_MODE is declared... no
- checking whether MACVLAN_MODE_PRIVATE is declared... no
- checking whether SOCK_NONBLOCK is declared... yes
- checking whether SOCK_CLOEXEC is declared... yes
- checking whether IPVS_SVC_ATTR_PE_NAME is declared... no
- checking whether O_PATH is declared... no
- checking whether GLOB_BRACE is declared... yes
- checking whether FRA_SRC is declared... no
- checking whether SO_MARK is declared... no
- checking whether CLONE_NEWNET is declared... no
- checking for setns... no
- checking whether SCHED_RR is declared... yes
- checking whether RLIMIT_RTTIME is declared... no
- checking whether SCHED_RESET_ON_FORK is declared... no
- checking for sphinx-build... No
- checking for rpmbuild... No
- ./configure: rpm: not found
- checking that generated files are newer than configure... done
- configure: creating ./config.status
- config.status: creating Makefile
- config.status: creating keepalived/Makefile
- config.status: creating lib/Makefile
- config.status: creating keepalived/core/Makefile
- config.status: creating keepalived.spec
- config.status: creating genhash/Makefile
- config.status: creating keepalived/check/Makefile
- config.status: creating keepalived/vrrp/Makefile
- config.status: creating keepalived/bfd/Makefile
- config.status: creating doc/Makefile
- config.status: creating bin_install/Makefile
- config.status: creating keepalived/dbus/Makefile
- config.status: creating keepalived/etc/Makefile
- config.status: creating keepalived/etc/init/Makefile
- config.status: creating keepalived/etc/init.d/Makefile
- config.status: creating lib/config.h
- config.status: lib/config.h is unchanged
- config.status: executing depfiles commands
- Keepalived configuration
- ------------------------
- Keepalived version : 2.0.4
- Compiler : gcc
- Preprocessor flags :
- Compiler flags : -Wall -Wunused -Wstrict-prototypes -Wextra -Winit-self -g -O2 -D_GNU_SOURCE -fPIE -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
- Linker flags : -pie
- Extra Lib : -lcrypto -lssl -lmagic
- Use IPVS Framework : Yes
- IPVS use libnl : No
- IPVS syncd attributes : No
- IPVS 64 bit stats : No
- fwmark socket support : No
- Use VRRP Framework : Yes
- Use VRRP VMAC : No
- Use VRRP authentication : Yes
- With ip rules/routes : No
- Use BFD Framework : No
- SNMP vrrp support : No
- SNMP checker support : No
- SNMP RFCv2 support : No
- SNMP RFCv3 support : No
- DBUS support : No
- SHA1 support : No
- Use Json output : No
- libnl version : None
- Use IPv4 devconf : No
- Use libiptc : No
- Use libipset : No
- init type : undetected
- Build genhash : Yes
- Build documentation : No
- *** WARNING - this build will not support IPVS with IPv6. Please install libnl/libnl-3 dev libraries to support IPv6 with IPVS.
- ==> gmake
- Making all in lib
- gmake[1]: Entering directory '/usr/home/dteske/src/smule/pkgcenter/depend/keepalived/lib'
- -p: not found
- [: git: unexpected operator
- (CDPATH="${ZSH_VERSION+.}:" && cd .. && /bin/sh /home/dteske/src/smule/pkgcenter/depend/keepalived/missing autoheader)
- rm -f stamp-h1
- touch config.h.in
- cd .. && /bin/sh ./config.status lib/config.h
- config.status: creating lib/config.h
- config.status: lib/config.h is unchanged
- gmake all-am
- gmake[2]: Entering directory '/usr/home/dteske/src/smule/pkgcenter/depend/keepalived/lib'
- CC memory.o
- CC utils.o
- CC notify.o
- CC timer.o
- CC scheduler.o
- CC vector.o
- CC list.o
- CC html.o
- CC parser.o
- CC signals.o
- CC logger.o
- CC assert.o
- CC rttables.o
- rttables.c:29:29: fatal error: linux/rtnetlink.h: No such file or directory
- compilation terminated.
- gmake[2]: *** [Makefile:388: rttables.o] Error 1
- gmake[2]: Leaving directory '/usr/home/dteske/src/smule/pkgcenter/depend/keepalived/lib'
- gmake[1]: *** [Makefile:309: all] Error 2
- gmake[1]: Leaving directory '/usr/home/dteske/src/smule/pkgcenter/depend/keepalived/lib'
- gmake: *** [Makefile:425: all-recursive] Error 1
- dteske@nplusfreebsd.sf keepalived $ wc -l patch_smule.txt
- 150 patch_smule.txt
- dteske@nplusfreebsd.sf keepalived $ wc -l build_smule.sh
- 77 build_smule.sh
- dteske@nplusfreebsd.sf keepalived $ wc -l clean_smule.sh
- 68 clean_smule.sh
- dteske@nplusfreebsd.sf keepalived $ ls -1 lib/*.c
- lib/assert.c
- lib/html.c
- lib/list.c
- lib/logger.c
- lib/memory.c
- lib/notify.c
- lib/old_socket.c
- lib/parser.c
- lib/rttables.c
- lib/scheduler.c
- lib/signals.c
- lib/timer.c
- lib/utils.c
- lib/vector.c
- dteske@nplusfreebsd.sf keepalived $ ls -1 lib/*.c | wc -l
- 14
- dteske@nplusfreebsd.sf keepalived $ ls -1 lib/*.o | wc -l
- 12
- dteske@nplusfreebsd.sf keepalived $ bc
- 12*100/14
- 85
- dteske@nplusfreebsd.sf keepalived $ cat build_smule.sh
- #!/bin/sh
- ############################################################ IDENT(1)
- #
- # $Title: Script to build keepalived and install it to package sandbox $
- # $Copyright: 2017-2018 Devin Teske. All rights reserved. $
- # $Smule: pkgcenter.git/master/depend/keepalived/build_smule.sh 2018-06-22 04:32:09 +0000 dteske $
- #
- ############################################################ GLOBALS
- #
- # ANSI
- #
- ESC=$( :| awk 'BEGIN { printf "%c", 27 }' )
- SI_BLD_ON="$ESC[1m"
- ANSI_BLD_OFF="$ESC[22m"
- ANSI_GRN_ON="$ESC[32m"
- ANSI_FGC_OFF="$ESC[39m"
- ############################################################ FUNCTIONS
- eval2()
- {
- echo "$ANSI_BLD_ON$ANSI_GRN_ON==>$ANSI_FGC_OFF $*$ANSI_BLD_OFF"
- eval "$@"
- }
- ############################################################ MAIN
- set -e
- #
- # Install dependencies
- #
- items_needed=
- # bin=someprog:pkg=somepkg \
- # file=/path/to/some_file:pkg=somepkg \
- # lib=somelib.so:pkg=somepkg \
- for entry in \
- bin=aclocal:pkg=automake \
- bin=automake:pkg=automake \
- bin=autoheader:pkg=autoconf \
- bin=autoreconf:pkg=autoconf \
- bin=gmake:pkg=gmake \
- ; do
- check="${entry%%:*}"
- item="${check#*=}"
- case "$check" in
- bin=*) type "$item" > /dev/null 2>&1 && continue ;;
- file=*) [ -e "$item" ] && continue ;;
- lib=*) ldconfig -p | awk -v lib="$item" \
- '$1==lib{exit f++}END{exit !f}' && continue ;;
- *) continue
- esac
- pkg="${entry#*:}"
- pkgname="${pkg#*=}"
- items_needed="$items_needed $pkgname"
- done
- [ "$items_needed" ] && eval2 sudo pkg install $items_needed
- #
- # Build software
- #
- patch -N < patch_smule.txt ||:
- [ -e configure ] || eval2 ./build_setup
- [ -e Makefile ] || eval2 ./configure
- eval2 gmake
- #
- # Install software to package sandbox
- #
- [ -e install ] || eval2 mkdir -p install
- eval2 gmake DESTDIR=$PWD/install install
- eval2 : SUCCESS
- ################################################################################
- # END
- ################################################################################
- dteske@nplusfreebsd.sf keepalived $ cat clean_smule.sh
- #!/bin/sh
- ############################################################ IDENT(1)
- #
- # $Title: Script to clean keepalived $
- # $Copyright: 2017-2018 Devin Teske. All rights reserved. $
- # $Smule: pkgcenter.git/master/depend/keepalived/clean_smule.sh 2018-06-22 05:01:06 +0000 dteske $
- #
- ############################################################ GLOBALS
- #
- # ANSI
- #
- ESC=$( :| awk 'BEGIN { printf "%c", 27 }' )
- ANSI_BLD_ON="$ESC[1m"
- ANSI_BLD_OFF="$ESC[22m"
- ANSI_GRN_ON="$ESC[32m"
- ANSI_FGC_OFF="$ESC[39m"
- ############################################################ FUNCTIONS
- eval2()
- {
- echo "$ANSI_BLD_ON$ANSI_GRN_ON==>$ANSI_FGC_OFF $*$ANSI_BLD_OFF"
- eval "$@"
- }
- ############################################################ MAIN
- patch -RN < patch_smule.txt
- set -e
- for item in \
- *.orig \
- *.rej \
- */*/*/Makefile \
- */*/*/Makefile.in \
- */*/.deps/ \
- */*/Makefile \
- */*/Makefile.in \
- */.deps/ \
- */Makefile \
- */Makefile.in \
- Makefile \
- Makefile.in \
- aclocal.m4 \
- ar-lib \
- autom4te.cache/ \
- compile \
- config.log \
- config.status \
- configure \
- depcomp \
- install-sh \
- keepalived.spec \
- lib/*.o \
- lib/*.orig \
- lib/*.rej \
- lib/config.h.in \
- lib/config.h.in~ \
- lib/stamp-h1 \
- missing \
- ;do
- eval2 rm -Rf "$item"
- done
- ################################################################################
- # END
- ################################################################################
- dteske@nplusfreebsd.sf keepalived $ cat patch_smule.txt
- --- configure.ac.orig 2018-06-22 03:53:05.089252000 +0000
- +++ configure.ac 2018-06-22 03:54:02.647049000 +0000
- @@ -427,7 +427,7 @@ AC_SUBST(KA_LIBS)
- # Checks for libraries.
- # Checks for header files.
- -AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/prctl.h sys/socket.h sys/time.h syslog.h unistd.h],
- +AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h],
- [], [AC_MSG_ERROR([Missing/unusable system header file <$ac_header>])])
- # check for kernel headers
- @@ -436,24 +436,6 @@ CPPFLAGS="$CPPFLAGS $kernelinc"
- dnl -- <linux/netlink.h> needed <sys/socket.h> until Linux 3.1
- dnl -- using AC_CHECK_HEADER causes a horrible error message for the user
- NETLINK_EXTRA_INCLUDE=
- -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
- - #include <linux/netlink.h>
- - ]])], [],
- - [AC_CHECK_HEADER([linux/netlink.h],
- - [
- - AC_DEFINE([NETLINK_H_NEEDS_SYS_SOCKET_H], [ 1 ], [Define to 1 if <linux/netlink.h> needs <sys/socket.h>])
- - NETLINK_EXTRA_INCLUDE="#include <sys/socket.h>"
- - ], [AC_MSG_ERROR([Missing/unusable kernel header file <linux/netlink.h>])],
- - [[#include <sys/socket.h>]])])
- -
- -AC_CHECK_HEADERS([asm/types.h linux/ethtool.h linux/icmpv6.h linux/if_ether.h linux/if_packet.h linux/ip.h linux/sockios.h linux/types.h],
- - [], [AC_MSG_ERROR([Missing/unusable kernel header file <$ac_header>])])
- -AC_CHECK_HEADERS([linux/fib_rules.h linux/if_addr.h linux/if_link.h],
- - [], [AC_MSG_ERROR([Missing/unusable kernel header file <$ac_header>])],
- - [[$NETLINK_EXTRA_INCLUDE]])
- -AC_CHECK_HEADERS([linux/if_arp.h],
- - [], [AC_MSG_ERROR([Missing/unusable <$ac_header>])],
- - [[#include <sys/socket.h>]])
- CPPFLAGS="$SAV_CPPFLAGS"
- # Checks for typedefs, structures, and compiler characteristics.
- --- lib/utils.h.orig 2018-06-22 04:21:26.596551000 +0000
- +++ lib/utils.h 2018-06-22 04:12:28.596077000 +0000
- @@ -30,6 +30,7 @@
- #include <stdint.h>
- #include <stdbool.h>
- #include <sys/socket.h>
- +#define s6_addr32 __u6_addr.__u6_addr32
- #include <netinet/in.h>
- #include <stdio.h>
- #ifdef _DEBUG_
- --- lib/notify.c.orig 2018-06-22 05:00:23.289907000 +0000
- +++ lib/notify.c 2018-06-22 05:01:48.485388000 +0000
- @@ -33,7 +33,20 @@
- #include <pwd.h>
- #include <sys/resource.h>
- #include <limits.h>
- -#include <sys/prctl.h>
- +#include <sys/wait.h>
- +
- +# define __ssp_bos0(ptr) __builtin_object_size (ptr, 0)
- +
- +#define mempcpy(dest, src, len) \
- + ((__ssp_bos0 (dest) != (size_t) -1) \
- + ? __builtin___mempcpy_chk (dest, src, len, __ssp_bos0 (dest)) \
- + : __mempcpy_ichk (dest, src, len))
- +static inline __attribute__((__always_inline__)) void *
- +__mempcpy_ichk (void *__restrict__ __dest, const void *__restrict__ __src,
- + size_t __len)
- +{
- + return __builtin___mempcpy_chk (__dest, __src, __len, __ssp_bos0 (__dest));
- +}
- #include "notify.h"
- #include "signals.h"
- @@ -43,6 +56,8 @@
- #include "keepalived_magic.h"
- #include "scheduler.h"
- +extern char **environ;
- +
- /* Default user/group for script execution */
- uid_t default_script_uid;
- gid_t default_script_gid;
- @@ -69,9 +84,6 @@ set_privileges(uid_t uid, gid_t gid)
- {
- int retval;
- - /* Ensure we receive SIGTERM if our parent process dies */
- - prctl(PR_SET_PDEATHSIG, SIGTERM);
- -
- /* If we have increased our priority, set it to default for the script */
- if (cur_prio != INT_MAX)
- cur_prio = getpriority(PRIO_PROCESS, 0);
- @@ -138,9 +150,6 @@ notify_fifo_exec(thread_master_t *m, int
- set_privileges(script->uid, script->gid);
- if (script->flags | SC_EXECABLE) {
- - /* If keepalived dies, we want the script to die */
- - prctl(PR_SET_PDEATHSIG, SIGTERM);
- -
- execve(script->args[0], script->args, environ);
- if (errno == EACCES)
- @@ -257,9 +266,6 @@ system_call(const notify_script_t* scrip
- setpgid(0, 0);
- if (script->flags & SC_EXECABLE) {
- - /* If keepalived dies, we want the script to die */
- - prctl(PR_SET_PDEATHSIG, SIGTERM);
- -
- execve(script->args[0], script->args, environ);
- /* error */
- --- lib/scheduler.c.orig 2018-06-22 05:03:20.622974000 +0000
- +++ lib/scheduler.c 2018-06-22 05:04:32.956661000 +0000
- @@ -51,7 +51,6 @@
- #include "bitops.h"
- #include "git-commit.h"
- #include <sys/utsname.h>
- -#include <linux/version.h>
- /* global vars */
- thread_master_t *master = NULL;
- @@ -297,10 +296,6 @@ report_child_status(int status, pid_t pi
- "", ""
- #endif
- );
- - log_message(LOG_INFO, " Built with kernel headers for Linux %d.%d.%d",
- - (LINUX_VERSION_CODE >> 16) & 0xff,
- - (LINUX_VERSION_CODE >> 8) & 0xff,
- - (LINUX_VERSION_CODE ) & 0xff);
- uname(&uname_buf);
- log_message(LOG_INFO, " Running on %s %s %s", uname_buf.sysname, uname_buf.release, uname_buf.version);
- log_options("configure options", KEEPALIVED_CONFIGURE_OPTIONS);
- --- lib/parser.c.orig 2018-06-22 05:14:35.174543000 +0000
- +++ lib/parser.c 2018-06-22 05:15:22.254116000 +0000
- @@ -34,7 +34,6 @@
- #include <stdlib.h>
- #include <ctype.h>
- #include <stdbool.h>
- -#include <linux/version.h>
- #include <pwd.h>
- #include <ctype.h>
- @@ -505,9 +504,6 @@ read_conf_file(const char *conf_file)
- even though testing on Linux 3.1 shows it appears to work. To be safe, don't
- use it until Linux 3.5. */
- curdir_fd = open(".", O_RDONLY | O_DIRECTORY
- -#if HAVE_DECL_O_PATH && LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
- - | O_PATH
- -#endif
- );
- char *confpath = strdup(globbuf.gl_pathv[i]);
Add Comment
Please, Sign In to add comment