]> granicus.if.org Git - sudo/commitdiff
Remove support for the obsolete malloc.h header.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 19 Jun 2015 02:30:59 +0000 (20:30 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 19 Jun 2015 02:30:59 +0000 (20:30 -0600)
16 files changed:
config.h.in
configure
configure.ac
lib/util/getcwd.c
lib/util/gethostname.c
lib/util/glob.c
lib/util/locking.c
lib/util/parseln.c
lib/util/pw_dup.c
lib/util/reallocarray.c
lib/util/snprintf.c
lib/util/strndup.c
plugins/sudoers/toke.c
plugins/sudoers/toke.l
plugins/sudoers/toke_util.c
src/env_hooks.c

index 866b64b61287ce9d3ebd08beadc85be2e8e8d602..4fde90561cb62415d6029de0eb2f43867a178328 100644 (file)
 /* Define to 1 if you have the <maillock.h> header file. */
 #undef HAVE_MAILLOCK_H
 
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
index 011769c92eb20e2b741a12495d475e29a974e7c0..ad5178cb2bc87d2149c81788bb2474fa6978d313 100755 (executable)
--- a/configure
+++ b/configure
@@ -2641,7 +2641,6 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
-as_fn_append ac_header_list " malloc.h"
 as_fn_append ac_header_list " netgroup.h"
 as_fn_append ac_header_list " paths.h"
 as_fn_append ac_header_list " spawn.h"
@@ -16839,8 +16838,6 @@ done
 
 
 
-
-
 
 
 for ac_header in endian.h sys/endian.h machine/endian.h
index 71f251cebfd538596c25522af8890e3d4783ce97..d84773b155bed5ce1f965c6d1bae2de72b43da0f 100644 (file)
@@ -2242,7 +2242,7 @@ AC_HEADER_DIRENT
 AC_HEADER_TIME
 AC_HEADER_STDBOOL
 AC_HEADER_MAJOR
-AC_CHECK_HEADERS_ONCE([malloc.h netgroup.h paths.h spawn.h utmpx.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h sys/sysmacros.h])
+AC_CHECK_HEADERS_ONCE([netgroup.h paths.h spawn.h utmpx.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h sys/sysmacros.h])
 AC_CHECK_HEADERS([endian.h] [sys/endian.h] [machine/endian.h], [break])
 AC_CHECK_HEADERS([procfs.h] [sys/procfs.h], [AC_CHECK_MEMBERS(struct psinfo.pr_ttydev, [AC_CHECK_FUNCS([_ttyname_dev])], [], [AC_INCLUDES_DEFAULT
 #ifdef HAVE_PROCFS_H
index 44662732ab71c53c90c97d6b37dd793b5d3ce56e..c51df79aac1ea150cf0835a1bf2d41652de52234 100644 (file)
@@ -50,9 +50,6 @@
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
index 2d240e0fe852ecdab72673ab3b75d71c141c3bdc..e488f2299f28cf8e2df57cbde619efc5d50bd613 100644 (file)
@@ -26,9 +26,6 @@
 #  include <stdlib.h>
 # endif
 #endif /* STDC_HEADERS */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #include <unistd.h>
 
 #include "sudo_compat.h"
index 8d4f262d20604be882581ca6860f1ee69990e5dc..e73211d085b59e42a12ab27ca65f53589c15d891 100644 (file)
@@ -66,9 +66,6 @@
 #  include <stdlib.h>
 # endif
 #endif /* STDC_HEADERS */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
 #endif /* HAVE_STRING_H */
index d69a429eb6da98df2b50894a886a89ebab2d9189..23922966a1a551f205720526f57ed3198171a1da 100644 (file)
@@ -42,9 +42,6 @@
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif /* HAVE_STRING_H */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #include <ctype.h>
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index cb249b0a657d404d04933e693f71f45fda3ca5c9..d586ff4f13b25976adde7a64aacdf042bff42f40 100644 (file)
@@ -35,9 +35,6 @@
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif /* HAVE_STRING_H */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #include <ctype.h>
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
index 2593f1107d53960341e385c1125e99548c7c270c..49b4d1eac60c32d0999c111ef026c29e0231f5d9 100644 (file)
@@ -40,9 +40,6 @@
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #include <pwd.h>
 
 #include "sudo_compat.h"
index 7d2588e376524de97371dfd36d6d687c6b76f068..071ab7c78b3e53a42dd003ef55bab4c27dc19fa8 100644 (file)
@@ -28,9 +28,6 @@
 #  include <stdlib.h>
 # endif
 #endif /* STDC_HEADERS */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #if defined(HAVE_STDINT_H)
 # include <stdint.h>
 #elif defined(HAVE_INTTYPES_H)
index b980d3dc74f0e5271afd634e612866a4fec364d3..3fcf85ecabb65bb13db589bec6e4ccf9b3ff52d4 100644 (file)
@@ -77,9 +77,6 @@
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #include <unistd.h>
 #ifdef PRINTF_WIDE_CHAR
 # include <wchar.h>
index 8a13032ec09a1b68b72f5518598cc95547ed67a0..3b5f726f6cf2b741d90bcc79d2a15b5149094671 100644 (file)
@@ -30,9 +30,6 @@
 #  include <stdlib.h>
 # endif
 #endif /* STDC_HEADERS */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #ifdef HAVE_STRING_H
 # include <string.h>
 #endif /* HAVE_STRING_H */
index 350f3d8a809d3c0c7a67429bf6eb50d84a18f7ba..e1e3c959ec83ed5600dfbd4203f1c20bf145bf90 100644 (file)
@@ -1984,9 +1984,6 @@ char *yytext;
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #ifdef HAVE_DIRENT_H
 # include <dirent.h>
 # define NAMLEN(dirent) strlen((dirent)->d_name)
@@ -2060,7 +2057,7 @@ int (*trace_print)(const char *msg) = sudoers_trace_print;
 
 #define WANTDIGEST 6
 
-#line 2063 "lex.sudoers.c"
+#line 2060 "lex.sudoers.c"
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -2214,9 +2211,9 @@ YY_DECL
        register char *yy_cp, *yy_bp;
        register int yy_act;
 
-#line 141 "toke.l"
+#line 138 "toke.l"
 
-#line 2219 "lex.sudoers.c"
+#line 2216 "lex.sudoers.c"
 
        if ( yy_init )
                {
@@ -2302,7 +2299,7 @@ do_action:        /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 142 "toke.l"
+#line 139 "toke.l"
 {
                            LEXTRACE(", ");
                            LEXRETURN(',');
@@ -2310,12 +2307,12 @@ YY_RULE_SETUP
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 147 "toke.l"
+#line 144 "toke.l"
 BEGIN STARTDEFS;
        YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 149 "toke.l"
+#line 146 "toke.l"
 {
                            BEGIN INDEFS;
                            LEXTRACE("DEFVAR ");
@@ -2327,7 +2324,7 @@ YY_RULE_SETUP
 
 case 4:
 YY_RULE_SETUP
-#line 158 "toke.l"
+#line 155 "toke.l"
 {
                            BEGIN STARTDEFS;
                            LEXTRACE(", ");
@@ -2336,7 +2333,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 164 "toke.l"
+#line 161 "toke.l"
 {
                            LEXTRACE("= ");
                            LEXRETURN('=');
@@ -2344,7 +2341,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 169 "toke.l"
+#line 166 "toke.l"
 {
                            LEXTRACE("+= ");
                            LEXRETURN('+');
@@ -2352,7 +2349,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 174 "toke.l"
+#line 171 "toke.l"
 {
                            LEXTRACE("-= ");
                            LEXRETURN('-');
@@ -2360,7 +2357,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 179 "toke.l"
+#line 176 "toke.l"
 {
                            LEXTRACE("BEGINSTR ");
                            sudoerslval.string = NULL;
@@ -2370,7 +2367,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 186 "toke.l"
+#line 183 "toke.l"
 {
                            LEXTRACE("WORD(2) ");
                            if (!fill(sudoerstext, sudoersleng))
@@ -2382,7 +2379,7 @@ YY_RULE_SETUP
 
 case 10:
 YY_RULE_SETUP
-#line 195 "toke.l"
+#line 192 "toke.l"
 {
                            /* Line continuation char followed by newline. */
                            sudolineno++;
@@ -2391,7 +2388,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 201 "toke.l"
+#line 198 "toke.l"
 {
                            LEXTRACE("ENDSTR ");
                            BEGIN prev_state;
@@ -2426,7 +2423,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 233 "toke.l"
+#line 230 "toke.l"
 {
                            LEXTRACE("BACKSLASH ");
                            if (!append(sudoerstext, sudoersleng))
@@ -2435,7 +2432,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 239 "toke.l"
+#line 236 "toke.l"
 {
                            LEXTRACE("STRBODY ");
                            if (!append(sudoerstext, sudoersleng))
@@ -2446,7 +2443,7 @@ YY_RULE_SETUP
 
 case 14:
 YY_RULE_SETUP
-#line 247 "toke.l"
+#line 244 "toke.l"
 {
                            /* quoted fnmatch glob char, pass verbatim */
                            LEXTRACE("QUOTEDCHAR ");
@@ -2457,7 +2454,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 255 "toke.l"
+#line 252 "toke.l"
 {
                            /* quoted sudoers special char, strip backslash */
                            LEXTRACE("QUOTEDCHAR ");
@@ -2468,7 +2465,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 263 "toke.l"
+#line 260 "toke.l"
 {
                            BEGIN INITIAL;
                            yyless(0);
@@ -2477,7 +2474,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 269 "toke.l"
+#line 266 "toke.l"
 {
                            LEXTRACE("ARG ");
                            if (!fill_args(sudoerstext, sudoersleng, sawspace))
@@ -2488,7 +2485,7 @@ YY_RULE_SETUP
 
 case 18:
 YY_RULE_SETUP
-#line 277 "toke.l"
+#line 274 "toke.l"
 {
                            /* Only return DIGEST if the length is correct. */
                            if (sudoersleng == digest_len * 2) {
@@ -2504,7 +2501,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 290 "toke.l"
+#line 287 "toke.l"
 {
                            /* Only return DIGEST if the length is correct. */
                            int len;
@@ -2528,7 +2525,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 311 "toke.l"
+#line 308 "toke.l"
 {
                            char *path;
 
@@ -2549,7 +2546,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 329 "toke.l"
+#line 326 "toke.l"
 {
                            char *path;
 
@@ -2573,7 +2570,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 350 "toke.l"
+#line 347 "toke.l"
 {
                            char deftype;
                            int n;
@@ -2616,7 +2613,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 390 "toke.l"
+#line 387 "toke.l"
 {
                            int n;
 
@@ -2645,7 +2642,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 416 "toke.l"
+#line 413 "toke.l"
 {
                                /* cmnd does not require passwd for this user */
                                LEXTRACE("NOPASSWD ");
@@ -2654,7 +2651,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 422 "toke.l"
+#line 419 "toke.l"
 {
                                /* cmnd requires passwd for this user */
                                LEXTRACE("PASSWD ");
@@ -2663,7 +2660,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 428 "toke.l"
+#line 425 "toke.l"
 {
                                LEXTRACE("NOEXEC ");
                                LEXRETURN(NOEXEC);
@@ -2671,7 +2668,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 433 "toke.l"
+#line 430 "toke.l"
 {
                                LEXTRACE("EXEC ");
                                LEXRETURN(EXEC);
@@ -2679,7 +2676,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 438 "toke.l"
+#line 435 "toke.l"
 {
                                LEXTRACE("SETENV ");
                                LEXRETURN(SETENV);
@@ -2687,7 +2684,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 443 "toke.l"
+#line 440 "toke.l"
 {
                                LEXTRACE("NOSETENV ");
                                LEXRETURN(NOSETENV);
@@ -2695,7 +2692,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 448 "toke.l"
+#line 445 "toke.l"
 {
                                LEXTRACE("LOG_OUTPUT ");
                                LEXRETURN(LOG_OUTPUT);
@@ -2703,7 +2700,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 453 "toke.l"
+#line 450 "toke.l"
 {
                                LEXTRACE("NOLOG_OUTPUT ");
                                LEXRETURN(NOLOG_OUTPUT);
@@ -2711,7 +2708,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 458 "toke.l"
+#line 455 "toke.l"
 {
                                LEXTRACE("LOG_INPUT ");
                                LEXRETURN(LOG_INPUT);
@@ -2719,7 +2716,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 463 "toke.l"
+#line 460 "toke.l"
 {
                                LEXTRACE("NOLOG_INPUT ");
                                LEXRETURN(NOLOG_INPUT);
@@ -2727,7 +2724,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 468 "toke.l"
+#line 465 "toke.l"
 {
                                LEXTRACE("MAIL ");
                                LEXRETURN(MAIL);
@@ -2735,7 +2732,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 473 "toke.l"
+#line 470 "toke.l"
 {
                                LEXTRACE("NOMAIL ");
                                LEXRETURN(NOMAIL);
@@ -2743,7 +2740,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 478 "toke.l"
+#line 475 "toke.l"
 {
                            /* empty group or netgroup */
                            LEXTRACE("ERROR ");
@@ -2752,7 +2749,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 484 "toke.l"
+#line 481 "toke.l"
 {
                            /* netgroup */
                            if (!fill(sudoerstext, sudoersleng))
@@ -2763,7 +2760,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 492 "toke.l"
+#line 489 "toke.l"
 {
                            /* group */
                            if (!fill(sudoerstext, sudoersleng))
@@ -2774,7 +2771,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 500 "toke.l"
+#line 497 "toke.l"
 {
                            if (!fill(sudoerstext, sudoersleng))
                                yyterminate();
@@ -2784,7 +2781,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 507 "toke.l"
+#line 504 "toke.l"
 {
                            if (!fill(sudoerstext, sudoersleng))
                                yyterminate();
@@ -2794,7 +2791,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 514 "toke.l"
+#line 511 "toke.l"
 {
                            if (!ipv6_valid(sudoerstext)) {
                                LEXTRACE("ERROR ");
@@ -2808,7 +2805,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 525 "toke.l"
+#line 522 "toke.l"
 {
                            if (!ipv6_valid(sudoerstext)) {
                                LEXTRACE("ERROR ");
@@ -2822,7 +2819,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 536 "toke.l"
+#line 533 "toke.l"
 {
                            LEXTRACE("ALL ");
                            LEXRETURN(ALL);
@@ -2831,7 +2828,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 542 "toke.l"
+#line 539 "toke.l"
 {
 #ifdef HAVE_SELINUX
                            LEXTRACE("ROLE ");
@@ -2843,7 +2840,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 551 "toke.l"
+#line 548 "toke.l"
 {
 #ifdef HAVE_SELINUX
                            LEXTRACE("TYPE ");
@@ -2855,7 +2852,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 559 "toke.l"
+#line 556 "toke.l"
 {
 #ifdef HAVE_PRIV_SET
                            LEXTRACE("PRIVS ");
@@ -2867,7 +2864,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 568 "toke.l"
+#line 565 "toke.l"
 {
 #ifdef HAVE_PRIV_SET
                            LEXTRACE("LIMITPRIVS ");
@@ -2879,7 +2876,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 577 "toke.l"
+#line 574 "toke.l"
 {
                        got_alias:
                            if (!fill(sudoerstext, sudoersleng))
@@ -2890,7 +2887,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 585 "toke.l"
+#line 582 "toke.l"
 {
                            /* XXX - no way to specify digest for command */
                            /* no command args allowed for Defaults!/path */
@@ -2902,7 +2899,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 594 "toke.l"
+#line 591 "toke.l"
 {
                            digest_len = SHA224_DIGEST_LENGTH;
                            BEGIN WANTDIGEST;
@@ -2912,7 +2909,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 601 "toke.l"
+#line 598 "toke.l"
 {
                            digest_len = SHA256_DIGEST_LENGTH;
                            BEGIN WANTDIGEST;
@@ -2922,7 +2919,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 608 "toke.l"
+#line 605 "toke.l"
 {
                            digest_len = SHA384_DIGEST_LENGTH;
                            BEGIN WANTDIGEST;
@@ -2932,7 +2929,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 615 "toke.l"
+#line 612 "toke.l"
 {
                            digest_len = SHA512_DIGEST_LENGTH;
                            BEGIN WANTDIGEST;
@@ -2942,7 +2939,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 622 "toke.l"
+#line 619 "toke.l"
 {
                            BEGIN GOTCMND;
                            LEXTRACE("COMMAND ");
@@ -2952,7 +2949,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 629 "toke.l"
+#line 626 "toke.l"
 {
                            /* directories can't have args... */
                            if (sudoerstext[sudoersleng - 1] == '/') {
@@ -2970,7 +2967,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 644 "toke.l"
+#line 641 "toke.l"
 {
                            LEXTRACE("BEGINSTR ");
                            sudoerslval.string = NULL;
@@ -2980,7 +2977,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 651 "toke.l"
+#line 648 "toke.l"
 {
                            /* a word */
                            if (!fill(sudoerstext, sudoersleng))
@@ -2991,7 +2988,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 659 "toke.l"
+#line 656 "toke.l"
 {
                            LEXTRACE("( ");
                            LEXRETURN('(');
@@ -2999,7 +2996,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 664 "toke.l"
+#line 661 "toke.l"
 {
                            LEXTRACE(") ");
                            LEXRETURN(')');
@@ -3007,7 +3004,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 60:
 YY_RULE_SETUP
-#line 669 "toke.l"
+#line 666 "toke.l"
 {
                            LEXTRACE(", ");
                            LEXRETURN(',');
@@ -3015,7 +3012,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 674 "toke.l"
+#line 671 "toke.l"
 {
                            LEXTRACE("= ");
                            LEXRETURN('=');
@@ -3023,7 +3020,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 679 "toke.l"
+#line 676 "toke.l"
 {
                            LEXTRACE(": ");
                            LEXRETURN(':');
@@ -3031,7 +3028,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 684 "toke.l"
+#line 681 "toke.l"
 {
                            if (sudoersleng & 1) {
                                LEXTRACE("!");
@@ -3041,7 +3038,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 691 "toke.l"
+#line 688 "toke.l"
 {
                            if (YY_START == INSTR) {
                                LEXTRACE("ERROR ");
@@ -3056,14 +3053,14 @@ YY_RULE_SETUP
        YY_BREAK
 case 65:
 YY_RULE_SETUP
-#line 703 "toke.l"
+#line 700 "toke.l"
 {                      /* throw away space/tabs */
                            sawspace = true;    /* but remember for fill_args */
                        }
        YY_BREAK
 case 66:
 YY_RULE_SETUP
-#line 707 "toke.l"
+#line 704 "toke.l"
 {
                            sawspace = true;    /* remember for fill_args */
                            sudolineno++;
@@ -3072,7 +3069,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 713 "toke.l"
+#line 710 "toke.l"
 {
                            if (sudoerstext[sudoersleng - 1] == '\n') {
                                /* comment ending in a newline */
@@ -3089,7 +3086,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 727 "toke.l"
+#line 724 "toke.l"
 {
                            LEXTRACE("ERROR ");
                            LEXRETURN(ERROR);
@@ -3102,7 +3099,7 @@ case YY_STATE_EOF(STARTDEFS):
 case YY_STATE_EOF(INDEFS):
 case YY_STATE_EOF(INSTR):
 case YY_STATE_EOF(WANTDIGEST):
-#line 732 "toke.l"
+#line 729 "toke.l"
 {
                            if (YY_START != INITIAL) {
                                BEGIN INITIAL;
@@ -3115,10 +3112,10 @@ case YY_STATE_EOF(WANTDIGEST):
        YY_BREAK
 case 69:
 YY_RULE_SETUP
-#line 742 "toke.l"
+#line 739 "toke.l"
 ECHO;
        YY_BREAK
-#line 3121 "lex.sudoers.c"
+#line 3118 "lex.sudoers.c"
 
        case YY_END_OF_BUFFER:
                {
@@ -4009,7 +4006,7 @@ int main()
        return 0;
        }
 #endif
-#line 742 "toke.l"
+#line 739 "toke.l"
 
 struct path_list {
     SLIST_ENTRY(path_list) entries;
index ccbd2d5d021cdc544f6352fdecb44039fc9ed8aa..ff72806ec74f2abc1b9e1a5ac74f0e969502c222 100644 (file)
@@ -50,9 +50,6 @@
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #ifdef HAVE_DIRENT_H
 # include <dirent.h>
 # define NAMLEN(dirent) strlen((dirent)->d_name)
index 6d0979ef20b02f8cc15046ad729c9b28190828ac..a3f19bc982e423ac96aa60974caa52d1d7938548 100644 (file)
@@ -43,9 +43,6 @@
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #include <errno.h>
 
 #include "sudoers.h"
index bb250b50597a89defa77b15043bd64248e5a0f70..5917a08489cf534842a232bbc9cd56dee015368d 100644 (file)
@@ -33,9 +33,6 @@
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #include <errno.h>
 
 #include "sudo.h"