]> granicus.if.org Git - sudo/log
sudo
17 years agoDon't quote *?[]! on output since the lexer does not strip off the
Todd C. Miller [Thu, 8 Nov 2007 12:24:41 +0000 (12:24 +0000)]
Don't quote *?[]! on output since the lexer does not strip off the
backslash when reading those in.

17 years agoexpand "u_foo" types to "unsigned foo" to avoid compatibility issues.
Todd C. Miller [Wed, 7 Nov 2007 18:16:31 +0000 (18:16 +0000)]
expand "u_foo" types to "unsigned foo" to avoid compatibility issues.

17 years agoRefactor log line generation in to new_logline().
Todd C. Miller [Sun, 4 Nov 2007 13:33:18 +0000 (13:33 +0000)]
Refactor log line generation in to new_logline().

17 years agofix typo
Todd C. Miller [Thu, 25 Oct 2007 13:23:39 +0000 (13:23 +0000)]
fix typo

17 years agoAdd configure check for struct in6_addr instead of relying on AF_INET6
Todd C. Miller [Wed, 24 Oct 2007 16:41:19 +0000 (16:41 +0000)]
Add configure check for struct in6_addr instead of relying on AF_INET6
since some systems define AF_INET6 but do not include IPv6 support.

17 years agoFix block to add -lutil for FreeBSD and NetBSD when logincap is in use.
Todd C. Miller [Sun, 21 Oct 2007 13:29:18 +0000 (13:29 +0000)]
Fix block to add -lutil for FreeBSD and NetBSD when logincap is in use.

17 years agoPOSIX states that struct timespec be declared in time.h so check
Todd C. Miller [Sat, 20 Oct 2007 02:28:40 +0000 (02:28 +0000)]
POSIX states that struct timespec be declared in time.h so check
there regardless of the value of TIME_WITH_SYS_TIME.

17 years agoInstead of defining a macro to call the appropriate method for
Todd C. Miller [Wed, 17 Oct 2007 15:37:30 +0000 (15:37 +0000)]
Instead of defining a macro to call the appropriate method for
turning on/off echo, just define tc[gs]etattr() and the related
defines that use the correct terminal ioctls if needed.
Also go back to using TCSAFLUSH instead of TCSADRAIN on all but QNX.

17 years agog/c @ALLOCA@
Todd C. Miller [Tue, 9 Oct 2007 00:18:07 +0000 (00:18 +0000)]
g/c @ALLOCA@

17 years agoregen
Todd C. Miller [Tue, 9 Oct 2007 00:07:25 +0000 (00:07 +0000)]
regen

17 years agoAdd --disable-pam-session configure option to disable calling
Todd C. Miller [Tue, 9 Oct 2007 00:04:48 +0000 (00:04 +0000)]
Add --disable-pam-session configure option to disable calling
pam_{open,close}_session.  May work around bugs in some PAM
implementations.

17 years agoquiet gcc warnings
Todd C. Miller [Mon, 8 Oct 2007 16:00:59 +0000 (16:00 +0000)]
quiet gcc warnings

17 years agoAvoid printing the prompt if we are already backgrounded.
Todd C. Miller [Mon, 8 Oct 2007 12:41:08 +0000 (12:41 +0000)]
Avoid printing the prompt if we are already backgrounded.
E.g. if the user runs "sudo foo &" from the shell.  In this
case, the call to tcsetattr() will cause SIGTTOU to be delivered.

17 years agoReorder things such that the definition of env_reset come right
Todd C. Miller [Sat, 15 Sep 2007 20:07:50 +0000 (20:07 +0000)]
Reorder things such that the definition of env_reset come right
before the env variable lists.

17 years agoShrink type and seqno in struct alias from int to u_short
Todd C. Miller [Sat, 15 Sep 2007 11:50:28 +0000 (11:50 +0000)]
Shrink type and seqno in struct alias from int to u_short

17 years agoAdd a sequence number in the aliases for loop detection. If we find
Todd C. Miller [Sat, 15 Sep 2007 11:24:54 +0000 (11:24 +0000)]
Add a sequence number in the aliases for loop detection.  If we find
an alias with the seqno already set to the current (global) value we
know we've visited it before so ignore it.

17 years agoPAM wants the full tty path so add user_ttypath which holds the
Todd C. Miller [Thu, 13 Sep 2007 23:05:34 +0000 (23:05 +0000)]
PAM wants the full tty path so add user_ttypath which holds the
full path to the tty or is NULL if no tty was present.

