]> granicus.if.org Git - sudo/commit
o add a 'val' element to aliasinfo struct and move -> parse.h
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 9 Aug 1999 22:25:17 +0000 (22:25 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 9 Aug 1999 22:25:17 +0000 (22:25 +0000)
commit2ce523cd1ff24f98caf7fbddffc3845932df318f
tree8cd6e161853497bb8190e2a0ae08502440e69faf
parent518eec0abb0528f997564a7bb2a412ca0d73a7dd
o add a 'val' element to aliasinfo struct and move -> parse.h
o find_alias() now returns an aliasinfo * instead of boolean
o add_alias() now takes a value parameter to store in the aliasinfo.val
o The cmnd, hostspec, runasuser, and user rules now return:
1) positive match
0) negative match (due to '!')
-1) no match
This means setting $$ explicitly in all cases, which I should have done in
the first place.  It also means that we always store a value that is != -1
and when we see a '!' we can set *_matches to !rv if rv != -1.
The upshot of all of this is that '!' now works the way it should in
lists and some of the rules are more uniform and sensible.
parse.yacc
sudo.tab.c