Commit Graph

3932 Commits

Author SHA1 Message Date
Todd C. Miller
19ff128f31 back out partial ldaps support mistakenly committed 2007-09-04 22:51:35 +00:00
Todd C. Miller
84a22a2d52 Add support for unix groups and netgroups in sudoRunas 2007-09-04 14:57:14 +00:00
Todd C. Miller
32403a2d83 Fix sudoedit of a non-existent file. From Tilo Stritzky. 2007-09-03 20:28:15 +00:00
Todd C. Miller
2bff032c9f regen 2007-09-02 21:05:58 +00:00
Todd C. Miller
290eff4f5b update --passprompt escape info 2007-09-02 21:05:32 +00:00
Todd C. Miller
5ac0dc57b4 remove now-bogus comment and update copyright date 2007-09-02 21:03:21 +00:00
Todd C. Miller
237922518b Fix up use of with_passwd 2007-09-02 20:35:52 +00:00
Todd C. Miller
16871871d3 Update to autoconf-2.61 andf libtool-1.5.24 2007-09-02 20:25:53 +00:00
Todd C. Miller
0459e07d4f "cmp -s" not just cmp
Add @datarootdir@ to quiet autoconf-2.61
2007-09-02 20:17:23 +00:00
Todd C. Miller
d8e1c80903 regen 2007-09-01 21:39:24 +00:00
Todd C. Miller
b11b56deb7 move tags and runaslist propagation to be earlier 2007-09-01 21:39:18 +00:00
Todd C. Miller
dee39f572f If -f flag given use the permissions of the original file as a template 2007-09-01 13:34:41 +00:00
Todd C. Miller
cbe6be8f8f prevent a double free() when re-initing the parser 2007-09-01 12:45:11 +00:00
Todd C. Miller
a7bfc59097 regen 2007-08-31 23:30:35 +00:00
Todd C. Miller
19fa259480 Remove support for compilers that don't support void * 2007-08-31 23:30:07 +00:00
Todd C. Miller
6b3157d803 regen 2007-08-31 23:14:37 +00:00
Todd C. Miller
d72778832c Move list manipulation macros to list.h and create C versions of
the more complex ones in list.c.  The names have been down-cased
so they appear more like normal functions.
2007-08-31 23:13:26 +00:00
Todd C. Miller
07ebde4098 Fix cmp command when regenerating parser.
Make gram.o the first dependency for all programs so gram.h will
be generated before anything that needs it.
2007-08-31 21:21:01 +00:00
Todd C. Miller
d56d0b1155 Convert NEW_DEFAULT anf NEW_MEMBER into static functions. 2007-08-31 17:56:30 +00:00
Todd C. Miller
10e5d4e708 Use LH_FOREACH_REV when checking permission and short-circuit on
the first non-UNSPEC hit we get for the command.  This means that
instead of cycling through the all the parsed sudoers entries we
start at the end and work backwards and quit after the first positive
or negative match.
2007-08-31 01:21:26 +00:00
Todd C. Miller
270ba11dbf regen 2007-08-31 01:13:05 +00:00
Todd C. Miller
d1dbe2ecee Change list head macros to take a pointer, not a struct. 2007-08-31 01:12:50 +00:00
Todd C. Miller
4df7037816 regen 2007-08-31 00:46:49 +00:00
Todd C. Miller
470a710c3c Propagate the runasspec from one command to the next in a cmndspec. 2007-08-31 00:46:43 +00:00
Todd C. Miller
1d69c0d63f Replace has_meta() with a macro that calls strpbrk(). 2007-08-30 20:15:48 +00:00
Todd C. Miller
bb51d5210a regen 2007-08-30 20:04:24 +00:00
Todd C. Miller
8cdea0b941 Use a list head struct when storing the semi-circular lists and
convert to tail queues in the process.  This will allow us to
reverse foreach loops more easily and it makes it clearer which
functions expect a list as opposed to a single member.

Add macros for manipulating lists.  Some of these should become functions.