17 years agoSet PAM_RHOST to work around a bug in Solaris 7 and lower that
Todd C. Miller [Thu, 13 Sep 2007 22:42:15 +0000 (22:42 +0000)]
Set PAM_RHOST to work around a bug in Solaris 7 and lower that
results in a segv.

17 years agoregen
Todd C. Miller [Tue, 11 Sep 2007 19:43:07 +0000 (19:43 +0000)]
regen

17 years agorename lh_ -> tq_
Todd C. Miller [Tue, 11 Sep 2007 19:42:48 +0000 (19:42 +0000)]
rename lh_ -> tq_

17 years agoremove some useless casts
Todd C. Miller [Mon, 10 Sep 2007 21:33:31 +0000 (21:33 +0000)]
remove some useless casts

17 years agopull in inttypes.h for SIZE_MAX; we avoid stdint.h since inttypes.h predates the...
Todd C. Miller [Mon, 10 Sep 2007 21:32:53 +0000 (21:32 +0000)]
pull in inttypes.h for SIZE_MAX; we avoid stdint.h since inttypes.h predates the final C99 spec and the standard specifies that it shall include stdint.h anyway

17 years agoSince we ship with a pre-generated parser there is no need to
Todd C. Miller [Thu, 6 Sep 2007 16:39:11 +0000 (16:39 +0000)]
Since we ship with a pre-generated parser there is no need to
ship a bogus alloca implementation.

17 years agoregen
Todd C. Miller [Thu, 6 Sep 2007 16:22:23 +0000 (16:22 +0000)]
regen

17 years agoremove initial setting of CHECKSIA, we require that it be unset if not used
Todd C. Miller [Thu, 6 Sep 2007 16:19:20 +0000 (16:19 +0000)]
remove initial setting of CHECKSIA, we require that it be unset if not used

17 years agoadd list.c to SRCS
Todd C. Miller [Thu, 6 Sep 2007 15:55:24 +0000 (15:55 +0000)]
add list.c to SRCS

17 years agoregen
Todd C. Miller [Thu, 6 Sep 2007 11:18:13 +0000 (11:18 +0000)]
regen

17 years agoonly do SIA checks on Digital Unix
Todd C. Miller [Thu, 6 Sep 2007 11:17:43 +0000 (11:17 +0000)]
only do SIA checks on Digital Unix

17 years agoregen
Todd C. Miller [Wed, 5 Sep 2007 22:50:55 +0000 (22:50 +0000)]
regen

17 years agosync
Todd C. Miller [Wed, 5 Sep 2007 22:48:23 +0000 (22:48 +0000)]
sync

17 years agoRemove call to krb5_cc_register() as it is not needed for modern kerb5.
Todd C. Miller [Wed, 5 Sep 2007 22:39:55 +0000 (22:39 +0000)]
Remove call to krb5_cc_register() as it is not needed for modern kerb5.

17 years agoregen
Todd C. Miller [Wed, 5 Sep 2007 22:16:46 +0000 (22:16 +0000)]
regen

17 years agoNew method for setting the default authentication type and
Todd C. Miller [Wed, 5 Sep 2007 22:16:22 +0000 (22:16 +0000)]
New method for setting the default authentication type and
avoiding conflicts in auth types.

17 years agoEach entry in a cmndlist now has an associated runaslist
Todd C. Miller [Wed, 5 Sep 2007 18:45:26 +0000 (18:45 +0000)]
Each entry in a cmndlist now has an associated runaslist
so no need to keep track of the most recent non-NULL one.

17 years agoback out partial ldaps support mistakenly committed
Todd C. Miller [Tue, 4 Sep 2007 22:51:35 +0000 (22:51 +0000)]
back out partial ldaps support mistakenly committed

17 years agoAdd support for unix groups and netgroups in sudoRunas
Todd C. Miller [Tue, 4 Sep 2007 14:57:14 +0000 (14:57 +0000)]
Add support for unix groups and netgroups in sudoRunas

17 years agoFix sudoedit of a non-existent file. From Tilo Stritzky.
Todd C. Miller [Mon, 3 Sep 2007 20:28:15 +0000 (20:28 +0000)]
Fix sudoedit of a non-existent file.  From Tilo Stritzky.

17 years agoregen
Todd C. Miller [Sun, 2 Sep 2007 21:05:58 +0000 (21:05 +0000)]
regen

