]> granicus.if.org Git - sudo/log
sudo
15 years agoUse if then instead of test && when installing binaries that may
Todd C. Miller [Sun, 27 Sep 2009 18:54:08 +0000 (18:54 +0000)]
Use if then instead of test && when installing binaries that may
not exist.

15 years agoAdd O_NOCTTY when opening a tty device.
Todd C. Miller [Sun, 27 Sep 2009 18:34:18 +0000 (18:34 +0000)]
Add O_NOCTTY when opening a tty device.
Explicitly disconnect from old tty before associatng with new one.

15 years agoFirst cut at refactoring some of the selinux code so it can be used
Todd C. Miller [Sun, 27 Sep 2009 13:03:56 +0000 (13:03 +0000)]
First cut at refactoring some of the selinux code so it can be used
in conjunction with sudo's transcript support.

15 years agoFix default case of transcript_enabled being unset.
Todd C. Miller [Sat, 26 Sep 2009 20:25:58 +0000 (20:25 +0000)]
Fix default case of transcript_enabled being unset.

15 years agoUse _PATH_SUDO_TRANSCRIPT instead of _PATH_SUDO_SESSDIR
Todd C. Miller [Sat, 26 Sep 2009 15:41:14 +0000 (15:41 +0000)]
Use _PATH_SUDO_TRANSCRIPT instead of _PATH_SUDO_SESSDIR

15 years agoHook up --disable-transcript and --enable-transcript=DIR
Todd C. Miller [Sat, 26 Sep 2009 15:34:46 +0000 (15:34 +0000)]
Hook up --disable-transcript and --enable-transcript=DIR

15 years ago_PATH_SUDO_SESSDIR -> _PATH_SUDO_TRANSCRIPT
Todd C. Miller [Fri, 25 Sep 2009 20:39:09 +0000 (20:39 +0000)]
_PATH_SUDO_SESSDIR -> _PATH_SUDO_TRANSCRIPT
Add --enable-transcript=DIR option to specify the directory

15 years agoregen
Todd C. Miller [Fri, 25 Sep 2009 01:12:16 +0000 (01:12 +0000)]
regen

15 years agoSubstitute in default value for secure_path
Todd C. Miller [Fri, 25 Sep 2009 01:11:49 +0000 (01:11 +0000)]
Substitute in default value for secure_path

15 years agoMention that the password must be followed by a newline with the -S option.
Todd C. Miller [Fri, 25 Sep 2009 00:31:35 +0000 (00:31 +0000)]
Mention that the password must be followed by a newline with the -S option.

15 years agoGo back to dropping out of the select() loop when the process dies; Linux
Todd C. Miller [Sun, 20 Sep 2009 13:51:51 +0000 (13:51 +0000)]
Go back to dropping out of the select() loop when the process dies; Linux
ptys apparently don't behave the same as BSD in regards to select().
No need to flush remaining output to the transcript, only to stdout.
Add back code to check the master pty for additional data when we exit
the main select loop.

15 years agoAdd getline.o to COMMON_OBJS
Todd C. Miller [Sat, 19 Sep 2009 19:24:48 +0000 (19:24 +0000)]
Add getline.o to COMMON_OBJS

15 years agosudoreplay depends on libsudo.a
Todd C. Miller [Sat, 19 Sep 2009 19:21:18 +0000 (19:21 +0000)]
sudoreplay depends on libsudo.a

15 years agoMore pwutil.o into COMMON_OBJS
Todd C. Miller [Sat, 19 Sep 2009 19:15:34 +0000 (19:15 +0000)]
More pwutil.o into COMMON_OBJS

15 years agoRemove my_* redirection in pwutil.c for testsudoers and just use the normal
Todd C. Miller [Sat, 19 Sep 2009 19:13:10 +0000 (19:13 +0000)]
Remove my_* redirection in pwutil.c for testsudoers and just use the normal
libc get{pw,gr}* names.

15 years agoMore time and date examples
Todd C. Miller [Sat, 19 Sep 2009 18:26:38 +0000 (18:26 +0000)]
More time and date examples

15 years agoMove nanosleep() emulation into its own file
Todd C. Miller [Sat, 19 Sep 2009 17:44:34 +0000 (17:44 +0000)]
Move nanosleep() emulation into its own file
Check librt.a for nanosleep if we don't find it in libc

15 years agoBuild libsudo with the common bits and link things against that.
Todd C. Miller [Sat, 19 Sep 2009 17:21:14 +0000 (17:21 +0000)]
Build libsudo with the common bits and link things against that.

