]> granicus.if.org Git - sudo/log
sudo
20 years agoTake a stab at ldap sudoers support here.
Todd C. Miller [Tue, 5 Oct 2004 20:53:29 +0000 (20:53 +0000)]
Take a stab at ldap sudoers support here.

20 years agoDetach from tracee on SIGHUP, SIGINT and SIGTERM. Now "sudo reboot"
Todd C. Miller [Tue, 5 Oct 2004 19:13:56 +0000 (19:13 +0000)]
Detach from tracee on SIGHUP, SIGINT and SIGTERM.  Now "sudo reboot"
doesn't cause reboot to inadvertanly kill itself.

20 years agoput "monitor" in the proctitle, not "systrace"
Todd C. Miller [Tue, 5 Oct 2004 18:21:26 +0000 (18:21 +0000)]
put "monitor" in the proctitle, not "systrace"

20 years agoWhen modifying the environment, don't replace envp when we can get
Todd C. Miller [Tue, 5 Oct 2004 18:15:35 +0000 (18:15 +0000)]
When modifying the environment, don't replace envp when we can get
away with just rewriting pointers in the traced process.

20 years agoAdd environment updating via STRIOCINJECT (if available).
Todd C. Miller [Tue, 5 Oct 2004 17:46:22 +0000 (17:46 +0000)]
Add environment updating via STRIOCINJECT (if available).

20 years agoregen
Todd C. Miller [Tue, 5 Oct 2004 14:22:26 +0000 (14:22 +0000)]
regen

20 years agoregen
Todd C. Miller [Mon, 4 Oct 2004 20:15:38 +0000 (20:15 +0000)]
regen

20 years agoFix bug introduced in unput() removal; want yyless(0) not yyless(1)
Todd C. Miller [Mon, 4 Oct 2004 20:15:29 +0000 (20:15 +0000)]
Fix bug introduced in unput() removal; want yyless(0) not yyless(1)

20 years agoInclude file is now mon_systrace.h
Todd C. Miller [Mon, 4 Oct 2004 16:09:45 +0000 (16:09 +0000)]
Include file is now mon_systrace.h

20 years agoNo longer call it tracing, it is now "monitoring" which should be more
Todd C. Miller [Mon, 4 Oct 2004 16:07:19 +0000 (16:07 +0000)]
No longer call it tracing, it is now "monitoring" which should be more
a obvious name to non-hackers.

20 years agoFix some XXX
Todd C. Miller [Fri, 1 Oct 2004 19:06:44 +0000 (19:06 +0000)]
Fix some XXX

20 years agoNo need to include syscall.h, use 1024 as the max # of entries (the
Todd C. Miller [Fri, 1 Oct 2004 18:30:20 +0000 (18:30 +0000)]
No need to include syscall.h, use 1024 as the max # of entries (the
max that systrace(4) allows).

Only need to use SYSTR_POLICY_ASSIGN once

Change check_syscall() -> find_handler() and have it return the
handler instead of just running it.  We need this since handler now
have two parts: one part that generates and answer and another that
gets called after the answer is accepted (to do logging).

Add some missing check_exec for emul execv

20 years agoAdd $Sudo$ tags.
Todd C. Miller [Fri, 1 Oct 2004 14:58:15 +0000 (14:58 +0000)]
Add $Sudo$ tags.

20 years agoAdd missing HAVE_LINUX_SYSTRACE_H
Todd C. Miller [Fri, 1 Oct 2004 14:47:14 +0000 (14:47 +0000)]
Add missing HAVE_LINUX_SYSTRACE_H

20 years agoadd trace_systrace.o dependency
Todd C. Miller [Fri, 1 Oct 2004 00:46:21 +0000 (00:46 +0000)]
add trace_systrace.o dependency

20 years agoAlso look for systrace.h in /usr/include/linux
Todd C. Miller [Thu, 30 Sep 2004 23:00:25 +0000 (23:00 +0000)]
Also look for systrace.h in /usr/include/linux

20 years agoMove all struct defs and prototypes into trace_systrace.h and mark all
Todd C. Miller [Thu, 30 Sep 2004 22:27:33 +0000 (22:27 +0000)]
Move all struct defs and prototypes into trace_systrace.h and mark all
but systace_attach() static.

20 years agoAdd support for tracing emulations. At the moment, all emulations are
Todd C. Miller [Thu, 30 Sep 2004 22:14:34 +0000 (22:14 +0000)]
Add support for tracing emulations.  At the moment, all emulations are
compiled in.  It might make sense to #ifdef them in the future, though
this impeeds readability.