17 years agoupdate --passprompt escape info
Todd C. Miller [Sun, 2 Sep 2007 21:05:32 +0000 (21:05 +0000)]
update --passprompt escape info

17 years agoremove now-bogus comment and update copyright date
Todd C. Miller [Sun, 2 Sep 2007 21:03:21 +0000 (21:03 +0000)]
remove now-bogus comment and update copyright date

17 years agoFix up use of with_passwd
Todd C. Miller [Sun, 2 Sep 2007 20:35:52 +0000 (20:35 +0000)]
Fix up use of with_passwd

17 years agoUpdate to autoconf-2.61 andf libtool-1.5.24
Todd C. Miller [Sun, 2 Sep 2007 20:25:53 +0000 (20:25 +0000)]
Update to autoconf-2.61 andf libtool-1.5.24

17 years ago"cmp -s" not just cmp
Todd C. Miller [Sun, 2 Sep 2007 20:17:23 +0000 (20:17 +0000)]
"cmp -s" not just cmp
Add @datarootdir@ to quiet autoconf-2.61

17 years agoregen
Todd C. Miller [Sat, 1 Sep 2007 21:39:24 +0000 (21:39 +0000)]
regen

17 years agomove tags and runaslist propagation to be earlier
Todd C. Miller [Sat, 1 Sep 2007 21:39:18 +0000 (21:39 +0000)]
move tags and runaslist propagation to be earlier

17 years agoIf -f flag given use the permissions of the original file as a template
Todd C. Miller [Sat, 1 Sep 2007 13:34:41 +0000 (13:34 +0000)]
If -f flag given use the permissions of the original file as a template

17 years agoprevent a double free() when re-initing the parser
Todd C. Miller [Sat, 1 Sep 2007 12:45:11 +0000 (12:45 +0000)]
prevent a double free() when re-initing the parser

17 years agoregen
Todd C. Miller [Fri, 31 Aug 2007 23:30:35 +0000 (23:30 +0000)]
regen

17 years agoRemove support for compilers that don't support void *
Todd C. Miller [Fri, 31 Aug 2007 23:30:07 +0000 (23:30 +0000)]
Remove support for compilers that don't support void *

17 years agoregen
Todd C. Miller [Fri, 31 Aug 2007 23:14:37 +0000 (23:14 +0000)]
regen

17 years agoMove list manipulation macros to list.h and create C versions of
Todd C. Miller [Fri, 31 Aug 2007 23:13:26 +0000 (23:13 +0000)]
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.

17 years agoFix cmp command when regenerating parser.
Todd C. Miller [Fri, 31 Aug 2007 21:21:01 +0000 (21:21 +0000)]
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.

17 years agoConvert NEW_DEFAULT anf NEW_MEMBER into static functions.
Todd C. Miller [Fri, 31 Aug 2007 17:56:30 +0000 (17:56 +0000)]
Convert NEW_DEFAULT anf NEW_MEMBER into static functions.

17 years agoUse LH_FOREACH_REV when checking permission and short-circuit on
Todd C. Miller [Fri, 31 Aug 2007 01:21:26 +0000 (01:21 +0000)]
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.

17 years agoregen
Todd C. Miller [Fri, 31 Aug 2007 01:13:05 +0000 (01:13 +0000)]
regen

17 years agoChange list head macros to take a pointer, not a struct.
Todd C. Miller [Fri, 31 Aug 2007 01:12:50 +0000 (01:12 +0000)]
Change list head macros to take a pointer, not a struct.

17 years agoregen
Todd C. Miller [Fri, 31 Aug 2007 00:46:49 +0000 (00:46 +0000)]
regen

17 years agoPropagate the runasspec from one command to the next in a cmndspec.
Todd C. Miller [Fri, 31 Aug 2007 00:46:43 +0000 (00:46 +0000)]
Propagate the runasspec from one command to the next in a cmndspec.

17 years agoReplace has_meta() with a macro that calls strpbrk().
Todd C. Miller [Thu, 30 Aug 2007 20:15:48 +0000 (20:15 +0000)]
Replace has_meta() with a macro that calls strpbrk().

17 years agoregen
Todd C. Miller [Thu, 30 Aug 2007 20:04:24 +0000 (20:04 +0000)]
regen

17 years agoUse a list head struct when storing the semi-circular lists and
Todd C. Miller [Thu, 30 Aug 2007 17:26:35 +0000 (17:26 +0000)]
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.