15 years agoFix final flush.
Todd C. Miller [Sat, 19 Sep 2009 11:43:24 +0000 (11:43 +0000)]
Fix final flush.

15 years agoKeep reading from the pty master -> log file until read returns <= 0.
Todd C. Miller [Sat, 19 Sep 2009 11:35:20 +0000 (11:35 +0000)]
Keep reading from the pty master -> log file until read returns <= 0.
Do our best to write everything to stdout when flushing any remaining bits.

15 years agoUse unbuffered I/O when writing to stdout and make sure we write
Todd C. Miller [Sat, 19 Sep 2009 00:21:27 +0000 (00:21 +0000)]
Use unbuffered I/O when writing to stdout and make sure we write
the entire buffer.

15 years agoOnly use max_wait if it is non-zero
Todd C. Miller [Fri, 18 Sep 2009 14:53:51 +0000 (14:53 +0000)]
Only use max_wait if it is non-zero

15 years agoNeed compat.h here
Todd C. Miller [Fri, 18 Sep 2009 13:18:56 +0000 (13:18 +0000)]
Need compat.h here

15 years agoFix nanosleep emulation
Todd C. Miller [Fri, 18 Sep 2009 13:18:30 +0000 (13:18 +0000)]
Fix nanosleep emulation

15 years agoFix comment after #endif
Todd C. Miller [Fri, 18 Sep 2009 13:18:03 +0000 (13:18 +0000)]
Fix comment after #endif

15 years agoAdd protos for missing libc bits
Todd C. Miller [Fri, 18 Sep 2009 13:08:20 +0000 (13:08 +0000)]
Add protos for missing libc bits

15 years agoadd missing line continuation char
Todd C. Miller [Fri, 18 Sep 2009 13:04:14 +0000 (13:04 +0000)]
add missing line continuation char

15 years agoImplement getline() in terms of fgetln() if we have it.
Todd C. Miller [Fri, 18 Sep 2009 12:23:01 +0000 (12:23 +0000)]
Implement getline() in terms of fgetln() if we have it.

15 years agoPrint year when formatting log line
Todd C. Miller [Fri, 18 Sep 2009 12:12:35 +0000 (12:12 +0000)]
Print year when formatting log line

15 years agoDocument cwd, attempt to document time/date formats.
Todd C. Miller [Fri, 18 Sep 2009 02:05:41 +0000 (02:05 +0000)]
Document cwd, attempt to document time/date formats.

15 years agoFix getline return value check.
Todd C. Miller [Fri, 18 Sep 2009 01:21:12 +0000 (01:21 +0000)]
Fix getline return value check.

15 years agoUse getline() if the system has it, else use provide our own for sudoreplay.
Todd C. Miller [Fri, 18 Sep 2009 01:16:56 +0000 (01:16 +0000)]
Use getline() if the system has it, else use provide our own for sudoreplay.

15 years agoRefactor code to update output and timing files.
Todd C. Miller [Fri, 18 Sep 2009 00:32:32 +0000 (00:32 +0000)]
Refactor code to update output and timing files.

15 years agoMake sudo_getln() behave more like glibc getline.
Todd C. Miller [Thu, 17 Sep 2009 10:22:03 +0000 (10:22 +0000)]
Make sudo_getln() behave more like glibc getline.

15 years agoWhen flushing remaining output, also update timing file.
Todd C. Miller [Thu, 17 Sep 2009 10:14:01 +0000 (10:14 +0000)]
When flushing remaining output, also update timing file.

15 years agoUse get_timestr() and make the -l output look like the regular sudo log.
Todd C. Miller [Thu, 17 Sep 2009 09:56:04 +0000 (09:56 +0000)]
Use get_timestr() and make the -l output look like the regular sudo log.

15 years agoMake get_timestr() take a time_t so we can use it properly in
Todd C. Miller [Thu, 17 Sep 2009 09:55:08 +0000 (09:55 +0000)]
Make get_timestr() take a time_t so we can use it properly in
sudoreplay.

15 years agoCreate session dir earlier now that we update the seq number early.
Todd C. Miller [Thu, 17 Sep 2009 09:54:33 +0000 (09:54 +0000)]
Create session dir earlier now that we update the seq number early.

15 years agoUse fromdate and todate as the keywords instead of from and to; the short
Todd C. Miller [Wed, 16 Sep 2009 13:36:29 +0000 (13:36 +0000)]
Use fromdate and todate as the keywords instead of from and to; the short
forms will still be accepted.

15 years agoFix reading long liensin sudo_getln()
Todd C. Miller [Wed, 16 Sep 2009 12:01:32 +0000 (12:01 +0000)]
Fix reading long liensin sudo_getln()

