]> granicus.if.org Git - sudo/log
sudo
19 years agoSilence gcc -Wsign-compare; djm@openbsd.org
Todd C. Miller [Fri, 18 Nov 2005 14:55:24 +0000 (14:55 +0000)]
Silence gcc -Wsign-compare; djm@openbsd.org

19 years agocleanup() now takes an int as an arg so it can be used as a signal
Todd C. Miller [Fri, 18 Nov 2005 01:39:59 +0000 (01:39 +0000)]
cleanup() now takes an int as an arg so it can be used as a signal
handler too.

19 years agoMake a copy of the shell field in the passwd struct for NewArgv to avoid
Todd C. Miller [Fri, 18 Nov 2005 01:38:32 +0000 (01:38 +0000)]
Make a copy of the shell field in the passwd struct for NewArgv to avoid
a use after free situation after sudo_endpwent() is called.

19 years agoAdd mkstemp() for those poor souls without it.
Todd C. Miller [Thu, 17 Nov 2005 01:36:48 +0000 (01:36 +0000)]
Add mkstemp() for those poor souls without it.

19 years agoAdd mkstemp() for those poor souls without it.
Todd C. Miller [Thu, 17 Nov 2005 01:36:47 +0000 (01:36 +0000)]
Add mkstemp() for those poor souls without it.

19 years agoAdd mkstemp() for those poor souls without it.
Todd C. Miller [Thu, 17 Nov 2005 01:36:47 +0000 (01:36 +0000)]
Add mkstemp() for those poor souls without it.

19 years agoAdd PERL5DB to list of environment variables to remove.
Todd C. Miller [Tue, 15 Nov 2005 14:25:03 +0000 (14:25 +0000)]
Add PERL5DB to list of environment variables to remove.

19 years agoInstead of calling the check function twice with a state cookie use
Todd C. Miller [Sun, 13 Nov 2005 20:49:35 +0000 (20:49 +0000)]
Instead of calling the check function twice with a state cookie use
separate check/log functions.

Check more ioctl() calls for failure.

systrace_{read,write} now return the number of bytes read/written
or -1 on error.

19 years agoAdd more environment variables to remove; from gentoo linux
Todd C. Miller [Sun, 13 Nov 2005 19:51:43 +0000 (19:51 +0000)]
Add more environment variables to remove; from gentoo linux
Add some comments about what bad env variables go to what (more to do)

19 years agoMove sudo_end{gr,pw}ent() until just before the exec since they
Todd C. Miller [Fri, 11 Nov 2005 22:23:08 +0000 (22:23 +0000)]
Move sudo_end{gr,pw}ent() until just before the exec since they
free up our cached copy of the passwd structs, including sudo_user
and sudo_runas.  Fixes a use-after-free bug.

19 years agoClose all fd's before executing editor.
Todd C. Miller [Fri, 11 Nov 2005 22:19:53 +0000 (22:19 +0000)]
Close all fd's before executing editor.

19 years agoEnable malloc debugging on OpenBSD when SUDO_DEVEL is set.
Todd C. Miller [Fri, 11 Nov 2005 22:17:59 +0000 (22:17 +0000)]
Enable malloc debugging on OpenBSD when SUDO_DEVEL is set.

19 years agoFix fd leak when lecture file option is enabled. From Jerry Brown
Todd C. Miller [Fri, 11 Nov 2005 16:22:58 +0000 (16:22 +0000)]
Fix fd leak when lecture file option is enabled.  From Jerry Brown

19 years agoAdd PERLLIB, PERL5LIB and PERL5OPT to the default list of environment
Todd C. Miller [Mon, 7 Nov 2005 16:02:22 +0000 (16:02 +0000)]
Add PERLLIB, PERL5LIB and PERL5OPT to the default list of environment
variables to remove.  From Charles Morris

19 years agoadd JAVA_TOOL_OPTIONS to initial_badenv_table for java 5
Todd C. Miller [Tue, 1 Nov 2005 18:24:47 +0000 (18:24 +0000)]
add JAVA_TOOL_OPTIONS to initial_badenv_table for java 5

