]> granicus.if.org Git - sudo/log
sudo
20 years agoHelp for PAM when account section is missing
Todd C. Miller [Sat, 5 Feb 2005 18:18:20 +0000 (18:18 +0000)]
Help for PAM when account section is missing

20 years agoGive user a clue when there is a missing "account" section in the PAM config.
Todd C. Miller [Sat, 5 Feb 2005 18:01:55 +0000 (18:01 +0000)]
Give user a clue when there is a missing "account" section in the PAM config.

20 years agoBetter error handling.
Todd C. Miller [Sat, 5 Feb 2005 15:22:46 +0000 (15:22 +0000)]
Better error handling.

20 years agoMove _FOO_SOURCE to CPPFLAGS so it takes effect as early as possible.
Todd C. Miller [Sat, 5 Feb 2005 14:57:44 +0000 (14:57 +0000)]
Move _FOO_SOURCE to CPPFLAGS so it takes effect as early as possible.
Silences a warning about isblank() on linux.

20 years agoFix typo (missing comma) that caused an incorrect number of args
Todd C. Miller [Sat, 5 Feb 2005 02:49:53 +0000 (02:49 +0000)]
Fix typo (missing comma) that caused an incorrect number of args
to be passed to log_error().

20 years agoDon't try to destroy a tree we didn't create.
Todd C. Miller [Tue, 1 Feb 2005 04:03:29 +0000 (04:03 +0000)]
Don't try to destroy a tree we didn't create.

20 years agoAdd __unused to rcsids
Todd C. Miller [Thu, 27 Jan 2005 15:42:30 +0000 (15:42 +0000)]
Add __unused to rcsids

20 years agoFix error message when mixing invalid auth types
Todd C. Miller [Fri, 21 Jan 2005 15:34:07 +0000 (15:34 +0000)]
Fix error message when mixing invalid auth types

20 years agoPAM, AIX auth, BSD auth and login_cap are now on by default if the OS
Todd C. Miller [Fri, 21 Jan 2005 15:32:20 +0000 (15:32 +0000)]
PAM, AIX auth, BSD auth and login_cap are now on by default if the OS
supports them.

20 years agos/HAVE_AUTHENTICATE/HAVE_AIXAUTH/g
Todd C. Miller [Fri, 21 Jan 2005 15:29:55 +0000 (15:29 +0000)]
s/HAVE_AUTHENTICATE/HAVE_AIXAUTH/g

20 years agoBetter checking for conflicting authentication methods
Todd C. Miller [Fri, 21 Jan 2005 15:29:05 +0000 (15:29 +0000)]
Better checking for conflicting authentication methods
Display the authentication methods used at the end of configure
Rename --with-authenticate -> --with-aixauth
Use --with-aixauth, --with-bsdauth, --with-pam, --with-logincap by
default on systems that support them unless disabled.
Add OSMAJOR variable that replaces old OSREV; now OSREV has full version number

20 years agos/-O/-C/
Todd C. Miller [Tue, 18 Jan 2005 00:41:31 +0000 (00:41 +0000)]
s/-O/-C/

20 years agoReplace:
Todd C. Miller [Fri, 14 Jan 2005 18:35:06 +0000 (18:35 +0000)]
Replace:
    test -n "$FOO" || FOO="bar"

With:
    : ${FOO='bar'}

20 years agoUse function pointers to only call private passwd/group routines when
Todd C. Miller [Sun, 9 Jan 2005 23:58:21 +0000 (23:58 +0000)]
Use function pointers to only call private passwd/group routines when
using a nonstandard passwd/group file.

20 years agosync
Todd C. Miller [Thu, 6 Jan 2005 15:34:20 +0000 (15:34 +0000)]
sync

20 years agoCan't use strtok() since it doesn't handle empty fields so add
Todd C. Miller [Thu, 6 Jan 2005 03:16:11 +0000 (03:16 +0000)]
Can't use strtok() since it doesn't handle empty fields so add
getpwent()/getgrent() functions and call those.

20 years agoFix dummied out toke.c and gram.c dependencies.
Todd C. Miller [Wed, 5 Jan 2005 22:29:06 +0000 (22:29 +0000)]
Fix dummied out toke.c and gram.c dependencies.

