]> granicus.if.org Git - sudo/log
sudo
17 years agoCheck strlcpy() return values.
Todd C. Miller [Sat, 5 Jan 2008 23:25:58 +0000 (23:25 +0000)]
Check strlcpy() return values.

17 years agorefactor ldap binding code into sudo_ldap_bind_s()
Todd C. Miller [Sat, 5 Jan 2008 23:12:19 +0000 (23:12 +0000)]
refactor ldap binding code into sudo_ldap_bind_s()

17 years agoMake it clear that host and uri can take multiple parameters.
Todd C. Miller [Sat, 5 Jan 2008 21:35:25 +0000 (21:35 +0000)]
Make it clear that host and uri can take multiple parameters.
URI is now supported for more than just openldap
nsswitch.conf does't accept "compat"

17 years agocomment cleanup and update (c) year
Todd C. Miller [Sat, 5 Jan 2008 21:27:02 +0000 (21:27 +0000)]
comment cleanup and update (c) year

17 years agoMove display_privs() and display_cmnd() from parse.c to sudo_nss.c.
Todd C. Miller [Sat, 5 Jan 2008 21:25:28 +0000 (21:25 +0000)]
Move display_privs() and display_cmnd() from parse.c to sudo_nss.c.
This should make it possible to build an LDAP-only sudo binary.

17 years agoImprove chaining of multiple sudoers sources by passing in the previous return value...
Todd C. Miller [Sat, 5 Jan 2008 18:27:18 +0000 (18:27 +0000)]
Improve chaining of multiple sudoers sources by passing in the previous return value to the next in the chain

17 years agoFree up parser data structures in sudo_file_close().
Todd C. Miller [Sat, 5 Jan 2008 18:26:42 +0000 (18:26 +0000)]
Free up parser data structures in sudo_file_close().

17 years agoFree up parser data structures in sudo_file_close().
Todd C. Miller [Sat, 5 Jan 2008 13:13:06 +0000 (13:13 +0000)]
Free up parser data structures in sudo_file_close().

17 years agoParse uri ourself if no ldap_initialize() is present
Todd C. Miller [Sat, 5 Jan 2008 12:59:05 +0000 (12:59 +0000)]
Parse uri ourself if no ldap_initialize() is present
Use ldap_create() instead of deprecated ldap_init()
Use ldap_sasl_bind_s() instead of deprecated ldap_simple_bind_s()

17 years agoAdd check for ldap_sasl_bind_s()
Todd C. Miller [Sat, 5 Jan 2008 12:56:39 +0000 (12:56 +0000)]
Add check for ldap_sasl_bind_s()
Remove -DLDAP_DEPRECATED from CFLAGS

17 years agoadd check for ldap_create
Todd C. Miller [Fri, 4 Jan 2008 14:56:10 +0000 (14:56 +0000)]
add check for ldap_create

17 years agoAdd sudo_ldap_get_first_rdn() to return the first rdn of an entry's dn
Todd C. Miller [Thu, 3 Jan 2008 21:11:33 +0000 (21:11 +0000)]
Add sudo_ldap_get_first_rdn() to return the first rdn of an entry's dn
using the mechanism appropriate for the LDAP SDK in use.
Use ldap_unbind_ext_s() instead of deprecated ldap_unbind_s().
Emulate ldap_unbind_ext_s() and ldap_search_ext_s() for SDK's without them.

17 years agoinclude unistd.h
Todd C. Miller [Thu, 3 Jan 2008 21:02:51 +0000 (21:02 +0000)]
include unistd.h

17 years agofix typo in mtim_getnsec
Todd C. Miller [Thu, 3 Jan 2008 16:05:04 +0000 (16:05 +0000)]
fix typo in mtim_getnsec

17 years agoadd check for st__tim in struct stat as used by SCO
Todd C. Miller [Wed, 2 Jan 2008 20:29:48 +0000 (20:29 +0000)]
add check for st__tim in struct stat as used by SCO

17 years agouse ldap_search_ext_s instead of deprecated ldap_search_s
Todd C. Miller [Wed, 2 Jan 2008 16:05:50 +0000 (16:05 +0000)]
use ldap_search_ext_s instead of deprecated ldap_search_s

17 years agoadd sudo_nss.h to HDRS
Todd C. Miller [Wed, 2 Jan 2008 15:09:20 +0000 (15:09 +0000)]
add sudo_nss.h to HDRS