17 years agoFix pasto, append "!" not negated (which is an int) for sudo -l output.
Todd C. Miller [Thu, 30 Aug 2007 17:12:00 +0000 (17:12 +0000)]
Fix pasto, append "!" not negated (which is an int) for sudo -l output.

17 years agoRemove the dependency of gram .h on gram.y, the .c dependency is enough.
Todd C. Miller [Thu, 30 Aug 2007 16:45:28 +0000 (16:45 +0000)]
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.

17 years agoDefaults lines may be associated with lists of users, hosts, commands
Todd C. Miller [Mon, 27 Aug 2007 19:51:58 +0000 (19:51 +0000)]
Defaults lines may be associated with lists of users, hosts, commands
and runas users, not just single entries.

17 years agoRevert the "cmp" portion of the last diff, it doesn't make sense.
Todd C. Miller [Sun, 26 Aug 2007 21:42:31 +0000 (21:42 +0000)]
Revert the "cmp" portion of the last diff, it doesn't make sense.

17 years agoRemove *.lo for clean:
Todd C. Miller [Sun, 26 Aug 2007 21:10:33 +0000 (21:10 +0000)]
Remove *.lo for clean:
When generating the parser, only move the generated files into place
if they differ from the existing ones.

17 years agoReplace IPV6 regexp with a much simpler (readable) one and add an
Todd C. Miller [Sat, 25 Aug 2007 02:47:54 +0000 (02:47 +0000)]
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.

17 years agoFix thinko introduced when merging IPV6 support.
Todd C. Miller [Sat, 25 Aug 2007 02:36:09 +0000 (02:36 +0000)]
Fix thinko introduced when merging IPV6 support.

17 years agoregen
Todd C. Miller [Fri, 24 Aug 2007 18:23:42 +0000 (18:23 +0000)]
regen

17 years agoadd 2007
Todd C. Miller [Fri, 24 Aug 2007 18:23:24 +0000 (18:23 +0000)]
add 2007

17 years agomention #uid vs. comment pitfall
Todd C. Miller [Fri, 24 Aug 2007 18:19:19 +0000 (18:19 +0000)]
mention #uid vs. comment pitfall

17 years agoMerge in a patch from the libtool cvs that fixes a problem with the
Todd C. Miller [Fri, 24 Aug 2007 13:50:16 +0000 (13:50 +0000)]
Merge in a patch from the libtool cvs that fixes a problem with the
latest autoconf.  From Stepan Kasal.

17 years agoBack out he XOR swap trick, it is slower than a temp variable on
Todd C. Miller [Fri, 24 Aug 2007 00:28:57 +0000 (00:28 +0000)]
Back out he XOR swap trick, it is slower than a temp variable on
modern CPUs.

17 years agoregen
Todd C. Miller [Fri, 24 Aug 2007 00:14:42 +0000 (00:14 +0000)]
regen

17 years agoConvert the tail queue to a semi-circle queue and use the XOR swap
Todd C. Miller [Fri, 24 Aug 2007 00:14:21 +0000 (00:14 +0000)]
Convert the tail queue to a semi-circle queue and use the XOR swap
trick to swap the prev pointers during append.

17 years agoremove useless statement
Todd C. Miller [Thu, 23 Aug 2007 19:31:29 +0000 (19:31 +0000)]
remove useless statement

17 years agoRefactor #include parsing into a separate function and return
Todd C. Miller [Thu, 23 Aug 2007 11:47:08 +0000 (11:47 +0000)]
Refactor #include parsing into a separate function and return
unparsed chars (such as newline or comment) back to the lexer.

17 years agomention better uid support
Todd C. Miller [Wed, 22 Aug 2007 22:56:56 +0000 (22:56 +0000)]
mention better uid support

17 years agoUsers may now consist of a uid.
Todd C. Miller [Wed, 22 Aug 2007 22:55:46 +0000 (22:55 +0000)]
Users may now consist of a uid.

17 years agoregen
Todd C. Miller [Wed, 22 Aug 2007 22:39:20 +0000 (22:39 +0000)]
regen

17 years agoUse lbuf_append_quoted() for sudo -l output to quote characters that
Todd C. Miller [Wed, 22 Aug 2007 22:32:00 +0000 (22:32 +0000)]
Use lbuf_append_quoted() for sudo -l output to quote characters that
would require quoting in sudoers.