20 years agoRename PARSESRCS -> GENERATED since it is only used in the clean target
Todd C. Miller [Wed, 5 Jan 2005 22:18:42 +0000 (22:18 +0000)]
Rename PARSESRCS -> GENERATED since it is only used in the clean target
Add devdir variable and use it to specify the path to parser sources

20 years agoregen
Todd C. Miller [Wed, 5 Jan 2005 22:17:52 +0000 (22:17 +0000)]
regen

20 years agoAdd a devdir variables that defaults to $(srcdir) and is set to . if
Todd C. Miller [Wed, 5 Jan 2005 22:17:33 +0000 (22:17 +0000)]
Add a devdir variables that defaults to $(srcdir) and is set to . if
--devel was specified.  Allows for proper dependecies building the parser.

20 years agoAdd support for custom passwd/group files.
Todd C. Miller [Wed, 5 Jan 2005 19:50:49 +0000 (19:50 +0000)]
Add support for custom passwd/group files.

20 years agoBuild private copy of pwutil.o for testsudoers with MYPW defined so
Todd C. Miller [Wed, 5 Jan 2005 19:47:20 +0000 (19:47 +0000)]
Build private copy of pwutil.o for testsudoers with MYPW defined so
it uses our own passwd/group routines.

20 years agoRemove sudo_*{pw,gr}* stubs and add sudo_setspent/sudo_endspent stubs instead.
Todd C. Miller [Wed, 5 Jan 2005 19:46:39 +0000 (19:46 +0000)]
Remove sudo_*{pw,gr}* stubs and add sudo_setspent/sudo_endspent stubs instead.
We can now just use the caching sudo_*{pw,gr}* functions in pwutil.c
Add comment about wanting to call sudo_endpwent/sudo_endgrent in cleanup()

20 years agoRemove caching; we will just use what is in pwutil.c
Todd C. Miller [Wed, 5 Jan 2005 19:44:58 +0000 (19:44 +0000)]
Remove caching; we will just use what is in pwutil.c
Use global buffers for passwd/group structs
Rename functions from sudo_* to my_*

20 years agog/c pwcache_init/pwcache_destroy
Todd C. Miller [Wed, 5 Jan 2005 19:43:36 +0000 (19:43 +0000)]
g/c pwcache_init/pwcache_destroy

20 years agoUndo last commit and add sudo_setspent and sudo_endspent instead.
Todd C. Miller [Wed, 5 Jan 2005 19:42:06 +0000 (19:42 +0000)]
Undo last commit and add sudo_setspent and sudo_endspent instead.

20 years agoMove all but the shadow stuff from getspwuid.c to pwutil.c and pwcache_get
Todd C. Miller [Wed, 5 Jan 2005 19:41:31 +0000 (19:41 +0000)]
Move all but the shadow stuff from getspwuid.c to pwutil.c and pwcache_get
and pwcache_put as they are no longer needed.  Also add preprocessor
magic to use private versions of the passwd and group routines if MYPW
is defined (for use by testsudoers).

20 years agozero out struct passwd/group before filling it in so if there are
Todd C. Miller [Wed, 5 Jan 2005 03:40:01 +0000 (03:40 +0000)]
zero out struct passwd/group before filling it in so if there are
fields we don't handle they end up as 0.

20 years agoAdapt to pwutil.c
Todd C. Miller [Wed, 5 Jan 2005 01:10:16 +0000 (01:10 +0000)]
Adapt to pwutil.c

20 years agoAdd tsgetgrpw.c and pwutil.c
Todd C. Miller [Wed, 5 Jan 2005 01:09:03 +0000 (01:09 +0000)]
Add tsgetgrpw.c and pwutil.c
Rename the *OBJ variables for better readability.

20 years agoPasswd and group lookup routines for testsudoers that support alternate
Todd C. Miller [Wed, 5 Jan 2005 01:08:30 +0000 (01:08 +0000)]
Passwd and group lookup routines for testsudoers that support alternate
passwd and group files.