19 years agoadd PS4 and SHELLOPTS to initial_badenv_table for bash
Todd C. Miller [Fri, 28 Oct 2005 00:35:33 +0000 (00:35 +0000)]
add PS4 and SHELLOPTS to initial_badenv_table for bash

19 years agoFix typo; Toby Peterson
Todd C. Miller [Mon, 15 Aug 2005 00:32:08 +0000 (00:32 +0000)]
Fix typo; Toby Peterson

19 years agoMake return buffers static so they don't get clobbered
Todd C. Miller [Tue, 2 Aug 2005 13:57:55 +0000 (13:57 +0000)]
Make return buffers static so they don't get clobbered

19 years agoFix securid5 authentication, was not checking for ACM_OK. Also add
Todd C. Miller [Thu, 28 Jul 2005 01:14:14 +0000 (01:14 +0000)]
Fix securid5 authentication, was not checking for ACM_OK.  Also add
default cases for the two switch()es.  Problem noted by ccon at worldbank

19 years agoRemove ncat() in favor of just counting bytes and pre-allocating what is
Todd C. Miller [Mon, 27 Jun 2005 00:10:06 +0000 (00:10 +0000)]
Remove ncat() in favor of just counting bytes and pre-allocating what is
needed.

19 years agoFix up some comments
Todd C. Miller [Sun, 26 Jun 2005 23:44:30 +0000 (23:44 +0000)]
Fix up some comments
Add missing fclose() for the rootbinddn case

19 years agoalign struct ldap_config
Todd C. Miller [Sun, 26 Jun 2005 23:38:44 +0000 (23:38 +0000)]
align struct ldap_config

19 years agouse LINE_MAX for max conf file line size
Todd C. Miller [Sun, 26 Jun 2005 23:37:54 +0000 (23:37 +0000)]
use LINE_MAX for max conf file line size

19 years agoadd _PATH_LDAP_SECRET
Todd C. Miller [Sun, 26 Jun 2005 22:36:51 +0000 (22:36 +0000)]
add _PATH_LDAP_SECRET

19 years agoMention rootbinddn
Todd C. Miller [Sun, 26 Jun 2005 22:36:09 +0000 (22:36 +0000)]
Mention rootbinddn
Give example ou=SUDOers container

19 years agoSupport rootbinddn in ldap.conf
Todd C. Miller [Sat, 25 Jun 2005 22:03:10 +0000 (22:03 +0000)]
Support rootbinddn in ldap.conf

19 years agoPreserve DISPLAY environment variable by default.
Todd C. Miller [Sat, 25 Jun 2005 21:46:16 +0000 (21:46 +0000)]
Preserve DISPLAY environment variable by default.

19 years agoset need_lib_prefix=no for all cases; this is safe for LD_PRELOAD
Todd C. Miller [Sat, 25 Jun 2005 20:39:56 +0000 (20:39 +0000)]
set need_lib_prefix=no for all cases; this is safe for LD_PRELOAD

19 years agoset need_version=no for all cases; this is safe for LD_PRELOAD
Todd C. Miller [Sat, 25 Jun 2005 20:15:55 +0000 (20:15 +0000)]
set need_version=no for all cases; this is safe for LD_PRELOAD

19 years agotypo
Todd C. Miller [Sat, 25 Jun 2005 18:45:09 +0000 (18:45 +0000)]
typo

19 years agoAdd dragonfly
Todd C. Miller [Sat, 25 Jun 2005 18:33:01 +0000 (18:33 +0000)]
Add dragonfly

19 years agoFix call to pam_end() when pam_open_session() fails.
Todd C. Miller [Sat, 25 Jun 2005 18:29:17 +0000 (18:29 +0000)]
Fix call to pam_end() when pam_open_session() fails.

19 years agoregen
Todd C. Miller [Sat, 25 Jun 2005 18:21:09 +0000 (18:21 +0000)]
regen

19 years agorebuild acsite.m4 from libtool 1.9f libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
Todd C. Miller [Sat, 25 Jun 2005 18:20:43 +0000 (18:20 +0000)]
rebuild acsite.m4 from libtool 1.9f  libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4

