]> granicus.if.org Git - sudo/log
sudo
17 years agofix typo
Todd C. Miller [Mon, 17 Dec 2007 15:14:46 +0000 (15:14 +0000)]
fix typo

17 years agotry to clear up which variables are for OpenLDAP and which are for netscape-derived...
Todd C. Miller [Mon, 17 Dec 2007 13:08:29 +0000 (13:08 +0000)]
try to clear up which variables are for OpenLDAP and which are for netscape-derived SDKs

17 years agoAdd support for "ssl on" in both netscape and openldap flavors.
Todd C. Miller [Mon, 17 Dec 2007 12:31:40 +0000 (12:31 +0000)]
Add support for "ssl on" in both netscape and openldap flavors.
Only the OpenLDAP flavor has been tested.

17 years agoCall cleanup() before exit in log_error() instead of calling
Todd C. Miller [Mon, 17 Dec 2007 12:28:51 +0000 (12:28 +0000)]
Call cleanup() before exit in log_error() instead of calling
sudo_ldap_close() directly.  ldap_conn can now be static to sudo.c

17 years agold -> ldap_conn
Todd C. Miller [Mon, 17 Dec 2007 01:02:44 +0000 (01:02 +0000)]
ld -> ldap_conn

17 years agoBetter ldap cleanup.
Todd C. Miller [Sun, 16 Dec 2007 19:42:44 +0000 (19:42 +0000)]
Better ldap cleanup.

17 years agoDistinguish between LDAP conf settings that are connection-specific
Todd C. Miller [Sun, 16 Dec 2007 19:08:05 +0000 (19:08 +0000)]
Distinguish between LDAP conf settings that are connection-specific
(which take an ld pointer) and those that are default settings (which do not).

17 years agoImproved warnings on error.
Todd C. Miller [Fri, 14 Dec 2007 21:46:31 +0000 (21:46 +0000)]
Improved warnings on error.

17 years agoMake ldap config table driven and set the config *after* we open the
Todd C. Miller [Fri, 14 Dec 2007 20:59:17 +0000 (20:59 +0000)]
Make ldap config table driven and set the config *after* we open the
connection.

17 years agofix LDAP_OPT_X_CONNECT_TIMEOUT compat define
Todd C. Miller [Thu, 13 Dec 2007 21:41:58 +0000 (21:41 +0000)]
fix LDAP_OPT_X_CONNECT_TIMEOUT compat define

17 years agosome operating systems need to link with -lkrb5support when using krb5
Todd C. Miller [Thu, 13 Dec 2007 14:13:44 +0000 (14:13 +0000)]
some operating systems need to link with -lkrb5support when using krb5

17 years agominor update
Todd C. Miller [Mon, 10 Dec 2007 22:12:34 +0000 (22:12 +0000)]
minor update

17 years agoregen
Todd C. Miller [Mon, 10 Dec 2007 15:56:23 +0000 (15:56 +0000)]
regen

17 years agosync
Todd C. Miller [Sat, 8 Dec 2007 00:17:21 +0000 (00:17 +0000)]
sync

17 years agoadd -g support for LDAP
Todd C. Miller [Sat, 8 Dec 2007 00:09:28 +0000 (00:09 +0000)]
add -g support for LDAP

17 years agoThe -i and -s flags can now take an optional command.
Todd C. Miller [Mon, 3 Dec 2007 16:36:49 +0000 (16:36 +0000)]
The -i and -s flags can now take an optional command.

17 years agoAdd passprompt_override flag to sudoers that will cause the prompt
Todd C. Miller [Sun, 2 Dec 2007 17:13:48 +0000 (17:13 +0000)]
Add passprompt_override flag to sudoers that will cause the prompt
to be overridden in all cases.  This flag is also set when the
user specifies the -p flag.

17 years agoMove setting of login class until after sudoers has been parsed.
Todd C. Miller [Sun, 2 Dec 2007 00:51:32 +0000 (00:51 +0000)]
Move setting of login class until after sudoers has been parsed.
Set NewArgv[0] for -i after runas_pw has been set.

17 years agoMove the dgettext check.
Todd C. Miller [Sun, 2 Dec 2007 00:34:54 +0000 (00:34 +0000)]
Move the dgettext check.