20 years agorename systrace.c -> trace_systrace.c
Todd C. Miller [Thu, 30 Sep 2004 21:07:36 +0000 (21:07 +0000)]
rename systrace.c -> trace_systrace.c

20 years agoAllow this to build with a K&R compiler again
Todd C. Miller [Thu, 30 Sep 2004 19:58:10 +0000 (19:58 +0000)]
Allow this to build with a K&R compiler again

20 years agosync
Todd C. Miller [Thu, 30 Sep 2004 17:58:36 +0000 (17:58 +0000)]
sync

20 years agoUse __attribute__((__noreturn__))
Todd C. Miller [Thu, 30 Sep 2004 17:55:21 +0000 (17:55 +0000)]
Use __attribute__((__noreturn__))

20 years agoExit() takes a negative value to indicate it was not called via signal.
Todd C. Miller [Thu, 30 Sep 2004 17:44:24 +0000 (17:44 +0000)]
Exit() takes a negative value to indicate it was not called via signal.

20 years agoregen
Todd C. Miller [Thu, 30 Sep 2004 17:25:51 +0000 (17:25 +0000)]
regen

20 years agoDefine Err() and Errx() that are like err() and errx() but call Exit()
Todd C. Miller [Thu, 30 Sep 2004 17:22:37 +0000 (17:22 +0000)]
Define Err() and Errx() that are like err() and errx() but call Exit()
instead of exit().  Build private copy of alloc.o for visudo that calls
Err() and Errx().

20 years agoregen
Todd C. Miller [Wed, 29 Sep 2004 19:22:38 +0000 (19:22 +0000)]
regen

20 years agosync
Todd C. Miller [Wed, 29 Sep 2004 19:22:15 +0000 (19:22 +0000)]
sync

20 years agoOverhaul visudo for editing multiple files:
Todd C. Miller [Wed, 29 Sep 2004 18:41:38 +0000 (18:41 +0000)]
Overhaul visudo for editing multiple files:
 o visudo has been broken out into functions (more work needed here)
 o each file is now edited before sudoers is re-parsed
 o if a #include line is added that file will be edited too

TODO:
 o cleanup temp files when exiting via err() or errx()
 o continue breaking things out into separate functions

20 years agoAdd keepopen arg to open_sudoers that open_sudoers can use to
Todd C. Miller [Wed, 29 Sep 2004 18:36:33 +0000 (18:36 +0000)]
Add keepopen arg to open_sudoers that open_sudoers can use to
indicate to the caller that the fd should not be closed when it
is done with it.  To be used by visudo to keep locked fds from
being closed prematurely (and thus losing the lock).

20 years agoAdd errorfile global that contains the name of the file that caused the
Todd C. Miller [Wed, 29 Sep 2004 18:33:06 +0000 (18:33 +0000)]
Add errorfile global that contains the name of the file that caused the
error.

20 years agoreturn COMMENT to yacc grammar for a #include line
Todd C. Miller [Wed, 29 Sep 2004 18:30:49 +0000 (18:30 +0000)]
return COMMENT to yacc grammar for a #include line

20 years agoRemove us of unput() in favor of yyless() which is cheaper.
Todd C. Miller [Wed, 29 Sep 2004 18:29:40 +0000 (18:29 +0000)]
Remove us of unput() in favor of yyless() which is cheaper.

20 years agoAllow an empty sudoers file.
Todd C. Miller [Wed, 29 Sep 2004 18:28:46 +0000 (18:28 +0000)]
Allow an empty sudoers file.

20 years agoRewind sudoers_fp now that sudoers_lookup() doesn't do it for us.
Todd C. Miller [Tue, 28 Sep 2004 20:50:33 +0000 (20:50 +0000)]
Rewind sudoers_fp now that sudoers_lookup() doesn't do it for us.

20 years agoregen
Todd C. Miller [Tue, 28 Sep 2004 18:37:08 +0000 (18:37 +0000)]
regen

20 years agoDo signal setup before calling edit_sudoers().
Todd C. Miller [Tue, 28 Sep 2004 18:36:29 +0000 (18:36 +0000)]
Do signal setup before calling edit_sudoers().
Don't shadow the "quiet" global.

20 years agoIf a sudoers file includes other files, edit those too.
Todd C. Miller [Tue, 28 Sep 2004 18:33:06 +0000 (18:33 +0000)]
If a sudoers file includes other files, edit those too.
Does not yes deal with creating the new includes files itself.

20 years agoinit_parser now takes a path
Todd C. Miller [Tue, 28 Sep 2004 18:31:38 +0000 (18:31 +0000)]
init_parser now takes a path