15 years agoLog the cwd in the script log file.
Todd C. Miller [Wed, 16 Sep 2009 11:49:40 +0000 (11:49 +0000)]
Log the cwd in the script log file.
Add sudo_getln() to read arbitrarily long lines.

15 years agoMove get_timestr() into its own source file so sudoreplay can use it.
Todd C. Miller [Wed, 16 Sep 2009 11:48:34 +0000 (11:48 +0000)]
Move get_timestr() into its own source file so sudoreplay can use it.

15 years agoAdd to and from perdicates (date ranges); needs documentation
Todd C. Miller [Tue, 15 Sep 2009 00:24:43 +0000 (00:24 +0000)]
Add to and from perdicates (date ranges); needs documentation

15 years agoFix warning and add generated getdate.c
Todd C. Miller [Mon, 14 Sep 2009 13:19:47 +0000 (13:19 +0000)]
Fix warning and add generated getdate.c

15 years agoAdd getdate.y to be used for sudoreplay date parsing.
Todd C. Miller [Mon, 14 Sep 2009 13:16:06 +0000 (13:16 +0000)]
Add getdate.y to be used for sudoreplay date parsing.

15 years agoCheck more than just the first character of a predicate
Todd C. Miller [Sun, 13 Sep 2009 22:36:34 +0000 (22:36 +0000)]
Check more than just the first character of a predicate

15 years agoAdd examples, sort predicates
Todd C. Miller [Sun, 13 Sep 2009 22:30:48 +0000 (22:30 +0000)]
Add examples, sort predicates

15 years agoImplement search expressions in sudoreplay similar in concept to
Todd C. Miller [Sun, 13 Sep 2009 22:02:07 +0000 (22:02 +0000)]
Implement search expressions in sudoreplay similar in concept to
what find or tcpdump uses.  TODO: date ranges

15 years agoRemove vhangup as it was hanging up the wrong tty. Should really
Todd C. Miller [Mon, 7 Sep 2009 15:07:48 +0000 (15:07 +0000)]
Remove vhangup as it was hanging up the wrong tty.  Should really
vhangup in the child after it as set its tty.

15 years agoFix cut at documenting transcript support.
Todd C. Miller [Mon, 7 Sep 2009 14:21:09 +0000 (14:21 +0000)]
Fix cut at documenting transcript support.

15 years agoID= -> TSID= for transcript ID
Todd C. Miller [Mon, 7 Sep 2009 14:18:06 +0000 (14:18 +0000)]
ID= -> TSID= for transcript ID

15 years agoMove fast_glob description to where it belongs in sorted order
Todd C. Miller [Sun, 6 Sep 2009 16:30:50 +0000 (16:30 +0000)]
Move fast_glob description to where it belongs in sorted order

15 years agoRename script -> transcript
Todd C. Miller [Sun, 6 Sep 2009 13:28:36 +0000 (13:28 +0000)]
Rename script -> transcript

15 years agoAdd timeradd and timersub for those without them
Todd C. Miller [Thu, 3 Sep 2009 23:53:06 +0000 (23:53 +0000)]
Add timeradd and timersub for those without them

15 years agoSanity check sessid before using it.
Todd C. Miller [Thu, 3 Sep 2009 23:27:24 +0000 (23:27 +0000)]
Sanity check sessid before using it.

15 years agoOnly set the session id if we are running a command or editing a file.
Todd C. Miller [Thu, 3 Sep 2009 23:26:05 +0000 (23:26 +0000)]
Only set the session id if we are running a command or editing a file.

15 years agoActually. qsort is fine since most versions fal back to a cheaper
Todd C. Miller [Thu, 3 Sep 2009 13:21:43 +0000 (13:21 +0000)]
Actually. qsort is fine since most versions fal back to a cheaper
sort when the number of elements to sort is small (like in our case).

15 years agoCheck for dup2 and use dup instead if we don't have it.
Todd C. Miller [Thu, 3 Sep 2009 11:28:07 +0000 (11:28 +0000)]
Check for dup2 and use dup instead if we don't have it.

15 years agoMove the code to dup2 the script fds to low numbered descriptors into
Todd C. Miller [Thu, 3 Sep 2009 10:36:02 +0000 (10:36 +0000)]
Move the code to dup2 the script fds to low numbered descriptors into
script_duplow() and fix the fd sorting.

15 years agoMove script_setup() back to immediately before we drop privs and
Todd C. Miller [Thu, 3 Sep 2009 10:21:18 +0000 (10:21 +0000)]
Move script_setup() back to immediately before we drop privs and
call the new script_nextid() in its place, which will set
sudo_user.sessid for the logging functions.