20 years agoSplit off pw/gr cache and dup code into its own file.
Todd C. Miller [Wed, 5 Jan 2005 01:07:33 +0000 (01:07 +0000)]
Split off pw/gr cache and dup code into its own file.
This allows visudo and testsudoers to use the pw/gr cache too.

20 years agoPrint Defaults info in "sudo -l" output and wrap lines based on the
Todd C. Miller [Sun, 2 Jan 2005 00:31:08 +0000 (00:31 +0000)]
Print Defaults info in "sudo -l" output and wrap lines based on the
terminal width.

20 years agoOnly check group vector in usergr_matches() if we are matching the
Todd C. Miller [Sat, 1 Jan 2005 17:41:21 +0000 (17:41 +0000)]
Only check group vector in usergr_matches() if we are matching the
invoking or list user.  Always check the group members, even if
there was a group vector.

20 years agoNo longer bundle fnmatch.3
Todd C. Miller [Fri, 17 Dec 2004 22:24:16 +0000 (22:24 +0000)]
No longer bundle fnmatch.3

20 years agocheckpoint
Todd C. Miller [Fri, 17 Dec 2004 18:12:20 +0000 (18:12 +0000)]
checkpoint

20 years agosort usage
Todd C. Miller [Thu, 16 Dec 2004 19:20:25 +0000 (19:20 +0000)]
sort usage

20 years agoSort command line options
Todd C. Miller [Thu, 16 Dec 2004 19:20:12 +0000 (19:20 +0000)]
Sort command line options

20 years agoAdd closefrom sudoers option to start closing at a point other than 3.
Todd C. Miller [Thu, 16 Dec 2004 18:33:49 +0000 (18:33 +0000)]
Add closefrom sudoers option to start closing at a point other than 3.
Add closefrom_override sudoers option and -C sudo flag to allow the
user to specify a different closefrom starting point.

20 years agoAdd _PATH_DEVNULL for those without it.
Todd C. Miller [Thu, 16 Dec 2004 18:25:54 +0000 (18:25 +0000)]
Add _PATH_DEVNULL for those without it.

20 years agono more UCB strcasecmp
Todd C. Miller [Thu, 16 Dec 2004 03:55:46 +0000 (03:55 +0000)]
no more UCB strcasecmp

20 years agoreplace BSD licensed one with version derived from pdksh
Todd C. Miller [Thu, 16 Dec 2004 03:54:48 +0000 (03:54 +0000)]
replace BSD licensed one with version derived from pdksh

20 years agoFix last commit.
Todd C. Miller [Fri, 10 Dec 2004 02:07:27 +0000 (02:07 +0000)]
Fix last commit.

20 years agoMake sure stdin, stdout and stderr are open and dup them to /dev/null
Todd C. Miller [Fri, 10 Dec 2004 00:26:22 +0000 (00:26 +0000)]
Make sure stdin, stdout and stderr are open and dup them to /dev/null
if not.

20 years agoadd sudo_ldap_close
Todd C. Miller [Fri, 3 Dec 2004 18:57:48 +0000 (18:57 +0000)]
add sudo_ldap_close

20 years agoUse TIME_WITH_SYS_TIME
Todd C. Miller [Fri, 3 Dec 2004 18:52:28 +0000 (18:52 +0000)]
Use TIME_WITH_SYS_TIME

20 years agoAdd TIME_WITH_SYS_TIME_H
Todd C. Miller [Fri, 3 Dec 2004 18:48:07 +0000 (18:48 +0000)]
Add TIME_WITH_SYS_TIME_H

20 years agoAdd missing braces to avoid DYLD_FORCE_FLAT_NAMESPACE being set
Todd C. Miller [Thu, 2 Dec 2004 16:18:29 +0000 (16:18 +0000)]
Add missing braces to avoid DYLD_FORCE_FLAT_NAMESPACE being set
unconditionally on darwin.  From Toby Peterson.

20 years agoCheck rbinsert() return value. In the case of faked up entries there
Todd C. Miller [Thu, 2 Dec 2004 15:40:00 +0000 (15:40 +0000)]
Check rbinsert() return value.  In the case of faked up entries there
is usually a negative response cached that we need to overwrite.

In pwfree() don't try to zero out a NULL pw_passwd pointer.