19 years agomerge in local changes:
Todd C. Miller [Sat, 25 Jun 2005 18:08:10 +0000 (18:08 +0000)]
merge in local changes:
config.guess:
 o better openbsd support
config.sub:
 o hiuxmpp support
ltmain.sh
 o remove requirement that libs must begin with "lib"
 o don't print a bunch of crap about library installs
 o don't run ldconfig

19 years agolibtool 1.9f
Todd C. Miller [Sat, 25 Jun 2005 18:05:44 +0000 (18:05 +0000)]
libtool 1.9f

19 years agoUpdate with autoupdate and make minor changes for libtool 1.9f
Todd C. Miller [Sat, 25 Jun 2005 18:04:30 +0000 (18:04 +0000)]
Update with autoupdate and make minor changes for libtool 1.9f

19 years agodon't call sudo_ldap_display_cmnd if ldap not setup
Todd C. Miller [Thu, 23 Jun 2005 03:19:00 +0000 (03:19 +0000)]
don't call sudo_ldap_display_cmnd if ldap not setup

19 years agoMove declatation of struct timespec to its own include files for
Todd C. Miller [Thu, 23 Jun 2005 03:04:35 +0000 (03:04 +0000)]
Move declatation of struct timespec to its own include files for
systems without it since it needs time_t defined.

19 years agoMove declatation of struct timespec to its own include files for
Todd C. Miller [Thu, 23 Jun 2005 03:04:35 +0000 (03:04 +0000)]
Move declatation of struct timespec to its own include files for
systems without it since it needs time_t defined.

19 years agoMove declatation of struct timespec to its own include files for
Todd C. Miller [Thu, 23 Jun 2005 03:04:35 +0000 (03:04 +0000)]
Move declatation of struct timespec to its own include files for
systems without it since it needs time_t defined.

19 years agoMove declatation of struct timespec to its own include files for
Todd C. Miller [Thu, 23 Jun 2005 03:04:35 +0000 (03:04 +0000)]
Move declatation of struct timespec to its own include files for
systems without it since it needs time_t defined.

19 years agoMove declatation of struct timespec to its own include files for
Todd C. Miller [Thu, 23 Jun 2005 03:04:35 +0000 (03:04 +0000)]
Move declatation of struct timespec to its own include files for
systems without it since it needs time_t defined.

19 years agoDon't set safe_cmnd for the "sudo ALL" case.
Todd C. Miller [Thu, 23 Jun 2005 02:57:18 +0000 (02:57 +0000)]
Don't set safe_cmnd for the "sudo ALL" case.

19 years agoCall pam_open_session() and pam_close_session() to give pam_limits a
Todd C. Miller [Fri, 27 May 2005 05:59:02 +0000 (05:59 +0000)]
Call pam_open_session() and pam_close_session() to give pam_limits a
chance to run.  Idea from Karel Zak.

19 years agoAdd explicit cast from mode_t -> u_int in printf to silence warnings on Solaris
Todd C. Miller [Sun, 24 Apr 2005 23:24:58 +0000 (23:24 +0000)]
Add explicit cast from mode_t -> u_int in printf to silence warnings on Solaris

19 years agoinclude grp.h to silence a warning on Solaris
Todd C. Miller [Sun, 24 Apr 2005 23:22:19 +0000 (23:22 +0000)]
include grp.h to silence a warning on Solaris

19 years agoFix printing of += and -= defaults.
Todd C. Miller [Sat, 23 Apr 2005 19:10:16 +0000 (19:10 +0000)]
Fix printing of += and -= defaults.

19 years agoSanity check number of syscall args with argsize. Not really needed
Todd C. Miller [Sun, 17 Apr 2005 05:21:24 +0000 (05:21 +0000)]
Sanity check number of syscall args with argsize.  Not really needed
but a little paranoia never hurts.

19 years agoDon't do pointer arithmetic on void *
Todd C. Miller [Sun, 17 Apr 2005 05:18:24 +0000 (05:18 +0000)]
Don't do pointer arithmetic on void *
Use int, not size_t/ssize_t for systrace lengths (since it uses int)