15 years agoInstall sudoreplay
Todd C. Miller [Tue, 1 Sep 2009 20:03:07 +0000 (20:03 +0000)]
Install sudoreplay

15 years agoremove unused variable
Todd C. Miller [Tue, 1 Sep 2009 19:53:41 +0000 (19:53 +0000)]
remove unused variable

15 years agoLog the session ID, if there is one. Currently logs ID=XXXXXX, perhaps
Todd C. Miller [Sun, 30 Aug 2009 15:18:50 +0000 (15:18 +0000)]
Log the session ID, if there is one.  Currently logs ID=XXXXXX, perhaps
should be SESSIONID or SESSID.

15 years agoAdd sudoreplay docs
Todd C. Miller [Sun, 30 Aug 2009 14:56:18 +0000 (14:56 +0000)]
Add sudoreplay docs

15 years agoadd -V (version) flag
Todd C. Miller [Sun, 30 Aug 2009 14:50:51 +0000 (14:50 +0000)]
add -V (version) flag

15 years agoHook up max_wait.
Todd C. Miller [Sun, 30 Aug 2009 14:11:04 +0000 (14:11 +0000)]
Hook up max_wait.

15 years agoUse base36 number for the ID and store script files with paths like
Todd C. Miller [Sun, 30 Aug 2009 11:22:53 +0000 (11:22 +0000)]
Use base36 number for the ID and store script files with paths like
/var/log/sudo-session/00/00/00{,.tim,.scr}.
This gives us 36^6 (2,176,782,336) unique IDs.

15 years agoAdd check for regcomp
Todd C. Miller [Sun, 23 Aug 2009 23:52:23 +0000 (23:52 +0000)]
Add check for regcomp

15 years agoAdd support for selecting by pattern and tty when listing.
Todd C. Miller [Sun, 23 Aug 2009 13:33:26 +0000 (13:33 +0000)]
Add support for selecting by pattern and tty when listing.

15 years agoThe beginnings of a list mode.
Todd C. Miller [Mon, 17 Aug 2009 14:17:08 +0000 (14:17 +0000)]
The beginnings of a list mode.

15 years agofix pasto
Todd C. Miller [Sun, 16 Aug 2009 15:16:04 +0000 (15:16 +0000)]
fix pasto

15 years agoAdd scaffolding for building sudoreplay
Todd C. Miller [Sun, 16 Aug 2009 15:13:31 +0000 (15:13 +0000)]
Add scaffolding for building sudoreplay

15 years agoinclude error.h
Todd C. Miller [Sun, 16 Aug 2009 15:12:16 +0000 (15:12 +0000)]
include error.h
first arg to nanotime is const

15 years agoInitial cut at sudoreplay; replay a sudo session.
Todd C. Miller [Sun, 16 Aug 2009 14:58:13 +0000 (14:58 +0000)]
Initial cut at sudoreplay; replay a sudo session.

15 years agoFix wait() usage and use correct wait status.
Todd C. Miller [Sat, 8 Aug 2009 20:00:17 +0000 (20:00 +0000)]
Fix wait() usage and use correct wait status.

15 years agoAdd protos for term_* to sudo.h
Todd C. Miller [Sat, 8 Aug 2009 12:56:02 +0000 (12:56 +0000)]
Add protos for term_* to sudo.h

15 years agoFix detection of the child process exiting. Since the child is in
Todd C. Miller [Sat, 8 Aug 2009 12:55:43 +0000 (12:55 +0000)]
Fix detection of the child process exiting.  Since the child is in
its own session we should only ever get SIGCHLD for that process but
better safe than sorry.

15 years agoAdd UNIX98 pty support.
Todd C. Miller [Sat, 8 Aug 2009 00:29:30 +0000 (00:29 +0000)]
Add UNIX98 pty support.

15 years agoAdd UNIX98 pty support.
Todd C. Miller [Sat, 8 Aug 2009 00:26:13 +0000 (00:26 +0000)]
Add UNIX98 pty support.

15 years agoFor raw mode, don't bother clearing BRKINT or PARMRK and clear IUCLC
Todd C. Miller [Fri, 7 Aug 2009 21:06:54 +0000 (21:06 +0000)]
For raw mode, don't bother clearing BRKINT or PARMRK and clear IUCLC
if it is defined.

15 years agoSet PAM_RUSER and PAM_RHOST early so they can be used during authentication.
Todd C. Miller [Fri, 7 Aug 2009 14:21:51 +0000 (14:21 +0000)]
Set PAM_RUSER and PAM_RHOST early so they can be used during authentication.
Based on a patch from Jamie Beverly.