20 years agoUse the double fork trick to avoid the monitor process being waited
Todd C. Miller [Thu, 2 Dec 2004 14:53:20 +0000 (14:53 +0000)]
Use the double fork trick to avoid the monitor process being waited
for by the main program run through sudo.

20 years agoCall initgroups() in -U mode so group matches work normally.
Todd C. Miller [Mon, 29 Nov 2004 17:52:02 +0000 (17:52 +0000)]
Call initgroups() in -U mode so group matches work normally.

20 years agoDon't print a trailing comma for the last entry in enum def_tupple
Todd C. Miller [Mon, 29 Nov 2004 17:34:09 +0000 (17:34 +0000)]
Don't print a trailing comma for the last entry in enum def_tupple

20 years agoMention values when lecture, listpw and verifypw are used in boolean context.
Todd C. Miller [Sun, 28 Nov 2004 21:08:09 +0000 (21:08 +0000)]
Mention values when lecture, listpw and verifypw are used in boolean context.

20 years agoverifypw when used in a boolean TRUE context should be "all", not "any".
Todd C. Miller [Sun, 28 Nov 2004 21:05:38 +0000 (21:05 +0000)]
verifypw when used in a boolean TRUE context should be "all", not "any".

20 years agoAllow tuples that can be used as booleans to be used as boolean TRUE.
Todd C. Miller [Fri, 26 Nov 2004 19:21:08 +0000 (19:21 +0000)]
Allow tuples that can be used as booleans to be used as boolean TRUE.
In this case the 2nd possible value of the tuple is used for TRUE.

20 years agoCorrect the test for 2-parameter timespecsub
Todd C. Miller [Thu, 25 Nov 2004 17:23:27 +0000 (17:23 +0000)]
Correct the test for 2-parameter timespecsub

20 years agoAdd strub struct definitions for passwd, timeval and timespec
Todd C. Miller [Thu, 25 Nov 2004 17:20:57 +0000 (17:20 +0000)]
Add strub struct definitions for passwd, timeval and timespec

20 years agoAdd check for 2-argument form of timespecsub (FreeBSD and BSD/OS) and
Todd C. Miller [Thu, 25 Nov 2004 17:09:31 +0000 (17:09 +0000)]
Add check for 2-argument form of timespecsub (FreeBSD and BSD/OS) and
fix a typo in the gettimeofday check.

20 years agoDeal with user_stat being NULL as it is for visudo and testsudoers.
Todd C. Miller [Wed, 24 Nov 2004 21:44:54 +0000 (21:44 +0000)]
Deal with user_stat being NULL as it is for visudo and testsudoers.

20 years agoAdd -U option to use in conjunction with -l instead of -u.
Todd C. Miller [Wed, 24 Nov 2004 21:31:51 +0000 (21:31 +0000)]
Add -U option to use in conjunction with -l instead of -u.
Add support for "sudo -l command" to test a specific command.

20 years agoSet safe_cmnd after sudoers_lookup() if it has not been set.
Todd C. Miller [Wed, 24 Nov 2004 21:28:55 +0000 (21:28 +0000)]
Set safe_cmnd after sudoers_lookup() if it has not been set.
Previously it was set by sudo "ALL" in the parser but at that point
the fully-qualified pathname has not yet been found.

20 years agoCorrectly handle multiple privileges per userspec and runas inheritence.
Todd C. Miller [Tue, 23 Nov 2004 23:18:15 +0000 (23:18 +0000)]
Correctly handle multiple privileges per userspec and runas inheritence.

20 years agoZero out sd_un for each entry in sudo_defs_table in init_defaults.
Todd C. Miller [Sun, 21 Nov 2004 19:09:47 +0000 (19:09 +0000)]
Zero out sd_un for each entry in sudo_defs_table in init_defaults.

20 years agomake per-command defaults work with sudoedit
Todd C. Miller [Fri, 19 Nov 2004 23:04:14 +0000 (23:04 +0000)]
make per-command defaults work with sudoedit

20 years agoRemove the FLAG_NOPASS, FLAG_NOEXEC and FLAG_MONITOR flags. Instead,
Todd C. Miller [Fri, 19 Nov 2004 23:00:28 +0000 (23:00 +0000)]
Remove the FLAG_NOPASS, FLAG_NOEXEC and FLAG_MONITOR flags.  Instead,
we just set the approriate defaults variable.

