]> granicus.if.org Git - sudo/log
sudo
17 years agoRemove redundant info that is now in sudoers.ldap.pod
Todd C. Miller [Mon, 21 Jan 2008 14:50:54 +0000 (14:50 +0000)]
Remove redundant info that is now in sudoers.ldap.pod

17 years agoReorganize the first section a bit. Substitute the proper path for
Todd C. Miller [Sun, 20 Jan 2008 21:18:56 +0000 (21:18 +0000)]
Reorganize the first section a bit.  Substitute the proper path for
/etc/sudoers.

17 years agoSubstitute values for ldap.conf, ldap.secret and nsswitch.conf
Todd C. Miller [Sun, 20 Jan 2008 15:17:35 +0000 (15:17 +0000)]
Substitute values for ldap.conf, ldap.secret and nsswitch.conf
Move schema into EXAMPLES

17 years agoSubstitute values for ldap.conf, ldap.secret and nsswitch.conf into
Todd C. Miller [Sun, 20 Jan 2008 15:15:47 +0000 (15:15 +0000)]
Substitute values for ldap.conf, ldap.secret and nsswitch.conf into
sudoers.ldap.man.

17 years agosubstitute for sudoers.ldap.man
Todd C. Miller [Sun, 20 Jan 2008 01:35:54 +0000 (01:35 +0000)]
substitute for sudoers.ldap.man

17 years agoFix cut & pasto introduced when adding sudoers.ldap man page.
Todd C. Miller [Sun, 20 Jan 2008 01:34:44 +0000 (01:34 +0000)]
Fix cut & pasto introduced when adding sudoers.ldap man page.

17 years agoFill in some of the missing pieces. Still needs some reorganization and
Todd C. Miller [Sun, 20 Jan 2008 01:25:39 +0000 (01:25 +0000)]
Fill in some of the missing pieces.  Still needs some reorganization and
editing.

17 years agoBeginnings of a sudoers.ldap man page. Currently, much of the information
Todd C. Miller [Sat, 19 Jan 2008 20:06:09 +0000 (20:06 +0000)]
Beginnings of a sudoers.ldap man page.  Currently, much of the information
is adapted from README.LDAP.

17 years agoWhen copying gr_mem we must guarantee that the storage space for
Todd C. Miller [Fri, 18 Jan 2008 22:32:52 +0000 (22:32 +0000)]
When copying gr_mem we must guarantee that the storage space for
gr_mem is properly aligned.  The simplest way to do this is to
simply store gr_mem directly after struct group.  This is not a
problem for gr_passwd or gr_name as they are simple strings.

17 years agoFix a typo/thinko in one of the calls to sudo_ldap_check_user_netgroup().
Todd C. Miller [Fri, 18 Jan 2008 21:47:05 +0000 (21:47 +0000)]
Fix a typo/thinko in one of the calls to sudo_ldap_check_user_netgroup().
From Marco van Wieringen.

17 years agoinclude <mps/ldap_ssl.h> in ldap.c if available
Todd C. Miller [Thu, 17 Jan 2008 20:44:28 +0000 (20:44 +0000)]
include <mps/ldap_ssl.h> in ldap.c if available

17 years agoMake sure we define SIZE_MAX for yacc's skeleton.c
Todd C. Miller [Wed, 16 Jan 2008 23:20:35 +0000 (23:20 +0000)]
Make sure we define SIZE_MAX for yacc's skeleton.c

17 years agoUse TCSAFLUSH when restoring terminal settings (and echo) to guarantee that any pendi...
Todd C. Miller [Wed, 16 Jan 2008 18:03:08 +0000 (18:03 +0000)]
Use TCSAFLUSH when restoring terminal settings (and echo) to guarantee that any pending output is discarded

17 years agono longer need to specify SETENV when user has sudo ALL
Todd C. Miller [Tue, 15 Jan 2008 22:18:11 +0000 (22:18 +0000)]
no longer need to specify SETENV when user has sudo ALL

