Commit Graph

36 Commits

Author SHA1 Message Date
Todd C. Miller
b8ca82fee6 Fix expansion of %h in #include names. Fixes bugzilla 363 2009-07-18 13:55:37 +00:00
Todd C. Miller
3ea51f2266 regen 2009-05-27 00:47:17 +00:00
Todd C. Miller
f3407d8695 Accept %:foo as a non-Unix group 2009-05-17 20:52:15 +00:00
Todd C. Miller
e74bea7628 Allow user/group to be double quoted in the case of non-Unix groups
which contain spaces.
2009-05-17 20:22:24 +00:00
Todd C. Miller
182711e341 Not all systems have d_namlen 2009-04-22 20:32:08 +00:00
Todd C. Miller
72a1d82412 Ignore files ending in '~' in sudo.d (emacs backup files) 2009-04-19 12:56:42 +00:00
Todd C. Miller
95de5670a2 For #includedir, ignore any file containing a dot 2009-04-18 23:37:33 +00:00
Todd C. Miller
3be603aa47 Implement #includedir directive. Files in an includedir are not edited
by visudo unless they contain a syntax error.
2009-04-18 23:25:08 +00:00
Todd C. Miller
030b39958e regen 2009-02-21 21:51:42 +00:00
Todd C. Miller
2d4aebed6e Comments that begin with #- should not be parsed as uids. 2009-01-17 22:36:09 +00:00
Todd C. Miller
13968b685c regen 2008-11-24 00:42:20 +00:00
Todd C. Miller
a33e988df6 regen 2008-11-09 14:15:36 +00:00
Todd C. Miller
b0c1c7979f The loop in fill_cmnd() was going one byte too far past the end, resulting
in a NUL being written immediately after the buffer end.
2008-11-08 15:40:33 +00:00
Todd C. Miller
240339c051 In fill_cmnd(), collapse any escaped sudo-specific characters.
Allows character classes to be used in pathnames.
2008-10-08 18:27:35 +00:00
Todd C. Miller
3bf94ded8e Better fix for line continuation inside double quotes. Now accepts
whitespace between the backslash and the newline like the main lexer.
2008-06-26 11:49:16 +00:00
Todd C. Miller
bd8e38a0c7 Fix line continuation in strings. It was only being honored if preceded by
whitespace.
2008-06-25 18:31:19 +00:00
Todd C. Miller
b06e2f9d65 Clean up some memory leaks pointed out by valgrind. 2008-04-10 15:28:10 +00:00
Todd C. Miller
4c992e1901 Add support for SELinux RBAC. Sudoers entries may specify a role and type.
There are also role and type defaults that may be used.  To make sure a
transition occurs, when using RBAC commands are executed via the new sesh
binary.  Based on initial changes from Dan Walsh.
2008-02-09 14:30:07 +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
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
d65c8e8275 regen 2007-08-22 22:39:20 +00:00
Todd C. Miller
53961224a6 Allow comments after a RunasAlias as long as the character after
the pound sign isn't a digit or a dash.
2007-08-21 13:19:04 +00:00
Todd C. Miller
9cf8213c26 Properly deal with Defaults double-quoted strings that span multiple
lines using the line continuation char.  Previously, the entire thing,
including the continuation char, newline, and spaces was stored as-is.
2007-08-20 23:19:44 +00:00
Todd C. Miller
317e600f41 Remove monitor support until there is a versino of systrace that
uses a lookaside buffer (or we have a better mechanism to use).
2007-08-15 15:20:01 +00:00
Todd C. Miller
b1845dcf10 regen 2007-08-13 16:34:21 +00:00
Todd C. Miller
879c46e4dd Add support for setting environment variables on the command line.
This is only allowed if the setenv sudoers options is enabled or if
the command is prefixed with the SETENV tag.
2007-06-23 23:58:54 +00:00
Todd C. Miller
304dc46d7f Add efree() for consistency with emalloc() et al. Allows us to rely
on C89 behavior (free(NULL) is valid) even on K&R.
2005-03-29 14:29:47 +00:00
Todd C. Miller
5e060faa34 regen 2005-03-08 03:21:28 +00:00
Todd C. Miller
889a0334e6 regen 2005-02-12 23:33:30 +00:00
Todd C. Miller
ab2439a44a Cast argument to ctype functions to unsigned char. 2005-02-10 03:19:10 +00:00
Todd C. Miller
3b8b88407f Add __unused to rcsids 2005-01-27 15:42:30 +00:00
Todd C. Miller
77cd81f41d make per-command defaults work with sudoedit 2004-11-19 23:04:14 +00:00
Todd C. Miller
fe869025c4 Add support for command-specific Defaults entries. E.g.
Defaults!/usr/bin/vi noexec
2004-11-19 21:35:12 +00:00
Todd C. Miller
2c2daa8eca Use: #include <config.h>
Not: #include "config.h"
That way we get the correct config.h when build dir != src dir
2004-11-19 18:39:14 +00:00
Todd C. Miller
faa9a89722 More robust parsing if #include; could be much better still. 2004-11-19 18:12:59 +00:00
Todd C. Miller
7062fd28fd toke.c replaces lex.yy.c 2004-10-26 22:29:32 +00:00