19 years agoAdd some memsets for paranoia
Todd C. Miller [Sat, 16 Apr 2005 07:14:34 +0000 (07:14 +0000)]
Add some memsets for paranoia
Fix namespace collsion w/ error
Check rval of decode_args() and update_env()
Remove improper setting of validated variable

19 years agoIn -l mode, only check local sudoers file if def_ignore_sudoers is not set
Todd C. Miller [Tue, 12 Apr 2005 01:37:08 +0000 (01:37 +0000)]
In -l mode, only check local sudoers file if def_ignore_sudoers is not set
and call LDAP versions from display_privs() and display_cmnd() instead
of directly from main().  Because of this we need to defer closing
the ldap connection until after -l processing has ocurred and we
must pass in the ldap pointer to display_privs() and display_cmnd().

19 years agoReorganize LDAP code to better match normal sudoers parsing. Instead
Todd C. Miller [Tue, 12 Apr 2005 01:33:23 +0000 (01:33 +0000)]
Reorganize LDAP code to better match normal sudoers parsing.  Instead
of storing strings for later printing in -l mode we do another query
since the authenticating user and the user being listed may not be
the same (the new -U flag).  Also add support for "sudo -l command".

There is still a fair bit if duplicated code that can probably
be refactored.

19 years agoReplace pass variable with do_netgr for better readability.
Todd C. Miller [Mon, 11 Apr 2005 04:37:49 +0000 (04:37 +0000)]
Replace pass variable with do_netgr for better readability.

19 years agouse DPRINTF macro
Todd C. Miller [Mon, 11 Apr 2005 03:49:46 +0000 (03:49 +0000)]
use DPRINTF macro

19 years agoestrdup, not strdup
Todd C. Miller [Mon, 11 Apr 2005 03:18:38 +0000 (03:18 +0000)]
estrdup, not strdup

19 years agoAdd macro to test if the tag changed to improve readability.
Todd C. Miller [Sun, 10 Apr 2005 21:44:27 +0000 (21:44 +0000)]
Add macro to test if the tag changed to improve readability.

19 years agoAvoid printing defaults header if there are no defaults to print...
Todd C. Miller [Sun, 10 Apr 2005 21:40:41 +0000 (21:40 +0000)]
Avoid printing defaults header if there are no defaults to print...

19 years agoFix a warning on systems without strlcpy().
Todd C. Miller [Sun, 10 Apr 2005 19:29:45 +0000 (19:29 +0000)]
Fix a warning on systems without strlcpy().

19 years agoUse macros where possible for sudo_grdup() like sudo_pwdup().
Todd C. Miller [Sun, 10 Apr 2005 17:32:42 +0000 (17:32 +0000)]
Use macros where possible for sudo_grdup() like sudo_pwdup().

19 years agoIt is possible for tv_usec to hold >= 1000000 usecs so add in tv_usec / 1000000.
Todd C. Miller [Fri, 8 Apr 2005 21:04:22 +0000 (21:04 +0000)]
It is possible for tv_usec to hold >= 1000000 usecs so add in tv_usec / 1000000.

19 years agoThe component in krb5_principal_get_comp_string() should be 1, not 0
Todd C. Miller [Wed, 30 Mar 2005 04:38:25 +0000 (04:38 +0000)]
The component in krb5_principal_get_comp_string() should be 1, not 0
for Heimdal.  From Alex Plotnick.

19 years agoAdd efree() for consistency with emalloc() et al. Allows us to rely
Todd C. Miller [Tue, 29 Mar 2005 14:29:47 +0000 (14:29 +0000)]
Add efree() for consistency with emalloc() et al.  Allows us to rely
on C89 behavior (free(NULL) is valid) even on K&R.

19 years agoMove initgroups() for -U option into display_privs() so group matching
Todd C. Miller [Tue, 29 Mar 2005 03:33:05 +0000 (03:33 +0000)]
Move initgroups() for -U option into display_privs() so group matching
in sudoers works correctly.