17 years agoAdd lbuf_append_quoted() which takes a set of characters which
Todd C. Miller [Wed, 22 Aug 2007 22:31:07 +0000 (22:31 +0000)]
Add lbuf_append_quoted() which takes a set of characters which
should be quoted with a backslash when displayed.

17 years agoRequire that the first character after a comment not be a digit or
Todd C. Miller [Wed, 22 Aug 2007 22:28:20 +0000 (22:28 +0000)]
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.

17 years agoReplace RUNAS token with '(' and ')' tokens to make the runas
Todd C. Miller [Wed, 22 Aug 2007 22:23:59 +0000 (22:23 +0000)]
Replace RUNAS token with '(' and ')' tokens to make the runas
portion of the grammar more natural.

17 years agoThe BUGS file is history
Todd C. Miller [Wed, 22 Aug 2007 10:37:53 +0000 (10:37 +0000)]
The BUGS file is history

17 years agoThe BUGS file is history
Todd C. Miller [Wed, 22 Aug 2007 10:35:40 +0000 (10:35 +0000)]
The BUGS file is history

17 years agoAllow comments after a RunasAlias as long as the character after
Todd C. Miller [Tue, 21 Aug 2007 13:19:04 +0000 (13:19 +0000)]
Allow comments after a RunasAlias as long as the character after
the pound sign isn't a digit or a dash.

17 years agoGlob support was back-ported to 1.6.9
Todd C. Miller [Tue, 21 Aug 2007 00:43:19 +0000 (00:43 +0000)]
Glob support was back-ported to 1.6.9

17 years agoremove sudo_usage.h in distclean
Todd C. Miller [Mon, 20 Aug 2007 23:59:50 +0000 (23:59 +0000)]
remove sudo_usage.h in distclean

17 years agoIf a Defaults value contains a blank, double-quote the string.
Todd C. Miller [Mon, 20 Aug 2007 23:24:31 +0000 (23:24 +0000)]
If a Defaults value contains a blank, double-quote the string.

17 years agoProperly deal with Defaults double-quoted strings that span multiple
Todd C. Miller [Mon, 20 Aug 2007 23:19:44 +0000 (23:19 +0000)]
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.

17 years agoBe consistent when using single quotes and backticks.
Todd C. Miller [Mon, 20 Aug 2007 14:46:40 +0000 (14:46 +0000)]
Be consistent when using single quotes and backticks.

17 years agoAdd new linebuf code to do appends of dynamically allocated strings
Todd C. Miller [Sun, 19 Aug 2007 20:48:09 +0000 (20:48 +0000)]
Add new linebuf code to do appends of dynamically allocated strings
and word-wrapped output.  Currently used for sudo's usage() and
sudo -l output.  Sudo usage strings are now in sudo_usage.h which
is generated at configure time.

17 years agoFix line wrapping in usage() and use the actual tty width instead of
Todd C. Miller [Sat, 18 Aug 2007 12:22:16 +0000 (12:22 +0000)]
Fix line wrapping in usage() and use the actual tty width instead of
assuming 80.

17 years agosome more info
Todd C. Miller [Fri, 17 Aug 2007 22:32:01 +0000 (22:32 +0000)]
some more info

17 years agoMentioned Chris Jepeway's parser and also the new one that is in sudo 1.7.
Todd C. Miller [Fri, 17 Aug 2007 21:28:03 +0000 (21:28 +0000)]
Mentioned Chris Jepeway's parser and also the new one that is in sudo 1.7.

17 years agoFor the options list, add flag args where appropriate and increase the
Todd C. Miller [Thu, 16 Aug 2007 13:38:24 +0000 (13:38 +0000)]
For the options list, add flag args where appropriate and increase the
indent level so there is room for them.

17 years agoFix some spacing in "sudo -l" and add a comment about some bogosity
Todd C. Miller [Wed, 15 Aug 2007 17:49:52 +0000 (17:49 +0000)]
Fix some spacing in "sudo -l" and add a comment about some bogosity
in the line wrapping.

17 years agoregen
Todd C. Miller [Wed, 15 Aug 2007 15:21:14 +0000 (15:21 +0000)]
regen

17 years agoRemove monitor support until there is a versino of systrace that
Todd C. Miller [Wed, 15 Aug 2007 15:20:01 +0000 (15:20 +0000)]
Remove monitor support until there is a versino of systrace that
uses a lookaside buffer (or we have a better mechanism to use).