17 years agoReplace deprecated ldap_explode_dn() with calls to ldap_str2dn()
Todd C. Miller [Wed, 2 Jan 2008 00:04:50 +0000 (00:04 +0000)]
Replace deprecated ldap_explode_dn() with calls to ldap_str2dn()
and ldap_rdn2str().

17 years agoUse ldap_get_values_len()/ldap_value_free_len() instead of the
Todd C. Miller [Tue, 1 Jan 2008 23:37:51 +0000 (23:37 +0000)]
Use ldap_get_values_len()/ldap_value_free_len() instead of the
deprecated ldap_get_values()/ldap_value_free().

17 years agosync
Todd C. Miller [Tue, 1 Jan 2008 22:08:53 +0000 (22:08 +0000)]
sync

17 years agosync
Todd C. Miller [Tue, 1 Jan 2008 22:07:16 +0000 (22:07 +0000)]
sync

17 years agoRemove some already fixed XXXs
Todd C. Miller [Tue, 1 Jan 2008 22:06:33 +0000 (22:06 +0000)]
Remove some already fixed XXXs

17 years agoSame return value as non-existent sudoers if LDAP was unable to connect.
Todd C. Miller [Tue, 1 Jan 2008 22:03:54 +0000 (22:03 +0000)]
Same return value as non-existent sudoers if LDAP was unable to connect.

17 years agomention /etc/environment
Todd C. Miller [Tue, 1 Jan 2008 21:52:45 +0000 (21:52 +0000)]
mention /etc/environment

17 years agoUpdate to reflect recent developments.
Todd C. Miller [Tue, 1 Jan 2008 21:43:26 +0000 (21:43 +0000)]
Update to reflect recent developments.

17 years agoPrint nsswitch.conf, ldap.conf and ldap.secret paths in -V output.
Todd C. Miller [Tue, 1 Jan 2008 21:42:28 +0000 (21:42 +0000)]
Print nsswitch.conf, ldap.conf and ldap.secret paths in -V output.

17 years agoWhen building up a query don't list groups in the aux group vector
Todd C. Miller [Tue, 1 Jan 2008 21:25:23 +0000 (21:25 +0000)]
When building up a query don't list groups in the aux group vector
that are the same as the passwd file group.  On most systems the
first gid in the group vector is the same as the passwd entry gid.

17 years agoDefine LDAPNOINIT before calling ldap_init(), etc. to disable user
Todd C. Miller [Tue, 1 Jan 2008 19:01:42 +0000 (19:01 +0000)]
Define LDAPNOINIT before calling ldap_init(), etc. to disable user
ldaprc and system defaults that could affect how LDAP works.

17 years agoRename read_nss -> sudo_read_nss
Todd C. Miller [Tue, 1 Jan 2008 18:22:03 +0000 (18:22 +0000)]
Rename read_nss -> sudo_read_nss
Add --with-nsswitch to allow users to specify nsswitch.conf path or disable it.
If --with-nsswitch=no but --with-ldap, order is LDAP, then sudoers.
Fix --with-ldap-conf-file and --with-ldap-secret-file

17 years agoHonor def_ignore_local_sudoers
Todd C. Miller [Tue, 1 Jan 2008 18:12:00 +0000 (18:12 +0000)]
Honor def_ignore_local_sudoers

17 years agono longer need to check def_ignore_local_sudoers here
Todd C. Miller [Mon, 31 Dec 2007 21:44:46 +0000 (21:44 +0000)]
no longer need to check def_ignore_local_sudoers here

17 years agoRefactor group vector resetting into a function and also call it
Todd C. Miller [Mon, 31 Dec 2007 21:36:53 +0000 (21:36 +0000)]
Refactor group vector resetting into a function and also call it
from display_cmnd.
Stop after the first sucessful match in display_cmnd.
Print a newline between each display_privs method.

17 years agofix double free introduced in rev 1.218
Todd C. Miller [Mon, 31 Dec 2007 21:23:46 +0000 (21:23 +0000)]
fix double free introduced in rev 1.218

17 years agobelt and suspenders; zero out result after freeing it
Todd C. Miller [Mon, 31 Dec 2007 21:10:49 +0000 (21:10 +0000)]
belt and suspenders; zero out result after freeing it

17 years agoRefactor line reading into a separate function, sudo_parseln(),
Todd C. Miller [Mon, 31 Dec 2007 20:04:46 +0000 (20:04 +0000)]
Refactor line reading into a separate function, sudo_parseln(),
which removes comments, leading/trailing whitespace and newlines.
May want to rethink the use of sudo_parseln() for /etc/ldap.secret