19 years agoRemoved duplicate call to ldap_unbind_s introduced along with sudo_ldap_close.
Todd C. Miller [Sun, 27 Mar 2005 02:34:25 +0000 (02:34 +0000)]
Removed duplicate call to ldap_unbind_s introduced along with sudo_ldap_close.

19 years agoAdd missing space in Defaults printing
Todd C. Miller [Sun, 27 Mar 2005 01:01:02 +0000 (01:01 +0000)]
Add missing space in Defaults printing

19 years agoSync sudo_pwdup with OpenBSD changes: use macros for size computaton and
Todd C. Miller [Fri, 25 Mar 2005 17:36:52 +0000 (17:36 +0000)]
Sync sudo_pwdup with OpenBSD changes: use macros for size computaton and
string copies.

19 years agoZero old pw_passwd before replacing with version from shadow file.
Todd C. Miller [Sat, 19 Mar 2005 03:08:40 +0000 (03:08 +0000)]
Zero old pw_passwd before replacing with version from shadow file.

19 years agoOnly attempt shadow password detection if PAM is not being used
Todd C. Miller [Sat, 19 Mar 2005 03:07:27 +0000 (03:07 +0000)]
Only attempt shadow password detection if PAM is not being used
Add shadow_* variables to make shadow password detection more generic.

19 years agoUse OSDEFS for os-specific -D_FOO_BAR stuff rather than CPPFLAGS
Todd C. Miller [Sat, 19 Mar 2005 02:46:16 +0000 (02:46 +0000)]
Use OSDEFS for os-specific -D_FOO_BAR stuff rather than CPPFLAGS

19 years agouse a non-breaking space to avoid a double space after e.g.
Todd C. Miller [Sun, 13 Mar 2005 00:27:05 +0000 (00:27 +0000)]
use a non-breaking space to avoid a double space after e.g.

19 years agocommna, not colon after e.g.
Todd C. Miller [Sun, 13 Mar 2005 00:26:33 +0000 (00:26 +0000)]
commna, not colon after e.g.

19 years agoAdd __ variants of the exec functions. GNU libc at least uses __execve()
Todd C. Miller [Sat, 12 Mar 2005 23:43:40 +0000 (23:43 +0000)]
Add __ variants of the exec functions.  GNU libc at least uses __execve()
internally.

19 years agoMatch reality a bit more.
Todd C. Miller [Sat, 12 Mar 2005 17:29:00 +0000 (17:29 +0000)]
Match reality a bit more.

19 years agoMissed piece from rev. 1.6, fix sudo_getpwnam() too.
Todd C. Miller [Sat, 12 Mar 2005 17:27:27 +0000 (17:27 +0000)]
Missed piece from rev. 1.6, fix sudo_getpwnam() too.

19 years agoStore shadow password after making a local copy of struct passwd in
Todd C. Miller [Sat, 12 Mar 2005 04:42:30 +0000 (04:42 +0000)]
Store shadow password after making a local copy of struct passwd in
case normal and shadow routines use the same internal buffer in libc.

19 years agoMake varargs usage consistent with the rest of the code.
Todd C. Miller [Fri, 11 Mar 2005 01:57:44 +0000 (01:57 +0000)]
Make varargs usage consistent with the rest of the code.

19 years agoWrap more of the exec family since on Linux the others do not appear
Todd C. Miller [Thu, 10 Mar 2005 15:09:28 +0000 (15:09 +0000)]
Wrap more of the exec family since on Linux the others do not appear
to go through the normal execve() path.

19 years agomake print_unused static like proto says
Todd C. Miller [Thu, 10 Mar 2005 14:57:17 +0000 (14:57 +0000)]
make print_unused static like proto says

19 years agosilence a warning on K&R systems
Todd C. Miller [Thu, 10 Mar 2005 14:55:12 +0000 (14:55 +0000)]
silence a warning on K&R systems

19 years agomake this build in K&R land
Todd C. Miller [Thu, 10 Mar 2005 14:53:04 +0000 (14:53 +0000)]
make this build in K&R land

19 years agomake this build in K&R land
Todd C. Miller [Thu, 10 Mar 2005 14:51:48 +0000 (14:51 +0000)]
make this build in K&R land