20 years agoMore scaffolding for dealing with multiple sudoers files:
Todd C. Miller [Tue, 28 Sep 2004 18:31:24 +0000 (18:31 +0000)]
More scaffolding for dealing with multiple sudoers files:
 o init_parser() now takes a path used to populate the sudoers global
 o the sudoers global is used to print the correct file in yyerror()
 o when switching to a new sudoers file, perserve old file name and line number

20 years agoKill _PATH_SUDOERS_TMP; it is not meaningful now that we can have multiple
Todd C. Miller [Tue, 28 Sep 2004 18:29:05 +0000 (18:29 +0000)]
Kill _PATH_SUDOERS_TMP; it is not meaningful now that we can have multiple
sudoers files.

20 years agoRewind sudoers_fp in open_sudoers() instead of sudoers_lookup() so
Todd C. Miller [Tue, 28 Sep 2004 17:52:59 +0000 (17:52 +0000)]
Rewind sudoers_fp in open_sudoers() instead of sudoers_lookup() so
we start at the right file position when reading include files.

20 years agodocument #include
Todd C. Miller [Tue, 28 Sep 2004 01:04:57 +0000 (01:04 +0000)]
document #include

20 years agoregen
Todd C. Miller [Tue, 28 Sep 2004 00:47:47 +0000 (00:47 +0000)]
regen

20 years agoAdd max depth of 128 for the include stack to avoid loops.
Todd C. Miller [Tue, 28 Sep 2004 00:47:30 +0000 (00:47 +0000)]
Add max depth of 128 for the include stack to avoid loops.

Since yyerror() doesn't stop parsing, pass return values back to
yylex and call yyterminate() on error.

20 years agodocument tracing
Todd C. Miller [Mon, 27 Sep 2004 18:06:26 +0000 (18:06 +0000)]
document tracing

20 years agoMention PREVENTING SHELL ESCAPES section of sudoers man page
Todd C. Miller [Mon, 27 Sep 2004 18:05:58 +0000 (18:05 +0000)]
Mention PREVENTING SHELL ESCAPES section of sudoers man page

20 years agoregen
Todd C. Miller [Mon, 27 Sep 2004 16:08:18 +0000 (16:08 +0000)]
regen

20 years agoAdd support for #include in sudoers (visudo support TBD)
Todd C. Miller [Mon, 27 Sep 2004 16:03:15 +0000 (16:03 +0000)]
Add support for #include in sudoers (visudo support TBD)

20 years agomake yyerror()'s argument const
Todd C. Miller [Mon, 27 Sep 2004 16:02:50 +0000 (16:02 +0000)]
make yyerror()'s argument const

20 years agoAdd open_sudoers() stubs.
Todd C. Miller [Mon, 27 Sep 2004 16:02:10 +0000 (16:02 +0000)]
Add open_sudoers() stubs.

20 years agoRename check_sudoers() open_sudoers() and make it return a FILE *
Todd C. Miller [Mon, 27 Sep 2004 16:01:54 +0000 (16:01 +0000)]
Rename check_sudoers() open_sudoers() and make it return a FILE *

20 years agoCrank version
Todd C. Miller [Sun, 26 Sep 2004 16:35:58 +0000 (16:35 +0000)]
Crank version

20 years agoBetter HP-UX depot construction
Todd C. Miller [Sun, 26 Sep 2004 16:33:31 +0000 (16:33 +0000)]
Better HP-UX depot construction

20 years agoo Made children global so check_exec() can lookup a child.
Todd C. Miller [Sat, 25 Sep 2004 21:08:48 +0000 (21:08 +0000)]
o Made children global so check_exec() can lookup a child.
o Replaced uid in struct childinfo with struct passwd * (for runas)
o new_child() now takes a parent pid so the runas info can be inherited
o Added find_child() to lookup a child by its pid
o update_child() now fills in a struct passwd
o Converted the big if/else mess in set_policy to a switch
o Syscalls that change uid are now "ask" so we get SYSTR_MSG_UGID events

20 years agoAdd flag to sudo_pwdup that indicates whether or not to lookup the
Todd C. Miller [Sat, 25 Sep 2004 21:01:46 +0000 (21:01 +0000)]
Add flag to sudo_pwdup that indicates whether or not to lookup the
shadow password.  Will be used to a struct passwd that has the
shadow password already filled in.

20 years agoadd missing increment of addr in read_string()
Todd C. Miller [Sat, 25 Sep 2004 20:58:11 +0000 (20:58 +0000)]
add missing increment of addr in read_string()