20 years agoDocument per-command Defaults.
Todd C. Miller [Fri, 19 Nov 2004 22:09:10 +0000 (22:09 +0000)]
Document per-command Defaults.

20 years agoAdd support for command-specific Defaults entries. E.g.
Todd C. Miller [Fri, 19 Nov 2004 21:35:12 +0000 (21:35 +0000)]
Add support for command-specific Defaults entries.  E.g.
    Defaults!/usr/bin/vi noexec

20 years agoChange an occurence of user_matches() -> runas_matches() missed previously
Todd C. Miller [Fri, 19 Nov 2004 20:03:33 +0000 (20:03 +0000)]
Change an occurence of user_matches() -> runas_matches() missed previously
runas_matches(), host_matches() and cmnd_matches() only really need to pass in
a list of members.  user_matches() still needs to pass in a passwd struct
because of "sudo -l"

20 years agoCheck def_authenticate, def_noexec and def_monitor when setting return flags.
Todd C. Miller [Fri, 19 Nov 2004 19:46:55 +0000 (19:46 +0000)]
Check def_authenticate, def_noexec and def_monitor when setting return flags.
XXX May be better to just set the defaults directly and get rid of those flags.

20 years agoUse: #include <config.h>
Todd C. Miller [Fri, 19 Nov 2004 18:39:14 +0000 (18:39 +0000)]
Use: #include <config.h>
Not: #include "config.h"
That way we get the correct config.h when build dir != src dir

20 years agoBack out part of rev 1.263; fix -I order
Todd C. Miller [Fri, 19 Nov 2004 18:30:43 +0000 (18:30 +0000)]
Back out part of rev 1.263; fix -I order

20 years agoMore robust parsing if #include; could be much better still.
Todd C. Miller [Fri, 19 Nov 2004 18:12:59 +0000 (18:12 +0000)]
More robust parsing if #include; could be much better still.

20 years agoMake arg splitting in visudo and sudoedit consistent.
Todd C. Miller [Fri, 19 Nov 2004 17:55:14 +0000 (17:55 +0000)]
Make arg splitting in visudo and sudoedit consistent.

20 years agoSplit alias routines out into their own file.
Todd C. Miller [Fri, 19 Nov 2004 17:35:21 +0000 (17:35 +0000)]
Split alias routines out into their own file.

20 years ago__attribute__ is already defined in compat.h
Todd C. Miller [Fri, 19 Nov 2004 17:32:25 +0000 (17:32 +0000)]
__attribute__ is already defined in compat.h

20 years agoquit() should not be __noreturn__ as it is non-void on some platforms.
Todd C. Miller [Fri, 19 Nov 2004 17:30:22 +0000 (17:30 +0000)]
quit() should not be __noreturn__ as it is non-void on some platforms.

20 years agoAdd local error/warning functions like err/warn but that call an additional
Todd C. Miller [Fri, 19 Nov 2004 17:24:20 +0000 (17:24 +0000)]
Add local error/warning functions like err/warn but that call an additional
cleanup routine in the error case.  This means we no longer need to compile
a special version of alloc.o for visudo.

20 years agoClarify comments about the data structures
Todd C. Miller [Fri, 19 Nov 2004 16:54:55 +0000 (16:54 +0000)]
Clarify comments about the data structures

20 years agoAdd support for VISUAL and EDITOR containing command line args.
Todd C. Miller [Thu, 18 Nov 2004 20:28:53 +0000 (20:28 +0000)]
Add support for VISUAL and EDITOR containing command line args.
If env_editor is not set any args in VISUAL and EDITOR are ignored.
Arguments are also now supported in def_editor.

20 years agoalias_matches() is no more
Todd C. Miller [Wed, 17 Nov 2004 19:25:54 +0000 (19:25 +0000)]
alias_matches() is no more

20 years agosync
Todd C. Miller [Wed, 17 Nov 2004 19:09:21 +0000 (19:09 +0000)]
sync