15 years agoClose dir before returning if strlcpy() reports overflow.
Todd C. Miller [Fri, 7 Aug 2009 13:25:22 +0000 (13:25 +0000)]
Close dir before returning if strlcpy() reports overflow.
From Martynas Venckus.

15 years agoOn Linux, the openpty proto libes in pty.h
Todd C. Miller [Fri, 7 Aug 2009 13:23:07 +0000 (13:23 +0000)]
On Linux, the openpty proto libes in pty.h

15 years agoCall vhangup on exit if the system has it
Todd C. Miller [Fri, 7 Aug 2009 13:09:09 +0000 (13:09 +0000)]
Call vhangup on exit if the system has it
Use setpgrp() if no setsid()

15 years agoAdd checks for revoke and vhangup if we don't have openpty
Todd C. Miller [Thu, 6 Aug 2009 15:53:21 +0000 (15:53 +0000)]
Add checks for revoke and vhangup if we don't have openpty

15 years agoSession logging guts that got forgotten in the previous commit.
Todd C. Miller [Thu, 6 Aug 2009 15:51:12 +0000 (15:51 +0000)]
Session logging guts that got forgotten in the previous commit.

15 years agoFirst cut at session logging for sudo. Still need to write get_pty()
Todd C. Miller [Thu, 6 Aug 2009 00:04:14 +0000 (00:04 +0000)]
First cut at session logging for sudo.  Still need to write get_pty()
for Unix 98 and old-style BSD ptys.  Also needs documentation and
general cleanup.

15 years agoFix a bug introduced with def_closefrom. The value of def_closefrom
Todd C. Miller [Wed, 5 Aug 2009 23:59:21 +0000 (23:59 +0000)]
Fix a bug introduced with def_closefrom.  The value of def_closefrom
already includes the +1.

15 years agoGenerate sudo distributions with pax in ustar mode. No longer need
Todd C. Miller [Wed, 29 Jul 2009 22:16:44 +0000 (22:16 +0000)]
Generate sudo distributions with pax in ustar mode.  No longer need
to use a temp file or have the source dir name match the version.

15 years agoFix expansion of %h in #include names. Fixes bugzilla 363
Todd C. Miller [Sat, 18 Jul 2009 13:55:37 +0000 (13:55 +0000)]
Fix expansion of %h in #include names.  Fixes bugzilla 363

15 years agoIf no arg assume def_data.in
Todd C. Miller [Sun, 12 Jul 2009 21:17:13 +0000 (21:17 +0000)]
If no arg assume def_data.in

15 years agoUpdate for 1.7.2 SUDO_1_7_2
Todd C. Miller [Sun, 12 Jul 2009 01:27:03 +0000 (01:27 +0000)]
Update for 1.7.2

15 years agosync
Todd C. Miller [Sun, 12 Jul 2009 01:12:29 +0000 (01:12 +0000)]
sync

15 years agoAdd missing single quotes around a colon in Runas_Spec definition.
Todd C. Miller [Tue, 30 Jun 2009 12:41:09 +0000 (12:41 +0000)]
Add missing single quotes around a colon in Runas_Spec definition.
From Elias Benali.

15 years agoregen
Todd C. Miller [Mon, 29 Jun 2009 13:36:42 +0000 (13:36 +0000)]
regen

15 years agoIn rbrepair, re-color the root or the first non-block node we find to
Todd C. Miller [Mon, 29 Jun 2009 13:36:20 +0000 (13:36 +0000)]
In rbrepair, re-color the root or the first non-block node we find to
be black.  Re-coloring the root is probably not needed but won't hurt.

15 years agoregen
Todd C. Miller [Mon, 29 Jun 2009 13:35:21 +0000 (13:35 +0000)]
regen

15 years agoWhen repairing the tree, don't touch the root node.
Todd C. Miller [Fri, 26 Jun 2009 20:40:17 +0000 (20:40 +0000)]
When repairing the tree, don't touch the root node.

15 years agoProtect call to setegid in runas_setup with #ifdef HAVE_SETEUID.
Todd C. Miller [Thu, 25 Jun 2009 12:44:33 +0000 (12:44 +0000)]
Protect call to setegid in runas_setup with #ifdef HAVE_SETEUID.
Reported by Josef Schmid.

15 years agoDocument that we accept env_pam-style environment files
Todd C. Miller [Tue, 23 Jun 2009 18:29:02 +0000 (18:29 +0000)]
Document that we accept env_pam-style environment files