19 years agoregen
Todd C. Miller [Tue, 8 Mar 2005 03:21:28 +0000 (03:21 +0000)]
regen

19 years agoreturn(foo) not return foo
Todd C. Miller [Sun, 6 Mar 2005 03:46:52 +0000 (03:46 +0000)]
return(foo) not return foo
optimize _atobool() slightly

19 years agoUse TRUE/FALSE
Todd C. Miller [Sun, 6 Mar 2005 03:40:18 +0000 (03:40 +0000)]
Use TRUE/FALSE

19 years agoReformat to match the rest of sudo's code.
Todd C. Miller [Sun, 6 Mar 2005 03:31:58 +0000 (03:31 +0000)]
Reformat to match the rest of sudo's code.

19 years agoI am the primary author
Todd C. Miller [Sun, 6 Mar 2005 00:33:18 +0000 (00:33 +0000)]
I am the primary author

19 years agoThe RUNSON file is toast--it confused too many people and really isn't
Todd C. Miller [Wed, 23 Feb 2005 03:29:40 +0000 (03:29 +0000)]
The RUNSON file is toast--it confused too many people and really isn't
needed in a configure-oriented world.

19 years agoalternate -> alternative
Todd C. Miller [Wed, 23 Feb 2005 03:28:13 +0000 (03:28 +0000)]
alternate -> alternative

19 years agoUse TCSADRAIN instead of TCSAFLUSH since some OSes have issues with TCSAFLUSH.
Todd C. Miller [Wed, 23 Feb 2005 03:26:50 +0000 (03:26 +0000)]
Use TCSADRAIN instead of TCSAFLUSH since some OSes have issues with TCSAFLUSH.

19 years agoAllow leading blanks before Defaults and Foo_Alias definitions
Todd C. Miller [Wed, 23 Feb 2005 03:16:06 +0000 (03:16 +0000)]
Allow leading blanks before Defaults and Foo_Alias definitions

19 years agofix rules to build toke.o and gram.o in devel mode
Todd C. Miller [Wed, 23 Feb 2005 03:14:03 +0000 (03:14 +0000)]
fix rules to build toke.o and gram.o in devel mode

19 years agoenv_keep overrides set_logname
Todd C. Miller [Sun, 20 Feb 2005 18:00:24 +0000 (18:00 +0000)]
env_keep overrides set_logname

19 years agoFix disabling set_logname and make env_keep override set_logname.
Todd C. Miller [Sun, 20 Feb 2005 17:57:48 +0000 (17:57 +0000)]
Fix disabling set_logname and make env_keep override set_logname.

19 years agoNo longer need memmove()
Todd C. Miller [Sun, 20 Feb 2005 17:28:25 +0000 (17:28 +0000)]
No longer need memmove()

19 years agoJust clean the environment once. This assumes that any further
Todd C. Miller [Sun, 20 Feb 2005 16:48:05 +0000 (16:48 +0000)]
Just clean the environment once.  This assumes that any further
setenv/putenv will be able to handle the fact that we replaced environ
with our own malloc'd copy but all the implementations I've checked do.

19 years agoIn -i mode, base the value of insert_env()'s dupcheck flag on DID_FOO flags.
Todd C. Miller [Wed, 16 Feb 2005 04:16:22 +0000 (04:16 +0000)]
In -i mode, base the value of insert_env()'s dupcheck flag on DID_FOO flags.
Move checks for $HOME resetting into rebuild_env()

19 years agoMove setting of user_path, user_shell, user_prompt and prev_user
Todd C. Miller [Sun, 13 Feb 2005 05:33:59 +0000 (05:33 +0000)]
Move setting of user_path, user_shell, user_prompt and prev_user
into init_vars() since user_shell at least is needed there.

19 years agofix devel builds
Todd C. Miller [Sat, 12 Feb 2005 23:51:43 +0000 (23:51 +0000)]
fix devel builds

19 years agoFix some printf format mismatches on error.
Todd C. Miller [Sat, 12 Feb 2005 23:48:46 +0000 (23:48 +0000)]
Fix some printf format mismatches on error.