From: Todd C. Miller Date: Thu, 14 Jun 2007 16:03:53 +0000 (+0000) Subject: Redo the long syslog line splitting based on a patch from Eygene Ryabinkin. X-Git-Tag: SUDO_1_7_0~556 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c22096ac33aa7ddd555143d8ceaa27222d0e72ea;p=sudo Redo the long syslog line splitting based on a patch from Eygene Ryabinkin. Include memrchr() for systems without it. --- diff --git a/Makefile.in b/Makefile.in index e272e44e6..b176fec7b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -101,10 +101,11 @@ PROGS = @PROGS@ SRCS = alloc.c alloca.c check.c closefrom.c def_data.c defaults.c env.c \ error.c fileops.c find_path.c fnmatch.c getcwd.c getprogname.c \ getspwuid.c gettime.c goodpath.c gram.c gram.y interfaces.c ldap.c \ - logging.c match.c mon_systrace.c parse.c pwutil.c set_perms.c \ - sigaction.c snprintf.c strcasecmp.c strerror.c strlcat.c strlcpy.c \ - sudo.c sudo_noexec.c sudo_edit.c testsudoers.c tgetpass.c toke.c toke.l \ - tsgetgrpw.c utimes.c visudo.c zero_bytes.c redblack.c $(AUTH_SRCS) + logging.c match.c mkstemp.c memrchr.c mon_systrace.c parse.c pwutil.c \ + set_perms.c sigaction.c snprintf.c strcasecmp.c strerror.c strlcat.c \ + strlcpy.c sudo.c sudo_noexec.c sudo_edit.c testsudoers.c tgetpass.c \ + toke.c toke.l tsgetgrpw.c utimes.c visudo.c zero_bytes.c redblack.c \ + $(AUTH_SRCS) AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/bsdauth.c auth/dce.c auth/fwtk.c \ auth/kerb4.c auth/kerb5.c auth/pam.c auth/passwd.c auth/rfc1938.c \ @@ -255,6 +256,8 @@ logging.o: $(srcdir)/logging.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/logging.c match.o: $(srcdir)/match.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/interfaces.h $(devdir)/gram.h $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/match.c +memrchr.o: $(srcdir)/memrchr.c $(SUDODEP) + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/memrchr.c mkstemp.o: $(srcdir)/mkstemp.c $(SUDODEP) $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/mkstemp.c mon_solaris.o: $(srcdir)/mon_solaris.c $(SUDODEP) $(srcdir)/mon_solaris.h diff --git a/config.h.in b/config.h.in index ffe79a1ce..4179f5ebb 100644 --- a/config.h.in +++ b/config.h.in @@ -236,6 +236,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `memrchr' function. */ +#undef HAVE_MEMRCHR + /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET diff --git a/configure b/configure index fb94e4b14..49b06c5f7 100755 --- a/configure +++ b/configure @@ -15850,7 +15850,8 @@ _ACEOF -for ac_func in strerror strcasecmp sigaction strlcpy strlcat + +for ac_func in memrchr strerror strcasecmp sigaction strlcpy strlcat do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 diff --git a/configure.in b/configure.in index 9918bb758..d71be6f55 100644 --- a/configure.in +++ b/configure.in @@ -1692,7 +1692,7 @@ if test "$ac_cv_func_fnmatch_works" = no; then AC_LIBOBJ(fnmatch) fi SUDO_FUNC_ISBLANK -AC_REPLACE_FUNCS(strerror strcasecmp sigaction strlcpy strlcat) +AC_REPLACE_FUNCS(memrchr strerror strcasecmp sigaction strlcpy strlcat) AC_CHECK_FUNCS(closefrom, [], [AC_LIBOBJ(closefrom) AC_CHECK_DECL(F_CLOSEM, AC_DEFINE(HAVE_FCNTL_CLOSEM), [], [ #include