17 years agoAdd basic support for looking up the string "Password: " in the PAM
Todd C. Miller [Sat, 1 Dec 2007 16:22:25 +0000 (16:22 +0000)]
Add basic support for looking up the string "Password: " in the PAM
localized text db.  This allows us to determine whether the PAM
prompt is the default "Password: " one even if it has been localized.

TODO: concatenate non-std PAM prompts and user-specified sudo prompts.

17 years agoUse AC_FUNC_GETGROUPS instead of a home-grown attempt that was insufficient.
Todd C. Miller [Tue, 27 Nov 2007 23:40:50 +0000 (23:40 +0000)]
Use AC_FUNC_GETGROUPS instead of a home-grown attempt that was insufficient.

17 years agoFix typos; Martynas Venckus
Todd C. Miller [Tue, 27 Nov 2007 17:13:03 +0000 (17:13 +0000)]
Fix typos; Martynas Venckus

17 years agoDon't assume runas_pw is set; it may not be in the -g case.
Todd C. Miller [Mon, 26 Nov 2007 00:26:42 +0000 (00:26 +0000)]
Don't assume runas_pw is set; it may not be in the -g case.

17 years agoSet aux group vector for PERM_RUNAS and restore group vector for
Todd C. Miller [Sun, 25 Nov 2007 13:07:21 +0000 (13:07 +0000)]
Set aux group vector for PERM_RUNAS and restore group vector for
PERM_ROOT if we previously changed it.  Stash the runas group vector
so we don't have to call initgroups more than once. Also add no-op
check to check_perms.

17 years agoAdd support for runas groups. This allows the user to run a command
Todd C. Miller [Wed, 21 Nov 2007 20:12:00 +0000 (20:12 +0000)]
Add support for runas groups.  This allows the user to run a command
with a different effective group.  If the -g option is specified
without -u the command will be run as the current user (only the
group will change).  the -g and -u options may be used together.
TODO: implement runas group for ldap
      improve runas group documentation
      add testsudoers support

17 years agofix setting of mandir
Todd C. Miller [Wed, 21 Nov 2007 20:02:39 +0000 (20:02 +0000)]
fix setting of mandir

17 years agodocument that ALL implies SETENV
Todd C. Miller [Wed, 21 Nov 2007 19:26:06 +0000 (19:26 +0000)]
document that ALL implies SETENV

17 years agos/setenv_ok/setenv_implied/g
Todd C. Miller [Wed, 21 Nov 2007 18:50:47 +0000 (18:50 +0000)]
s/setenv_ok/setenv_implied/g

17 years agohostname_matches() returns TRUE on match in sudo 1.7.
Todd C. Miller [Wed, 21 Nov 2007 18:44:48 +0000 (18:44 +0000)]
hostname_matches() returns TRUE on match in sudo 1.7.

17 years agouse strcmp, not strcasecmp when comparing ALL
Todd C. Miller [Wed, 21 Nov 2007 18:26:59 +0000 (18:26 +0000)]
use strcmp, not strcasecmp when comparing ALL

17 years agoMake sudo ALL imply setenv. Note that unlike with file-based sudoers
Todd C. Miller [Wed, 21 Nov 2007 16:41:49 +0000 (16:41 +0000)]
Make sudo ALL imply setenv.  Note that unlike with file-based sudoers
this does affect all the commands in the sudoRole.

17 years agosudo "ALL" now implies the SETENV tag but, unlike an explicit tag, it
Todd C. Miller [Wed, 21 Nov 2007 16:05:31 +0000 (16:05 +0000)]
sudo "ALL" now implies the SETENV tag but, unlike an explicit tag, it
is not passed on to other commands in the list.

17 years agoAdd missing sudo_setpwent() and sudo_setgrent() calls. Also
Todd C. Miller [Wed, 21 Nov 2007 16:02:30 +0000 (16:02 +0000)]
Add missing sudo_setpwent() and sudo_setgrent() calls.  Also
use sudo_getpwuid() instead of getpwuid().

17 years agoExpand on the dangers of not using visudo to edit sudoers.
Todd C. Miller [Thu, 15 Nov 2007 16:16:46 +0000 (16:16 +0000)]
Expand on the dangers of not using visudo to edit sudoers.

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.