]> granicus.if.org Git - sudo/commitdiff
Rename FOLLOW and NOFOLLOW tokens FOLLOWLNK and NOFOLLOWLNK.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Tue, 12 Feb 2019 19:02:02 +0000 (12:02 -0700)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Tue, 12 Feb 2019 19:02:02 +0000 (12:02 -0700)
Fixes a namespace collision on Solaris when bison is used.

plugins/sudoers/gram.c
plugins/sudoers/gram.h
plugins/sudoers/gram.y
plugins/sudoers/toke.c
plugins/sudoers/toke.l

index fff971b64e43186da70e3054af55725a8f69f0ce..8fd8a22023ffc9d9bbb6f972055619d8dcf4f9a9 100644 (file)
@@ -159,8 +159,8 @@ typedef union {
 #define NOLOG_OUTPUT 279
 #define MAIL 280
 #define NOMAIL 281
-#define FOLLOW 282
-#define NOFOLLOW 283
+#define FOLLOWLNK 282
+#define NOFOLLOWLNK 283
 #define ALL 284
 #define COMMENT 285
 #define HOSTALIAS 286
@@ -518,10 +518,10 @@ char *sudoersname[] =
 "COMMAND","ALIAS","DEFVAR","NTWKADDR","NETGROUP","USERGROUP","WORD","DIGEST",
 "DEFAULTS","DEFAULTS_HOST","DEFAULTS_USER","DEFAULTS_RUNAS","DEFAULTS_CMND",
 "NOPASSWD","PASSWD","NOEXEC","EXEC","SETENV","NOSETENV","LOG_INPUT",
-"NOLOG_INPUT","LOG_OUTPUT","NOLOG_OUTPUT","MAIL","NOMAIL","FOLLOW","NOFOLLOW",
-"ALL","COMMENT","HOSTALIAS","CMNDALIAS","USERALIAS","RUNASALIAS","ERROR","TYPE",
-"ROLE","PRIVS","LIMITPRIVS","CMND_TIMEOUT","NOTBEFORE","NOTAFTER","MYSELF",
-"SHA224_TOK","SHA256_TOK","SHA384_TOK","SHA512_TOK",
+"NOLOG_INPUT","LOG_OUTPUT","NOLOG_OUTPUT","MAIL","NOMAIL","FOLLOWLNK",
+"NOFOLLOWLNK","ALL","COMMENT","HOSTALIAS","CMNDALIAS","USERALIAS","RUNASALIAS",
+"ERROR","TYPE","ROLE","PRIVS","LIMITPRIVS","CMND_TIMEOUT","NOTBEFORE",
+"NOTAFTER","MYSELF","SHA224_TOK","SHA256_TOK","SHA384_TOK","SHA512_TOK",
 };
 #if defined(__cplusplus) || defined(__STDC__)
 const char * const sudoersrule[] =
@@ -606,8 +606,8 @@ char *sudoersrule[] =
 "cmndtag : cmndtag NOLOG_INPUT",
 "cmndtag : cmndtag LOG_OUTPUT",
 "cmndtag : cmndtag NOLOG_OUTPUT",
-"cmndtag : cmndtag FOLLOW",
-"cmndtag : cmndtag NOFOLLOW",
+"cmndtag : cmndtag FOLLOWLNK",
+"cmndtag : cmndtag NOFOLLOWLNK",
 "cmndtag : cmndtag MAIL",
 "cmndtag : cmndtag NOMAIL",
 "cmnd : ALL",
index c53f97a0f05e3fa1e48a4b4572e2b5307ae09040..dc8f347e0cf464c65dddaebdb11b537991130ffa 100644 (file)
@@ -23,8 +23,8 @@
 #define NOLOG_OUTPUT 279
 #define MAIL 280
 #define NOMAIL 281
-#define FOLLOW 282
-#define NOFOLLOW 283
+#define FOLLOWLNK 282
+#define NOFOLLOWLNK 283
 #define ALL 284
 #define COMMENT 285
 #define HOSTALIAS 286
index 0665ce99fe29a3b7ea301fe66442681c36426b77..c911a26d59c02f3f569e858d17d96a5b220b606f 100644 (file)
@@ -115,8 +115,8 @@ static struct command_digest *new_digest(int, char *);
 %token <tok>    NOLOG_OUTPUT           /* don't log cmnd output */
 %token <tok>    MAIL                   /* mail log message */
 %token <tok>    NOMAIL                 /* don't mail log message */
-%token <tok>    FOLLOW                 /* follow symbolic links */
-%token <tok>    NOFOLLOW               /* don't follow symbolic links */
+%token <tok>    FOLLOWLNK              /* follow symbolic links */
+%token <tok>    NOFOLLOWLNK            /* don't follow symbolic links */
 %token <tok>    ALL                    /* ALL keyword */
 %token <tok>    COMMENT                /* comment and/or carriage return */
 %token <tok>    HOSTALIAS              /* Host_Alias keyword */
@@ -687,10 +687,10 @@ cmndtag           :       /* empty */ {
                |       cmndtag NOLOG_OUTPUT {
                            $$.log_output = false;
                        }
-               |       cmndtag FOLLOW {
+               |       cmndtag FOLLOWLNK {
                            $$.follow = true;
                        }
-               |       cmndtag NOFOLLOW {
+               |       cmndtag NOFOLLOWLNK {
                            $$.follow = false;
                        }
                |       cmndtag MAIL {
index d0dd5e3d16fdc82d164e8db27e4e9de27a548ceb..c89719fba8faebba4ea9200d5ef5a28ae6aab235 100644 (file)
@@ -2864,7 +2864,7 @@ YY_RULE_SETUP
 #line 453 "toke.l"
 {
                                LEXTRACE("FOLLOW ");
-                               LEXRETURN(FOLLOW);
+                               LEXRETURN(FOLLOWLNK);
                        }
        YY_BREAK
 case 37:
@@ -2872,7 +2872,7 @@ YY_RULE_SETUP
 #line 458 "toke.l"
 {
                                LEXTRACE("NOFOLLOW ");
-                               LEXRETURN(NOFOLLOW);
+                               LEXRETURN(NOFOLLOWLNK);
                        }
        YY_BREAK
 case 38:
index d275a265759905b095f4bbb2864b0854b041e420..1bf205d94e3cfab4a67c8cb42843e9a503d96d54 100644 (file)
@@ -452,12 +452,12 @@ NOMAIL[[:blank:]]*:       {
 
 FOLLOW[[:blank:]]*:    {
                                LEXTRACE("FOLLOW ");
-                               LEXRETURN(FOLLOW);
+                               LEXRETURN(FOLLOWLNK);
                        }
 
 NOFOLLOW[[:blank:]]*:  {
                                LEXTRACE("NOFOLLOW ");
-                               LEXRETURN(NOFOLLOW);
+                               LEXRETURN(NOFOLLOWLNK);
                        }
 
 <INITIAL,GOTDEFS>(\+|\%|\%:) {