/* Define to global, ppid or tty to set the default timestamp record type. */
#undef TIMESTAMP_TYPE
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
/* The number of tries a user gets to enter their password. */
#undef TRIES_FOR_PASSWORD
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_time=yes
-else
- ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
if ${ac_cv_header_stdbool_h+:} false; then :
dnl Header file checks
dnl
AC_HEADER_DIRENT
-AC_HEADER_TIME
AC_HEADER_STDBOOL
AC_HEADER_MAJOR
AC_CHECK_HEADERS_ONCE([netgroup.h paths.h spawn.h utmpx.h wordexp.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h sys/sysmacros.h])
/*
- * Copyright (c) 2014-2015 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2014-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <errno.h>
#if defined(__MACH__) && !defined(HAVE_CLOCK_GETTIME)
/*
- * Copyright (c) 2001, 2003, 2004, 2008-2011, 2013, 2015, 2017
+ * Copyright (c) 2001, 2003, 2004, 2008-2011, 2013, 2015, 2017, 2018
* Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
#endif /* HAVE_STRINGS_H */
#include <ctype.h>
#include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include "sudo_compat.h"
#include "pathnames.h"
/*
- * Copyright (c) 2009-2011, 2013, 2017 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2009-2011, 2013, 2017-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif /* HAVE_SYS_SELECT_H */
-#if TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <errno.h>
#include "sudo_compat.h"
/*
- * Copyright (c) 2015 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2015, 2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#include <sys/time.h>
#include <stdio.h>
#include <errno.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#if !defined(HAVE_UTIMES) || defined(HAVE_FUTIME)
# include <utime.h>
#endif
/*
- * Copyright (c) 2009-2015 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2009-2015, 2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#endif /* HAVE_STRINGS_H */
#include <errno.h>
#include <limits.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#ifndef __linux__
# if defined(HAVE_SYSCTL) && defined(KERN_BOOTTIME)
# include <sys/sysctl.h>
/*
- * Copyright (c) 1993-1996,1998-2005, 2007-2016
+ * Copyright (c) 1993-1996,1998-2005, 2007-2018
* Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
#include <config.h>
#include <sys/types.h>
-#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_STRING_H
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
#include <config.h>
#include <sys/types.h>
-#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_STRING_H
#elif defined(HAVE_INTTYPES_H)
# include <inttypes.h>
#endif
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <limits.h>
#include <ctype.h>
static int yylex(void);
int yyparse(void);
-#line 103 "getdate.y"
+#line 100 "getdate.y"
#ifndef YYSTYPE_DEFINED
#define YYSTYPE_DEFINED
typedef union {
enum _MERIDIAN Meridian;
} YYSTYPE;
#endif /* YYSTYPE_DEFINED */
-#line 121 "getdate.c"
+#line 118 "getdate.c"
#define tAGO 257
#define tDAY 258
#define tDAYZONE 259
short *yysslim;
YYSTYPE *yyvs;
unsigned int yystacksize;
-#line 322 "getdate.y"
+int yyparse(void);
+#line 319 "getdate.y"
/* Month and day table. */
static TABLE const MonthDayTable[] = {
/* NOTREACHED */
}
#endif /* TEST */
-#line 959 "getdate.c"
+#line 957 "getdate.c"
/* allocate initial stack or double stack size, up to YYMAXDEPTH */
#if defined(__cplusplus) || defined(__STDC__)
static int yygrowstack(void)
switch (yyn)
{
case 3:
-#line 121 "getdate.y"
+#line 118 "getdate.y"
{
yyHaveTime++;
}
break;
case 4:
-#line 124 "getdate.y"
+#line 121 "getdate.y"
{
yyHaveZone++;
}
break;
case 5:
-#line 127 "getdate.y"
+#line 124 "getdate.y"
{
yyHaveDate++;
}
break;
case 6:
-#line 130 "getdate.y"
+#line 127 "getdate.y"
{
yyHaveDay++;
}
break;
case 7:
-#line 133 "getdate.y"
+#line 130 "getdate.y"
{
yyHaveRel++;
}
break;
case 9:
-#line 139 "getdate.y"
+#line 136 "getdate.y"
{
yyHour = yyvsp[-1].Number;
yyMinutes = 0;
}
break;
case 10:
-#line 145 "getdate.y"
+#line 142 "getdate.y"
{
yyHour = yyvsp[-3].Number;
yyMinutes = yyvsp[-1].Number;
}
break;
case 11:
-#line 151 "getdate.y"
+#line 148 "getdate.y"
{
yyHour = yyvsp[-3].Number;
yyMinutes = yyvsp[-1].Number;
}
break;
case 12:
-#line 158 "getdate.y"
+#line 155 "getdate.y"
{
yyHour = yyvsp[-5].Number;
yyMinutes = yyvsp[-3].Number;
}
break;
case 13:
-#line 164 "getdate.y"
+#line 161 "getdate.y"
{
yyHour = yyvsp[-5].Number;
yyMinutes = yyvsp[-3].Number;
}
break;
case 14:
-#line 174 "getdate.y"
+#line 171 "getdate.y"
{
yyTimezone = yyvsp[0].Number;
yyDSTmode = DSToff;
}
break;
case 15:
-#line 178 "getdate.y"
+#line 175 "getdate.y"
{
yyTimezone = yyvsp[0].Number;
yyDSTmode = DSTon;
}
break;
case 16:
-#line 183 "getdate.y"
+#line 180 "getdate.y"
{
yyTimezone = yyvsp[-1].Number;
yyDSTmode = DSTon;
}
break;
case 17:
-#line 189 "getdate.y"
+#line 186 "getdate.y"
{
yyDayOrdinal = 1;
yyDayNumber = yyvsp[0].Number;
}
break;
case 18:
-#line 193 "getdate.y"
+#line 190 "getdate.y"
{
yyDayOrdinal = 1;
yyDayNumber = yyvsp[-1].Number;
}
break;
case 19:
-#line 197 "getdate.y"
+#line 194 "getdate.y"
{
yyDayOrdinal = yyvsp[-1].Number;
yyDayNumber = yyvsp[0].Number;
}
break;
case 20:
-#line 203 "getdate.y"
+#line 200 "getdate.y"
{
yyMonth = yyvsp[-2].Number;
yyDay = yyvsp[0].Number;
}
break;
case 21:
-#line 207 "getdate.y"
+#line 204 "getdate.y"
{
if (yyvsp[-4].Number >= 100) {
yyYear = yyvsp[-4].Number;
}
break;
case 22:
-#line 218 "getdate.y"
+#line 215 "getdate.y"
{
/* ISO 8601 format. yyyy-mm-dd. */
yyYear = yyvsp[-2].Number;
}
break;
case 23:
-#line 224 "getdate.y"
+#line 221 "getdate.y"
{
/* e.g. 17-JUN-1992. */
yyDay = yyvsp[-2].Number;
}
break;
case 24:
-#line 230 "getdate.y"
+#line 227 "getdate.y"
{
yyMonth = yyvsp[-1].Number;
yyDay = yyvsp[0].Number;
}
break;
case 25:
-#line 234 "getdate.y"
+#line 231 "getdate.y"
{
yyMonth = yyvsp[-3].Number;
yyDay = yyvsp[-2].Number;
}
break;
case 26:
-#line 239 "getdate.y"
+#line 236 "getdate.y"
{
yyMonth = yyvsp[0].Number;
yyDay = yyvsp[-1].Number;
}
break;
case 27:
-#line 243 "getdate.y"
+#line 240 "getdate.y"
{
yyMonth = yyvsp[-1].Number;
yyDay = yyvsp[-2].Number;
}
break;
case 28:
-#line 250 "getdate.y"
+#line 247 "getdate.y"
{
yyRelSeconds = -yyRelSeconds;
yyRelMonth = -yyRelMonth;
}
break;
case 30:
-#line 257 "getdate.y"
+#line 254 "getdate.y"
{
yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
}
break;
case 31:
-#line 260 "getdate.y"
+#line 257 "getdate.y"
{
yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
}
break;
case 32:
-#line 263 "getdate.y"
+#line 260 "getdate.y"
{
yyRelSeconds += yyvsp[0].Number * 60L;
}
break;
case 33:
-#line 266 "getdate.y"
+#line 263 "getdate.y"
{
yyRelSeconds += yyvsp[-1].Number;
}
break;
case 34:
-#line 269 "getdate.y"
+#line 266 "getdate.y"
{
yyRelSeconds += yyvsp[-1].Number;
}
break;
case 35:
-#line 272 "getdate.y"
+#line 269 "getdate.y"
{
yyRelSeconds++;
}
break;
case 36:
-#line 275 "getdate.y"
+#line 272 "getdate.y"
{
yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
}
break;
case 37:
-#line 278 "getdate.y"
+#line 275 "getdate.y"
{
yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
}
break;
case 38:
-#line 281 "getdate.y"
+#line 278 "getdate.y"
{
yyRelMonth += yyvsp[0].Number;
}
break;
case 39:
-#line 286 "getdate.y"
+#line 283 "getdate.y"
{
if (yyHaveTime && yyHaveDate && !yyHaveRel)
yyYear = yyvsp[0].Number;
}
break;
case 40:
-#line 313 "getdate.y"
+#line 310 "getdate.y"
{
yyval.Meridian = MER24;
}
break;
case 41:
-#line 316 "getdate.y"
+#line 313 "getdate.y"
{
yyval.Meridian = yyvsp[0].Meridian;
}
break;
-#line 1457 "getdate.c"
+#line 1455 "getdate.c"
}
yyssp -= yym;
yystate = *yyssp;
#include <config.h>
#include <sys/types.h>
-#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_STRING_H
#elif defined(HAVE_INTTYPES_H)
# include <inttypes.h>
#endif
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <limits.h>
#include <ctype.h>
/*
- * Copyright (c) 2010-2015 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2010-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_STRING_H
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <ctype.h>
#include <errno.h>
#include <pwd.h>
/*
- * Copyright (c) 2009-2017 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2009-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
/*
- * Copyright (c) 2003-2017 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2003-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* This code is derived from software contributed by Aaron Spangler.
*
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
/*
- * Copyright (c) 2003-2016 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2003-2018 Todd C. Miller <Todd.Miller@sudo.ws>
* Copyright (c) 2011 Daniel Kopecek <dkopecek@redhat.com>
*
* This code is derived from software contributed by Aaron Spangler.
#ifdef HAVE_SSSD
#include <sys/types.h>
-#include <sys/time.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <ctype.h>
#include <pwd.h>
#include <grp.h>
/*
- * Copyright (c) 2009-2017 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2009-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
/*
- * Copyright (c) 2014-2017 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2014-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#include <config.h>
#include <sys/types.h>
-#include <sys/time.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <stdio.h>
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
/*
- * Copyright (c) 1996, 1998-2005, 2007-2017
+ * Copyright (c) 1996, 1998-2005, 2007-2018
* Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
-#include <sys/time.h>
#include <sys/uio.h>
#ifndef __TANDEM
# include <sys/file.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
+#include <time.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
#include "sudoers.h"
#include "interfaces.h"
/*
- * Copyright (c) 1996, 1998-2005, 2007-2015
+ * Copyright (c) 1996, 1998-2005, 2007-2015, 2018
* Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
#include <sys/types.h>
#include <sys/socket.h>
-#include <sys/time.h>
#include <sys/ioctl.h>
#if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFCONF)
# include <sys/sockio.h>
/*
- * Copyright (c) 2008, 2010-2016 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2008, 2010-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/time.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
+#include <time.h>
#include <unistd.h>
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#else
# include "compat/stdbool.h"
#endif /* HAVE_STDBOOL_H */
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
#include "sudo_gettext.h" /* must be included before sudo_compat.h */
/*
- * Copyright (c) 2009-2017 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2009-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/socket.h>
-#include <sys/time.h>
#include <sys/resource.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <grp.h>
#include <pwd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#ifdef HAVE_SELINUX
# include <selinux/selinux.h> /* for is_selinux_enabled() */
#endif
/*
- * Copyright (c) 2004-2008, 2010-2017 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2004-2008, 2010-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/time.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <stdio.h>
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif /* HAVE_STRINGS_H */
+#include <time.h>
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
#include "sudo.h"
#include "sudo_exec.h"
/*
- * Copyright (c) 2011-2016 Todd C. Miller <Todd.Miller@sudo.ws>
+ * Copyright (c) 2011-2018 Todd C. Miller <Todd.Miller@sudo.ws>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#include <unistd.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <time.h>
-#endif
+#include <time.h>
#ifdef HAVE_UTMPX_H
# include <utmpx.h>
#else