17 years agosync user_args size calculation with sudo.c
Todd C. Miller [Tue, 15 Jan 2008 14:40:48 +0000 (14:40 +0000)]
sync user_args size calculation with sudo.c
Add -g group option, renaming old -g to -G
Add set_runasgr() and set_runaspw() and use them

17 years agoMake set_runaspw static void
Todd C. Miller [Tue, 15 Jan 2008 14:23:58 +0000 (14:23 +0000)]
Make set_runaspw static void

17 years agog/c set_runaspw stub
Todd C. Miller [Tue, 15 Jan 2008 14:17:31 +0000 (14:17 +0000)]
g/c set_runaspw stub

17 years agoDon't add -llber twice.
Todd C. Miller [Tue, 15 Jan 2008 12:28:33 +0000 (12:28 +0000)]
Don't add -llber twice.

17 years agofix typo
Todd C. Miller [Mon, 14 Jan 2008 11:40:08 +0000 (11:40 +0000)]
fix typo

17 years agoregen
Todd C. Miller [Sun, 13 Jan 2008 20:39:54 +0000 (20:39 +0000)]
regen

17 years agoFix check that determines whether -llber is required.
Todd C. Miller [Sun, 13 Jan 2008 19:57:34 +0000 (19:57 +0000)]
Fix check that determines whether -llber is required.

17 years agoFor netscape-based LDAP, use ldapssl_set_strength() to implement
Todd C. Miller [Sun, 13 Jan 2008 19:22:11 +0000 (19:22 +0000)]
For netscape-based LDAP, use ldapssl_set_strength() to implement
the checkpeer ldap.conf option.

17 years agoDelay krb5_cc_initialize() until we actually need to use the cred cache,
Todd C. Miller [Sun, 13 Jan 2008 14:49:43 +0000 (14:49 +0000)]
Delay krb5_cc_initialize() until we actually need to use the cred cache,
which is what krb5_verify_user() does.
Better cleanup on failure.

17 years agoRewrite verify_krb_v5_tgt() based on what heimdal's krb5_verify_user() does.
Todd C. Miller [Sat, 12 Jan 2008 17:40:43 +0000 (17:40 +0000)]
Rewrite verify_krb_v5_tgt() based on what heimdal's krb5_verify_user() does.

17 years agoThe U suffix on constants is an ANSI feature
Todd C. Miller [Wed, 9 Jan 2008 19:58:39 +0000 (19:58 +0000)]
The U suffix on constants is an ANSI feature

17 years agoAdd check for ber_set_option() in -llber
Todd C. Miller [Wed, 9 Jan 2008 17:08:30 +0000 (17:08 +0000)]
Add check for ber_set_option() in -llber

17 years agodefault if no nsswitch.conf is files only
Todd C. Miller [Mon, 7 Jan 2008 00:02:58 +0000 (00:02 +0000)]
default if no nsswitch.conf is files only

17 years agodon't tell people to mail aaron about LDAP stuff
Todd C. Miller [Sun, 6 Jan 2008 22:28:03 +0000 (22:28 +0000)]
don't tell people to mail aaron about LDAP stuff

17 years agotimelimit and bind_timelimit
Todd C. Miller [Sun, 6 Jan 2008 17:32:59 +0000 (17:32 +0000)]
timelimit and bind_timelimit

17 years agosync
Todd C. Miller [Sun, 6 Jan 2008 13:54:03 +0000 (13:54 +0000)]
sync

17 years agoMove ldap.secret reading into a separate function.
Todd C. Miller [Sun, 6 Jan 2008 12:56:46 +0000 (12:56 +0000)]
Move ldap.secret reading into a separate function.

17 years agouser_runas -> runas_pw
Todd C. Miller [Sun, 6 Jan 2008 00:09:18 +0000 (00:09 +0000)]
user_runas -> runas_pw

17 years agosync
Todd C. Miller [Sat, 5 Jan 2008 23:59:50 +0000 (23:59 +0000)]
sync

17 years agoAdd and document the %p escape in the password prompt.
Todd C. Miller [Sat, 5 Jan 2008 23:59:28 +0000 (23:59 +0000)]
Add and document the %p escape in the password prompt.
Based on a patch from Patrick Schoenfeld.

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