[BACK]Return to parse.yacc CVS log [TXT][DIR] Up to [local] / src / usr.bin / sudo

Diff for /src/usr.bin/sudo/Attic/parse.yacc between version 1.2 and 1.3

version 1.2, 1999/12/10 06:45:11 version 1.3, 2000/01/24 04:22:53
Line 1 
Line 1 
 %{  %{
 /*  /*
  * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com>   * Copyright (c) 1996, 1998-2000 Todd C. Miller <Todd.Miller@courtesan.com>
  * All rights reserved.   * All rights reserved.
  *   *
  * This code is derived from software contributed by Chris Jepeway   * This code is derived from software contributed by Chris Jepeway
Line 79 
Line 79 
 #endif /* HAVE_LSEARCH */  #endif /* HAVE_LSEARCH */
   
 #ifndef lint  #ifndef lint
 static const char rcsid[] = "$Sudo: parse.yacc,v 1.167 1999/12/05 19:06:09 millert Exp $";  static const char rcsid[] = "$Sudo: parse.yacc,v 1.170 2000/01/17 23:46:25 millert Exp $";
 #endif /* lint */  #endif /* lint */
   
 /*  /*
Line 90 
Line 90 
 int clearaliases = TRUE;  int clearaliases = TRUE;
 int printmatches = FALSE;  int printmatches = FALSE;
 int pedantic = FALSE;  int pedantic = FALSE;
   int keepall = FALSE;
   
 /*  /*
  * Alias types   * Alias types
Line 353 
Line 354 
                             free($1);                              free($1);
                         }                          }
                 |       NETGROUP {                  |       NETGROUP {
                             if (netgr_matches($1, user_host, NULL))                              if (netgr_matches($1, user_host, user_shost, NULL))
                                 $$ = TRUE;                                  $$ = TRUE;
                             else                              else
                                 $$ = -1;                                  $$ = -1;
Line 411 
Line 412 
                              * the user was listed in sudoers.  Also, we                               * the user was listed in sudoers.  Also, we
                              * need to be able to tell whether or not a                               * need to be able to tell whether or not a
                              * user was listed for this specific host.                               * user was listed for this specific host.
                                *
                                * If keepall is set and the user matches then
                                * we need to keep entries around too...
                              */                               */
                             if (user_matches != -1 && host_matches != -1 &&                              if (user_matches != -1 && host_matches != -1 &&
                                 cmnd_matches != -1 && runas_matches != -1)                                  cmnd_matches != -1 && runas_matches != -1)
Line 419 
Line 423 
                                 (top == 2 && host_matches != -1 &&                                  (top == 2 && host_matches != -1 &&
                                 match[0].host == -1)))                                  match[0].host == -1)))
                                 pushcp;                                  pushcp;
                               else if (user_matches == TRUE && keepall)
                                   pushcp;
                             cmnd_matches = -1;                              cmnd_matches = -1;
                         }                          }
                 ;                  ;
Line 529 
Line 535 
                                     user_matches == TRUE)                                      user_matches == TRUE)
                                     append_runas($1, ", ");                                      append_runas($1, ", ");
                             }                              }
                             if (netgr_matches($1, NULL, *user_runas))                              if (netgr_matches($1, NULL, NULL, *user_runas))
                                 $$ = TRUE;                                  $$ = TRUE;
                             else                              else
                                 $$ = -1;                                  $$ = -1;
Line 783 
Line 789 
                             free($1);                              free($1);
                         }                          }
                 |       NETGROUP {                  |       NETGROUP {
                             if (netgr_matches($1, NULL, user_name))                              if (netgr_matches($1, NULL, NULL, user_name))
                                 $$ = TRUE;                                  $$ = TRUE;
                             else                              else
                                 $$ = -1;                                  $$ = -1;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3