When freeing up a list, just pop off the last item in the queue instead
of going from head to tail.  This is simpler since we don't have to
stash a pointer to the next member, we always just use the last one
in the queue until the queue is empty.

Rename match functions that take a list to have list in the name.
Break cmnd_matches() into cmnd_matches() and cmndlist_matches.
2007-08-30 17:26:35 +00:00
Todd C. Miller
a05abf5c88 Fix pasto, append "!" not negated (which is an int) for sudo -l output. 2007-08-30 17:12:00 +00:00
Todd C. Miller
0e30ec1997 Remove the dependency of gram .h on gram.y, the .c dependency is enough.
Only move y.tab.h to gram.h if it is different; avoids needless rebuilding.
2007-08-30 16:45:28 +00:00
Todd C. Miller
aaacf16ee0 Defaults lines may be associated with lists of users, hosts, commands
and runas users, not just single entries.
2007-08-27 19:51:58 +00:00
Todd C. Miller
cd6d9d7e1e Revert the "cmp" portion of the last diff, it doesn't make sense. 2007-08-26 21:42:31 +00:00
Todd C. Miller
e90c326744 Remove *.lo for clean:
When generating the parser, only move the generated files into place
if they differ from the existing ones.
2007-08-26 21:10:33 +00:00
Todd C. Miller
51904f668a Replace IPV6 regexp with a much simpler (readable) one and add an
extra check when it matches to make sure we have a valid address.
2007-08-25 02:47:54 +00:00
Todd C. Miller
3fd33970c1 Fix thinko introduced when merging IPV6 support. 2007-08-25 02:36:09 +00:00
Todd C. Miller
f9dd821b5c regen 2007-08-24 18:23:42 +00:00
Todd C. Miller
eb8b3d6b5d add 2007 2007-08-24 18:23:24 +00:00
Todd C. Miller
836d04019d mention #uid vs. comment pitfall 2007-08-24 18:19:19 +00:00
Todd C. Miller
5f11011f02 Merge in a patch from the libtool cvs that fixes a problem with the
latest autoconf.  From Stepan Kasal.
2007-08-24 13:50:16 +00:00
Todd C. Miller
b63a4c9db0 Back out he XOR swap trick, it is slower than a temp variable on
modern CPUs.
2007-08-24 00:28:57 +00:00
Todd C. Miller
eb4b7b2e6b regen 2007-08-24 00:14:42 +00:00
Todd C. Miller
6f732db02b Convert the tail queue to a semi-circle queue and use the XOR swap
trick to swap the prev pointers during append.
2007-08-24 00:14:21 +00:00
Todd C. Miller
444e77946a remove useless statement 2007-08-23 19:31:29 +00:00
Todd C. Miller
7cea15ef4b Refactor #include parsing into a separate function and return
unparsed chars (such as newline or comment) back to the lexer.
2007-08-23 11:47:08 +00:00
Todd C. Miller
9cb10fc94d mention better uid support 2007-08-22 22:56:56 +00:00
Todd C. Miller
94922dbae5 Users may now consist of a uid. 2007-08-22 22:55:46 +00:00
Todd C. Miller
d65c8e8275 regen 2007-08-22 22:39:20 +00:00
Todd C. Miller
340831499a Use lbuf_append_quoted() for sudo -l output to quote characters that
would require quoting in sudoers.
2007-08-22 22:32:00 +00:00
Todd C. Miller
14d1b79a4a Add lbuf_append_quoted() which takes a set of characters which
should be quoted with a backslash when displayed.
2007-08-22 22:31:07 +00:00
Todd C. Miller
0940a74e6f Require that the first character after a comment not be a digit or
a dash.  This allows us to remove the GOTRUNAS state and treat
uid/gids similar to other words.  It also means that we can now
specify uids in User_Lists and a User_Spec may now contain a uid.
2007-08-22 22:28:20 +00:00
Todd C. Miller
add2fe0240 Replace RUNAS token with '(' and ')' tokens to make the runas
portion of the grammar more natural.
2007-08-22 22:23:59 +00:00