20 years agoWhen regenerating the parser, don't replace gram.h unless it has changed.
Todd C. Miller [Wed, 17 Nov 2004 18:19:45 +0000 (18:19 +0000)]
When regenerating the parser, don't replace gram.h unless it has changed.

20 years agoremove Makefile.binary for distclean
Todd C. Miller [Wed, 17 Nov 2004 16:56:25 +0000 (16:56 +0000)]
remove Makefile.binary for distclean

20 years agoPreserve KRB5CCNAME in zero_env() and add a paranoia check to make sure
Todd C. Miller [Wed, 17 Nov 2004 16:18:33 +0000 (16:18 +0000)]
Preserve KRB5CCNAME in zero_env() and add a paranoia check to make sure
we can't overflow new_env.

20 years agoparanoia when stripping trailing slashes from tempdir.
Todd C. Miller [Wed, 17 Nov 2004 15:33:45 +0000 (15:33 +0000)]
paranoia when stripping trailing slashes from tempdir.

20 years agoSet user_ngroups to 0 if getgroups() returns an error.
Todd C. Miller [Wed, 17 Nov 2004 00:00:48 +0000 (00:00 +0000)]
Set user_ngroups to 0 if getgroups() returns an error.

20 years agoAdd configure check for getgroups()
Todd C. Miller [Tue, 16 Nov 2004 23:59:56 +0000 (23:59 +0000)]
Add configure check for getgroups()

20 years agoUse supplementary group vector in struct sudo_user.
Todd C. Miller [Tue, 16 Nov 2004 23:55:26 +0000 (23:55 +0000)]
Use supplementary group vector in struct sudo_user.

20 years agoOnly do string comparisons on the group members if there is no
Todd C. Miller [Tue, 16 Nov 2004 23:40:58 +0000 (23:40 +0000)]
Only do string comparisons on the group members if there is no
supplemental group list.

20 years agosync
Todd C. Miller [Tue, 16 Nov 2004 21:10:22 +0000 (21:10 +0000)]
sync

20 years agoOn Digital UNIX _PATH_VAR_TMP doesn't end with a trailing slash so
Todd C. Miller [Tue, 16 Nov 2004 20:54:37 +0000 (20:54 +0000)]
On Digital UNIX _PATH_VAR_TMP doesn't end with a trailing slash so
chop off any trailing slashes we see and add an explicit one.

20 years agoremove bogus XXX comment
Todd C. Miller [Tue, 16 Nov 2004 17:02:58 +0000 (17:02 +0000)]
remove bogus XXX comment

20 years agoGet rid of alias_matches and correctly fall through to the non-alias
Todd C. Miller [Tue, 16 Nov 2004 16:10:09 +0000 (16:10 +0000)]
Get rid of alias_matches and correctly fall through to the non-alias
cases when there is no alias with the specified name.

20 years agoCache non-existent passwd/group entries too.
Todd C. Miller [Tue, 16 Nov 2004 15:47:55 +0000 (15:47 +0000)]
Cache non-existent passwd/group entries too.

20 years agoregen
Todd C. Miller [Tue, 16 Nov 2004 15:45:49 +0000 (15:45 +0000)]
regen

20 years agofix typo
Todd C. Miller [Tue, 16 Nov 2004 04:32:29 +0000 (04:32 +0000)]
fix typo

20 years agoImplement group caching and use the passwd and group caches throughout.
Todd C. Miller [Tue, 16 Nov 2004 04:24:11 +0000 (04:24 +0000)]
Implement group caching and use the passwd and group caches throughout.

20 years agoProperly negate the return value of alias_matches() when appropriate.
Todd C. Miller [Mon, 15 Nov 2004 19:43:47 +0000 (19:43 +0000)]
Properly negate the return value of alias_matches() when appropriate.

20 years agoMake hostname_matches() return TRUE for a match, else FALSE like the
Todd C. Miller [Mon, 15 Nov 2004 19:38:31 +0000 (19:38 +0000)]
Make hostname_matches() return TRUE for a match, else FALSE like the
caller expects.

20 years agoAdd missing dependencies on gram.h
Todd C. Miller [Mon, 15 Nov 2004 18:24:09 +0000 (18:24 +0000)]
Add missing dependencies on gram.h