20 years agoRemove bogus call to update_child() and some cosmetic fixes
Todd C. Miller [Sat, 25 Sep 2004 20:15:44 +0000 (20:15 +0000)]
Remove bogus call to update_child() and some cosmetic fixes

20 years agoDon't leak /dev/systrace fd to tracee
Todd C. Miller [Sat, 25 Sep 2004 20:11:39 +0000 (20:11 +0000)]
Don't leak /dev/systrace fd to tracee
Make initialized global for simplicity
If STRIOCATTACH returns EBUSY we are already being traced
Check for user_args == NULL in setproctitle() call
Add missing calls to STRIOCANSWER

20 years agog/c sudo_pwdup proto
Todd C. Miller [Sat, 25 Sep 2004 17:15:06 +0000 (17:15 +0000)]
g/c sudo_pwdup proto

20 years agoAdd target for building a depot file
Todd C. Miller [Sat, 25 Sep 2004 00:21:04 +0000 (00:21 +0000)]
Add target for building a depot file

20 years agotrim includes
Todd C. Miller [Sat, 25 Sep 2004 00:07:26 +0000 (00:07 +0000)]
trim includes

20 years agoregen
Todd C. Miller [Fri, 24 Sep 2004 18:11:19 +0000 (18:11 +0000)]
regen

20 years agodocument --with-systrace
Todd C. Miller [Fri, 24 Sep 2004 18:10:32 +0000 (18:10 +0000)]
document --with-systrace

20 years agoAdd check for setproctitle
Todd C. Miller [Fri, 24 Sep 2004 18:10:27 +0000 (18:10 +0000)]
Add check for setproctitle

20 years agopass struct str_msg_ask in to syscall checker so it can set the error code
Todd C. Miller [Fri, 24 Sep 2004 18:09:47 +0000 (18:09 +0000)]
pass struct str_msg_ask in to syscall checker so it can set the error code

20 years agosystrace(4) support for sudo. On systems with the systrace(4) kernel
Todd C. Miller [Fri, 24 Sep 2004 17:30:23 +0000 (17:30 +0000)]
systrace(4) support for sudo.  On systems with the systrace(4) kernel
facility (OpenBSD, NetBSD, Linux w/ patches) sudo can intercept exec
calls and check the exec args against the sudoers file.
In other words, sudo can now control subcommands and shell escapes.

20 years agoCall systrace_attach() if FLAG_TRACE is set.
Todd C. Miller [Fri, 24 Sep 2004 17:17:29 +0000 (17:17 +0000)]
Call systrace_attach() if FLAG_TRACE is set.

20 years agoAdd trace Defaults option and TRACE/NOTRACE tags and set FLAG_TRACE
Todd C. Miller [Fri, 24 Sep 2004 17:15:51 +0000 (17:15 +0000)]
Add trace Defaults option and TRACE/NOTRACE tags and set FLAG_TRACE

20 years agoDon't close sudoers_fp, keep it open and set close on exec flag instead.
Todd C. Miller [Fri, 24 Sep 2004 17:13:24 +0000 (17:13 +0000)]
Don't close sudoers_fp, keep it open and set close on exec flag instead.

20 years agoAdd trace option
Todd C. Miller [Fri, 24 Sep 2004 17:11:14 +0000 (17:11 +0000)]
Add trace option

20 years agoAdd systrace
Todd C. Miller [Fri, 24 Sep 2004 00:24:09 +0000 (00:24 +0000)]
Add systrace

20 years agoSunOS /bin/sh blows up with configure
Todd C. Miller [Fri, 24 Sep 2004 00:23:51 +0000 (00:23 +0000)]
SunOS /bin/sh blows up with configure

20 years agoInclude sys/param.h before systrace.h
Todd C. Miller [Fri, 24 Sep 2004 00:23:28 +0000 (00:23 +0000)]
Include sys/param.h before systrace.h

20 years agoregen
Todd C. Miller [Fri, 24 Sep 2004 00:15:19 +0000 (00:15 +0000)]
regen

20 years ago_PATH_DEV_SYSTRACE
Todd C. Miller [Fri, 24 Sep 2004 00:15:13 +0000 (00:15 +0000)]
_PATH_DEV_SYSTRACE

20 years agoline up options in --help
Todd C. Miller [Fri, 24 Sep 2004 00:14:44 +0000 (00:14 +0000)]
line up options in --help

20 years agoAdd --with-systrace
Todd C. Miller [Fri, 24 Sep 2004 00:11:31 +0000 (00:11 +0000)]
Add --with-systrace

20 years agoregen
Todd C. Miller [Thu, 23 Sep 2004 17:35:55 +0000 (17:35 +0000)]
regen

