]>
granicus.if.org Git - sudo/log
Todd C. Miller [Fri, 3 Dec 2004 18:48:07 +0000 (18:48 +0000)]
Add TIME_WITH_SYS_TIME_H
Todd C. Miller [Thu, 2 Dec 2004 16:18:29 +0000 (16:18 +0000)]
Add missing braces to avoid DYLD_FORCE_FLAT_NAMESPACE being set
unconditionally on darwin. From Toby Peterson.
Todd C. Miller [Thu, 2 Dec 2004 15:40:00 +0000 (15:40 +0000)]
Check rbinsert() return value. In the case of faked up entries there
is usually a negative response cached that we need to overwrite.
In pwfree() don't try to zero out a NULL pw_passwd pointer.
Todd C. Miller [Thu, 2 Dec 2004 14:53:20 +0000 (14:53 +0000)]
Use the double fork trick to avoid the monitor process being waited
for by the main program run through sudo.
Todd C. Miller [Mon, 29 Nov 2004 17:52:02 +0000 (17:52 +0000)]
Call initgroups() in -U mode so group matches work normally.
Todd C. Miller [Mon, 29 Nov 2004 17:34:09 +0000 (17:34 +0000)]
Don't print a trailing comma for the last entry in enum def_tupple
Todd C. Miller [Sun, 28 Nov 2004 21:08:09 +0000 (21:08 +0000)]
Mention values when lecture, listpw and verifypw are used in boolean context.
Todd C. Miller [Sun, 28 Nov 2004 21:05:38 +0000 (21:05 +0000)]
verifypw when used in a boolean TRUE context should be "all", not "any".
Todd C. Miller [Fri, 26 Nov 2004 19:21:08 +0000 (19:21 +0000)]
Allow tuples that can be used as booleans to be used as boolean TRUE.
In this case the 2nd possible value of the tuple is used for TRUE.
Todd C. Miller [Thu, 25 Nov 2004 17:23:27 +0000 (17:23 +0000)]
Correct the test for 2-parameter timespecsub
Todd C. Miller [Thu, 25 Nov 2004 17:20:57 +0000 (17:20 +0000)]
Add strub struct definitions for passwd, timeval and timespec
Todd C. Miller [Thu, 25 Nov 2004 17:09:31 +0000 (17:09 +0000)]
Add check for 2-argument form of timespecsub (FreeBSD and BSD/OS) and
fix a typo in the gettimeofday check.
Todd C. Miller [Wed, 24 Nov 2004 21:44:54 +0000 (21:44 +0000)]
Deal with user_stat being NULL as it is for visudo and testsudoers.
Todd C. Miller [Wed, 24 Nov 2004 21:31:51 +0000 (21:31 +0000)]
Add -U option to use in conjunction with -l instead of -u.
Add support for "sudo -l command" to test a specific command.
Todd C. Miller [Wed, 24 Nov 2004 21:28:55 +0000 (21:28 +0000)]
Set safe_cmnd after sudoers_lookup() if it has not been set.
Previously it was set by sudo "ALL" in the parser but at that point
the fully-qualified pathname has not yet been found.
Todd C. Miller [Tue, 23 Nov 2004 23:18:15 +0000 (23:18 +0000)]
Correctly handle multiple privileges per userspec and runas inheritence.
Todd C. Miller [Sun, 21 Nov 2004 19:09:47 +0000 (19:09 +0000)]
Zero out sd_un for each entry in sudo_defs_table in init_defaults.
Todd C. Miller [Fri, 19 Nov 2004 23:04:14 +0000 (23:04 +0000)]
make per-command defaults work with sudoedit
Todd C. Miller [Fri, 19 Nov 2004 23:00:28 +0000 (23:00 +0000)]
Remove the FLAG_NOPASS, FLAG_NOEXEC and FLAG_MONITOR flags. Instead,
we just set the approriate defaults variable.
Todd C. Miller [Fri, 19 Nov 2004 22:09:10 +0000 (22:09 +0000)]
Document per-command Defaults.
Todd C. Miller [Fri, 19 Nov 2004 21:35:12 +0000 (21:35 +0000)]
Add support for command-specific Defaults entries. E.g.
Defaults!/usr/bin/vi noexec
Todd C. Miller [Fri, 19 Nov 2004 20:03:33 +0000 (20:03 +0000)]
Change an occurence of user_matches() -> runas_matches() missed previously
runas_matches(), host_matches() and cmnd_matches() only really need to pass in
a list of members. user_matches() still needs to pass in a passwd struct
because of "sudo -l"
Todd C. Miller [Fri, 19 Nov 2004 19:46:55 +0000 (19:46 +0000)]
Check def_authenticate, def_noexec and def_monitor when setting return flags.
XXX May be better to just set the defaults directly and get rid of those flags.
Todd C. Miller [Fri, 19 Nov 2004 18:39:14 +0000 (18:39 +0000)]
Use: #include <config.h>
Not: #include "config.h"
That way we get the correct config.h when build dir != src dir
Todd C. Miller [Fri, 19 Nov 2004 18:30:43 +0000 (18:30 +0000)]
Back out part of rev 1.263; fix -I order
Todd C. Miller [Fri, 19 Nov 2004 18:12:59 +0000 (18:12 +0000)]
More robust parsing if #include; could be much better still.
Todd C. Miller [Fri, 19 Nov 2004 17:55:14 +0000 (17:55 +0000)]
Make arg splitting in visudo and sudoedit consistent.
Todd C. Miller [Fri, 19 Nov 2004 17:35:21 +0000 (17:35 +0000)]
Split alias routines out into their own file.
Todd C. Miller [Fri, 19 Nov 2004 17:32:25 +0000 (17:32 +0000)]
__attribute__ is already defined in compat.h
Todd C. Miller [Fri, 19 Nov 2004 17:30:22 +0000 (17:30 +0000)]
quit() should not be __noreturn__ as it is non-void on some platforms.
Todd C. Miller [Fri, 19 Nov 2004 17:24:20 +0000 (17:24 +0000)]
Add local error/warning functions like err/warn but that call an additional
cleanup routine in the error case. This means we no longer need to compile
a special version of alloc.o for visudo.
Todd C. Miller [Fri, 19 Nov 2004 16:54:55 +0000 (16:54 +0000)]
Clarify comments about the data structures
Todd C. Miller [Thu, 18 Nov 2004 20:28:53 +0000 (20:28 +0000)]
Add support for VISUAL and EDITOR containing command line args.
If env_editor is not set any args in VISUAL and EDITOR are ignored.
Arguments are also now supported in def_editor.
Todd C. Miller [Wed, 17 Nov 2004 19:25:54 +0000 (19:25 +0000)]
alias_matches() is no more
Todd C. Miller [Wed, 17 Nov 2004 19:09:21 +0000 (19:09 +0000)]
sync
Todd C. Miller [Wed, 17 Nov 2004 18:19:45 +0000 (18:19 +0000)]
When regenerating the parser, don't replace gram.h unless it has changed.
Todd C. Miller [Wed, 17 Nov 2004 16:56:25 +0000 (16:56 +0000)]
remove Makefile.binary for distclean
Todd C. Miller [Wed, 17 Nov 2004 16:18:33 +0000 (16:18 +0000)]
Preserve KRB5CCNAME in zero_env() and add a paranoia check to make sure
we can't overflow new_env.
Todd C. Miller [Wed, 17 Nov 2004 15:33:45 +0000 (15:33 +0000)]
paranoia when stripping trailing slashes from tempdir.
Todd C. Miller [Wed, 17 Nov 2004 00:00:48 +0000 (00:00 +0000)]
Set user_ngroups to 0 if getgroups() returns an error.
Todd C. Miller [Tue, 16 Nov 2004 23:59:56 +0000 (23:59 +0000)]
Add configure check for getgroups()
Todd C. Miller [Tue, 16 Nov 2004 23:55:26 +0000 (23:55 +0000)]
Use supplementary group vector in struct sudo_user.
Todd C. Miller [Tue, 16 Nov 2004 23:40:58 +0000 (23:40 +0000)]
Only do string comparisons on the group members if there is no
supplemental group list.
Todd C. Miller [Tue, 16 Nov 2004 21:10:22 +0000 (21:10 +0000)]
sync
Todd C. Miller [Tue, 16 Nov 2004 20:54:37 +0000 (20:54 +0000)]
On Digital UNIX _PATH_VAR_TMP doesn't end with a trailing slash so
chop off any trailing slashes we see and add an explicit one.
Todd C. Miller [Tue, 16 Nov 2004 17:02:58 +0000 (17:02 +0000)]
remove bogus XXX comment
Todd C. Miller [Tue, 16 Nov 2004 16:10:09 +0000 (16:10 +0000)]
Get rid of alias_matches and correctly fall through to the non-alias
cases when there is no alias with the specified name.
Todd C. Miller [Tue, 16 Nov 2004 15:47:55 +0000 (15:47 +0000)]
Cache non-existent passwd/group entries too.
Todd C. Miller [Tue, 16 Nov 2004 15:45:49 +0000 (15:45 +0000)]
regen
Todd C. Miller [Tue, 16 Nov 2004 04:32:29 +0000 (04:32 +0000)]
fix typo
Todd C. Miller [Tue, 16 Nov 2004 04:24:11 +0000 (04:24 +0000)]
Implement group caching and use the passwd and group caches throughout.
Todd C. Miller [Mon, 15 Nov 2004 19:43:47 +0000 (19:43 +0000)]
Properly negate the return value of alias_matches() when appropriate.
Todd C. Miller [Mon, 15 Nov 2004 19:38:31 +0000 (19:38 +0000)]
Make hostname_matches() return TRUE for a match, else FALSE like the
caller expects.
Todd C. Miller [Mon, 15 Nov 2004 18:24:09 +0000 (18:24 +0000)]
Add missing dependencies on gram.h
Todd C. Miller [Mon, 15 Nov 2004 18:06:11 +0000 (18:06 +0000)]
Use runas_matches in alias_matches() now that we have it.
Todd C. Miller [Mon, 15 Nov 2004 18:00:29 +0000 (18:00 +0000)]
Expand aliases in "sudo -l" mode
Todd C. Miller [Mon, 15 Nov 2004 17:33:52 +0000 (17:33 +0000)]
Use ALIAS for the member type when storing an alias instead of
HOSTALIAS/RUNASALIAS/CMNDALIAS/USERALIAS since match.c relies on
the more generic type. Expand runas_matches instead of calling
user_matches() inside of it since user_matches() looks up USERALIASes,
not RUNASALIASes.
Todd C. Miller [Mon, 15 Nov 2004 17:05:54 +0000 (17:05 +0000)]
Paranoia; zero out pw_passwd before freeing passwd entry.
Todd C. Miller [Mon, 15 Nov 2004 15:53:53 +0000 (15:53 +0000)]
Add local error/warning functions like err/warn but that call an additional
cleanup routine in the error case. This means we no longer need to compile
a special version of alloc.o for visudo.
Todd C. Miller [Mon, 15 Nov 2004 14:59:03 +0000 (14:59 +0000)]
Use userpw_matches() to compare usernames, not strcmp(), since the latter
checks for "#uid".
Todd C. Miller [Mon, 15 Nov 2004 14:53:05 +0000 (14:53 +0000)]
Cache passwd db entries in 2 reb-black trees; one indexed by uid,
the other by user name. The data returned from the cache should
be considered read-only and is destroyed by sudo_endpwent().
Todd C. Miller [Mon, 15 Nov 2004 14:50:03 +0000 (14:50 +0000)]
add cast to uid_t
Todd C. Miller [Mon, 15 Nov 2004 14:49:48 +0000 (14:49 +0000)]
missing free in alias_destroy
Todd C. Miller [Mon, 15 Nov 2004 14:49:17 +0000 (14:49 +0000)]
Can't use rbapply() for rbdestroy since the destructor is passed a
data pointer, not a node pointer.
Todd C. Miller [Mon, 15 Nov 2004 04:06:16 +0000 (04:06 +0000)]
Create and use private versions of setpwent() and endpwent() that
set/end the shadow password file too.
Todd C. Miller [Mon, 15 Nov 2004 03:55:22 +0000 (03:55 +0000)]
Store aliases in a red-black tree.
Todd C. Miller [Mon, 15 Nov 2004 03:52:54 +0000 (03:52 +0000)]
red-black tree implementation
Todd C. Miller [Mon, 15 Nov 2004 03:37:53 +0000 (03:37 +0000)]
Edit all sudoers file if there were unused or undefined aliases and we
are in strict mode.
Todd C. Miller [Fri, 12 Nov 2004 16:19:19 +0000 (16:19 +0000)]
Bring back the "secure_path" Defaults option now that Defaults take
effect before the path is searched.
Todd C. Miller [Thu, 11 Nov 2004 17:22:30 +0000 (17:22 +0000)]
A user can always list their own entries, even with -u.
Better error message when failing to list another user's entries.
Todd C. Miller [Thu, 11 Nov 2004 17:12:20 +0000 (17:12 +0000)]
The syntax to list another user's entries is now "-u otheruser -l".
Only root or users with sudo "ALL" may list other user's entries.
Todd C. Miller [Thu, 11 Nov 2004 16:30:01 +0000 (16:30 +0000)]
Update env variable info in SECURITY NOTES
Todd C. Miller [Thu, 11 Nov 2004 16:25:20 +0000 (16:25 +0000)]
strip CDPATH too
Todd C. Miller [Thu, 11 Nov 2004 16:20:59 +0000 (16:20 +0000)]
strip exported bash functions from the environment.
Todd C. Miller [Wed, 27 Oct 2004 16:16:23 +0000 (16:16 +0000)]
Only reset sudo_user.pw based on SUDO_USER environment variables for
real commands and sudoedit. This avoids a confusing message when a
user tries "sudo -l" or "sudo -v" and is denied.
Todd C. Miller [Wed, 27 Oct 2004 16:06:52 +0000 (16:06 +0000)]
Extend LIST_APPEND to deal with appending lists too
Todd C. Miller [Tue, 26 Oct 2004 22:39:35 +0000 (22:39 +0000)]
Convert some bitwise AND to ISSET
Todd C. Miller [Tue, 26 Oct 2004 22:29:32 +0000 (22:29 +0000)]
toke.c replaces lex.yy.c
Todd C. Miller [Tue, 26 Oct 2004 22:29:08 +0000 (22:29 +0000)]
sync
Todd C. Miller [Tue, 26 Oct 2004 22:28:11 +0000 (22:28 +0000)]
new parser fixes most of the outstanding bugs
Todd C. Miller [Tue, 26 Oct 2004 22:27:06 +0000 (22:27 +0000)]
regen
Todd C. Miller [Tue, 26 Oct 2004 22:26:28 +0000 (22:26 +0000)]
Rework for the new parser.
Now checks for unused aliases in sudoers.
Todd C. Miller [Tue, 26 Oct 2004 22:25:34 +0000 (22:25 +0000)]
Rewrite for the new parser. Now supports a -d flag (dump) and adds a -h
flag (host). It now defaults to the local hostname unless otherwise
specified.
Todd C. Miller [Tue, 26 Oct 2004 22:23:29 +0000 (22:23 +0000)]
Add new prototypes.
Remove NOMATCH/UNSPEC (now in parse.h)
Todd C. Miller [Tue, 26 Oct 2004 22:22:46 +0000 (22:22 +0000)]
Update for new parse. We now call find_path() *after* we have updated
the global defaults based on sudoers. Also adds support for listing
other user's privs if you are root.
Todd C. Miller [Tue, 26 Oct 2004 22:21:02 +0000 (22:21 +0000)]
Working LDAP support; also remove a now-unneeded rewind().
Todd C. Miller [Tue, 26 Oct 2004 22:20:18 +0000 (22:20 +0000)]
Add NO_STDERR flag.
Todd C. Miller [Tue, 26 Oct 2004 22:19:58 +0000 (22:19 +0000)]
Split sudo_ldap_check() into three pieces: sudo_ldap_open(),
udo_ldap_update_defaults() and sudo_ldap_check(). This allows
us to connecto to LDAP, apply the default options, find the command
in the user's path, and then check whether the user is allowed to
run it. The important thing here is that the default runas user
may be specified as a default option and that needs to be set
before we search for the command.
Todd C. Miller [Tue, 26 Oct 2004 22:17:15 +0000 (22:17 +0000)]
Add casts to unsigned char for isspace() to quiet a gcc warning.
Todd C. Miller [Tue, 26 Oct 2004 22:16:26 +0000 (22:16 +0000)]
Add prototype for update_defaults()
Todd C. Miller [Tue, 26 Oct 2004 22:16:08 +0000 (22:16 +0000)]
Don't warn about line numbers now that we operate on a set of data
structures (or LDAP) and not a file.
Todd C. Miller [Tue, 26 Oct 2004 22:15:05 +0000 (22:15 +0000)]
No long use lsearch()
Todd C. Miller [Tue, 26 Oct 2004 22:14:40 +0000 (22:14 +0000)]
Update for new and changed file names.
Todd C. Miller [Tue, 26 Oct 2004 22:14:21 +0000 (22:14 +0000)]
no more BSD lsearch.c
Todd C. Miller [Tue, 26 Oct 2004 22:14:01 +0000 (22:14 +0000)]
foo_matches() routines now live in match.c
Added user_matches(), runas_matches(), host_matches(), cmnd_matches()
and alias_matches() that operate on the parsed sudoers file.
Todd C. Miller [Tue, 26 Oct 2004 22:12:47 +0000 (22:12 +0000)]
Move parse.lex -> toke.l
Rename buffer_frob() -> switch_buffer()
WORD no longer needs to exclude '@'
kill yywrap()
Todd C. Miller [Tue, 26 Oct 2004 22:10:55 +0000 (22:10 +0000)]
Rewritten parser that converts sudoers into a set of data structures.
This eliminates ordering issues and makes it possible to apply
sudoers Defaults entries before searching for the command.
Todd C. Miller [Tue, 26 Oct 2004 22:09:22 +0000 (22:09 +0000)]
We won't be using lsearch() any longer.
Todd C. Miller [Tue, 26 Oct 2004 22:07:03 +0000 (22:07 +0000)]
sudo should not send mail if someone who runs 'sudo -l' has no entry.
Todd C. Miller [Tue, 26 Oct 2004 20:09:14 +0000 (20:09 +0000)]
regen