17 years agoMake the inability to read the sudoers file a non-fatal error if
Todd C. Miller [Mon, 31 Dec 2007 19:26:52 +0000 (19:26 +0000)]
Make the inability to read the sudoers file a non-fatal error if
there are other sudoers sources available.
sudoers_file_lookup now returns "not OK" if sudoers was not present

17 years agomake it clear that the global options are from LDAP
Todd C. Miller [Mon, 31 Dec 2007 19:24:10 +0000 (19:24 +0000)]
make it clear that the global options are from LDAP

17 years agoallocate proper amount of space for error string
Todd C. Miller [Mon, 31 Dec 2007 19:13:06 +0000 (19:13 +0000)]
allocate proper amount of space for error string

17 years agoactual sudo nss code
Todd C. Miller [Mon, 31 Dec 2007 15:24:57 +0000 (15:24 +0000)]
actual sudo nss code

17 years agonss-ify display_privs and display_cmnd.
Todd C. Miller [Mon, 31 Dec 2007 15:08:30 +0000 (15:08 +0000)]
nss-ify display_privs and display_cmnd.

17 years agomove update_defaults() to parse.c
Todd C. Miller [Mon, 31 Dec 2007 12:54:47 +0000 (12:54 +0000)]
move update_defaults() to parse.c

17 years agoUse nsswitch to hide some sudoers vs. ldap implementation details
Todd C. Miller [Mon, 31 Dec 2007 12:39:52 +0000 (12:39 +0000)]
Use nsswitch to hide some sudoers vs. ldap implementation details
and reduce the number of #ifdef LDAP
TODO: fix display routines and error handling

17 years agoFirst cut at nsswitch.conf support.
Todd C. Miller [Fri, 28 Dec 2007 16:20:45 +0000 (16:20 +0000)]
First cut at nsswitch.conf support.
Further reorganizaton and related changes are forthcoming.

17 years agoAdd support for reading and /etc/environment file. Still needs to
Todd C. Miller [Fri, 21 Dec 2007 21:53:32 +0000 (21:53 +0000)]
Add support for reading and /etc/environment file.  Still needs to
be documented and should probably only applies to OSes that have
it (AIX and Linux, maybe others).

17 years agoinclude limits.h
Todd C. Miller [Fri, 21 Dec 2007 21:20:30 +0000 (21:20 +0000)]
include limits.h

17 years agoreword LDAP SASL
Todd C. Miller [Thu, 20 Dec 2007 15:02:51 +0000 (15:02 +0000)]
reword LDAP SASL

17 years agosync
Todd C. Miller [Wed, 19 Dec 2007 21:40:47 +0000 (21:40 +0000)]
sync

17 years agoAdd an example sudoRole, clarify netscape vs. openldap a bit more
Todd C. Miller [Wed, 19 Dec 2007 21:39:00 +0000 (21:39 +0000)]
Add an example sudoRole, clarify netscape vs. openldap a bit more

17 years agoBe clear on what is OpenLDAP vs. Netscape-derived
Todd C. Miller [Wed, 19 Dec 2007 19:42:16 +0000 (19:42 +0000)]
Be clear on what is OpenLDAP vs. Netscape-derived

17 years agoUse ldapssl_init() for ldaps support instead of trying
Todd C. Miller [Wed, 19 Dec 2007 19:28:57 +0000 (19:28 +0000)]
Use ldapssl_init() for ldaps support instead of trying
to do it manually with ldap_init() + ldapssl_install_routines().
Use tls_cert and tls_key for cert7.db and key3.db respectively.
Don't print debugging info for options that are not set.
Add warning if start_tls specified when not supported.

17 years agofix compilation on solaris
Todd C. Miller [Wed, 19 Dec 2007 19:25:10 +0000 (19:25 +0000)]
fix compilation on solaris

17 years agoadd missing .h and .c files for missing lib objs
Todd C. Miller [Wed, 19 Dec 2007 19:23:07 +0000 (19:23 +0000)]
add missing .h and .c files for missing lib objs

17 years agofix LDAP_OPT_NETWORK_TIMEOUT setting
Todd C. Miller [Tue, 18 Dec 2007 14:54:45 +0000 (14:54 +0000)]
fix LDAP_OPT_NETWORK_TIMEOUT setting

17 years agofix compilation on Solaris
Todd C. Miller [Tue, 18 Dec 2007 01:10:10 +0000 (01:10 +0000)]
fix compilation on Solaris

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