20 years agomake this work with autoconf-2.59
Todd C. Miller [Thu, 23 Sep 2004 17:35:40 +0000 (17:35 +0000)]
make this work with autoconf-2.59

20 years agoSimplify logic around open & stat of files and do sanity on edited
Todd C. Miller [Thu, 16 Sep 2004 16:58:03 +0000 (16:58 +0000)]
Simplify logic around open & stat of files and do sanity on edited
file even if we lack fstat (still racable but worth doing).

20 years agoAdd support url
Todd C. Miller [Wed, 15 Sep 2004 22:47:48 +0000 (22:47 +0000)]
Add support url

20 years agoversino 1.6.8p1 SUDO_1_6_8p1
Todd C. Miller [Wed, 15 Sep 2004 20:11:22 +0000 (20:11 +0000)]
versino 1.6.8p1

20 years agomore changes for 1.6.8p1
Todd C. Miller [Wed, 15 Sep 2004 19:20:24 +0000 (19:20 +0000)]
more changes for 1.6.8p1

20 years ago1.6.8p1
Todd C. Miller [Wed, 15 Sep 2004 19:18:38 +0000 (19:18 +0000)]
1.6.8p1

20 years agoAdd sanity check so we don't try to edit something other than a regular file.
Todd C. Miller [Wed, 15 Sep 2004 16:16:20 +0000 (16:16 +0000)]
Add sanity check so we don't try to edit something other than a regular file.

20 years agosync
Aaron Spangler [Wed, 15 Sep 2004 00:55:00 +0000 (00:55 +0000)]
sync

20 years agodocument --with-ldap-conf-file
Aaron Spangler [Wed, 15 Sep 2004 00:21:59 +0000 (00:21 +0000)]
document --with-ldap-conf-file

20 years agopolitical correctness strikes again
Todd C. Miller [Tue, 14 Sep 2004 21:43:31 +0000 (21:43 +0000)]
political correctness strikes again

20 years agosync
Todd C. Miller [Tue, 14 Sep 2004 19:09:00 +0000 (19:09 +0000)]
sync

20 years agoInstall sudoedit man link
Todd C. Miller [Sun, 12 Sep 2004 23:50:35 +0000 (23:50 +0000)]
Install sudoedit man link

20 years agoUpdate PAM note and mention where HP-UX users can download gcc binaries.
Todd C. Miller [Sun, 12 Sep 2004 18:25:54 +0000 (18:25 +0000)]
Update PAM note and mention where HP-UX users can download gcc binaries.

20 years agolibtool wants to install stuff from .libs so fake one up for binary
Todd C. Miller [Sun, 12 Sep 2004 16:08:25 +0000 (16:08 +0000)]
libtool wants to install stuff from .libs so fake one up for binary
installations.

20 years agorm -f old sudoedit link instead of using ln -f
Todd C. Miller [Sun, 12 Sep 2004 15:53:28 +0000 (15:53 +0000)]
rm -f old sudoedit link instead of using ln -f
set LIBTOOL correctly

20 years agoDeal with "uname -m" having slashes in it
Todd C. Miller [Sun, 12 Sep 2004 15:53:03 +0000 (15:53 +0000)]
Deal with "uname -m" having slashes in it
rm -f old sudoedit link instead of using ln -f

20 years agoMakefile.binary -> Makefile.binary.in for config.status substitution
Todd C. Miller [Sun, 12 Sep 2004 14:22:36 +0000 (14:22 +0000)]
Makefile.binary -> Makefile.binary.in for config.status substitution
Add support for installing noexec bits

20 years agoCopy noexec bits into binary dists too
Todd C. Miller [Sun, 12 Sep 2004 14:21:49 +0000 (14:21 +0000)]
Copy noexec bits into binary dists too
No longer use my old arch script for making binary dists

20 years agoInstall sudoedit link.
Todd C. Miller [Sun, 12 Sep 2004 13:36:43 +0000 (13:36 +0000)]
Install sudoedit link.

20 years agoavoid __P so there is no need for compat.h to be included
Todd C. Miller [Sat, 11 Sep 2004 16:25:27 +0000 (16:25 +0000)]
avoid __P so there is no need for compat.h to be included

20 years agoDon't use HAVE_UTIME_H before including config.h.
Todd C. Miller [Sat, 11 Sep 2004 16:24:28 +0000 (16:24 +0000)]
Don't use HAVE_UTIME_H before including config.h.

20 years agoFix Solatis futimes macro
Todd C. Miller [Fri, 10 Sep 2004 16:31:15 +0000 (16:31 +0000)]
Fix Solatis futimes macro