]> eyrie.org Git - kerberos/krb5-sync.git/log
kerberos/krb5-sync.git
6 years agoAdd a patch for Heimdal 7.4.0, contributed by Patrik Lundin master
Russ Allbery [Mon, 25 Sep 2017 02:30:47 +0000 (19:30 -0700)]
Add a patch for Heimdal 7.4.0, contributed by Patrik Lundin

8 years agoMake the tools/backend test less sensitive to precise timing release/3.1
Russ Allbery [Wed, 19 Aug 2015 04:32:35 +0000 (21:32 -0700)]
Make the tools/backend test less sensitive to precise timing

8 years agoRelease 3.1
Russ Allbery [Wed, 19 Aug 2015 04:27:00 +0000 (21:27 -0700)]
Release 3.1

8 years agoFurther rra-c-util 5.8 and C TAP Harness 3.4 updates
Russ Allbery [Wed, 19 Aug 2015 04:22:57 +0000 (21:22 -0700)]
Further rra-c-util 5.8 and C TAP Harness 3.4 updates

Sneak in a few more things: a Test::RRA::Automake fix for removing
relative directories, and fixes to C TAP Harness for test lists
containing no tests.

8 years agoAdd NEWS entry for fixes to krb5-sync-backend silent mode
Russ Allbery [Wed, 19 Aug 2015 03:02:09 +0000 (20:02 -0700)]
Add NEWS entry for fixes to krb5-sync-backend silent mode

8 years agoUpdate to rra-c-util 5.8 and C TAP Harness 3.3
Russ Allbery [Wed, 19 Aug 2015 02:55:54 +0000 (19:55 -0700)]
Update to rra-c-util 5.8 and C TAP Harness 3.3

Update to rra-c-util 5.8:

* Support the Solaris 10 embedded Kerberos implementation.
* Use calloc or reallocarray instead of malloc.
* Fix compilation with a C++ compiler.

Update to C TAP Harness 3.3:

* Display verbose test results with -v or C_TAP_VERBOSE.
* Reopen standard input to /dev/null when running a test list.
* Don't leak extraneous file descriptors to tests.

8 years agoAdd format attributes recommended by current GCC
Russ Allbery [Wed, 19 Aug 2015 02:55:38 +0000 (19:55 -0700)]
Add format attributes recommended by current GCC

8 years agoMerge pull request #1 from Stanford/master
Russ Allbery [Wed, 19 Aug 2015 02:31:50 +0000 (19:31 -0700)]
Merge pull request #1 from Stanford/master

krb5-sync-backend: Add an ending newline to error messages

8 years agokrb5-sync-backend: Add an ending newline to error messages
Jon Robertson [Wed, 19 Aug 2015 02:13:06 +0000 (19:13 -0700)]
krb5-sync-backend: Add an ending newline to error messages

For --silent we're splitting up the errors by \n, which strips the
newlines from each line.  Print out with an explicit \n so that errors
don't all run together.

10 years agoFix ignore regex in krb5-sync-backend for missing users
Russ Allbery [Sat, 19 Apr 2014 21:17:44 +0000 (14:17 -0700)]
Fix ignore regex in krb5-sync-backend for missing users

The log message in the krb5-sync plugin changed from "in LDAP" to
"via LDAP".  Change the ignore regex accordingly.

10 years agoFix email address in tests/data/make-krb5-conf
Russ Allbery [Sun, 13 Apr 2014 23:22:11 +0000 (16:22 -0700)]
Fix email address in tests/data/make-krb5-conf

10 years agoAdd a few items to the TODO list
Russ Allbery [Wed, 1 Jan 2014 21:15:08 +0000 (13:15 -0800)]
Add a few items to the TODO list

10 years agoDocument that krb5-sync doesn't use instance configuration
Russ Allbery [Thu, 12 Dec 2013 03:22:07 +0000 (19:22 -0800)]
Document that krb5-sync doesn't use instance configuration

The krb5-sync command-line utility does what it's told and ignores
the instance configuration and the ad_base_instance support.
Document this.

10 years agoCorrectly handle memory errors in parsing ad_instances
Russ Allbery [Thu, 12 Dec 2013 03:18:04 +0000 (19:18 -0800)]
Correctly handle memory errors in parsing ad_instances

10 years agoAdd back ad_base_instance support for MIT Kerberos release/3.0
Russ Allbery [Tue, 10 Dec 2013 06:51:27 +0000 (22:51 -0800)]
Add back ad_base_instance support for MIT Kerberos

This works properly provided that the instance lookup uses a
separate Kerberos context.  Thanks to Greg Hudson for the fix.

10 years agoFix some leftover documentation for the old module name
Russ Allbery [Tue, 10 Dec 2013 04:53:04 +0000 (20:53 -0800)]
Fix some leftover documentation for the old module name

Also remove some leftover documentation for old versions of MIT
Kerberos, which are no longer supported.

10 years agoAdd largefile support
Russ Allbery [Tue, 10 Dec 2013 04:48:23 +0000 (20:48 -0800)]
Add largefile support

This isn't horribly interesting for what this module does, but
there's no harm and it makes Lintian warnings go away.

10 years agoDisable ad_base_instance for MIT Kerberos
Russ Allbery [Tue, 10 Dec 2013 04:45:19 +0000 (20:45 -0800)]
Disable ad_base_instance for MIT Kerberos

Calling libkadm5srv functions from inside a kadm5_hook plugin
appears to corrupt the state of the library on MIT Kerberos.
Disable the ad_base_instance configuration option on MIT Kerberos
for the time being.

10 years agoAdd Net::Remctl::Backend as a requirement for backend testing
Russ Allbery [Tue, 10 Dec 2013 02:32:40 +0000 (18:32 -0800)]
Add Net::Remctl::Backend as a requirement for backend testing

10 years agoMention new module requirements for krb5-sync-backend in NEWS
Russ Allbery [Tue, 10 Dec 2013 02:31:31 +0000 (18:31 -0800)]
Mention new module requirements for krb5-sync-backend in NEWS

10 years agoRemove nonnull from sync_vector_free
Russ Allbery [Tue, 10 Dec 2013 01:50:50 +0000 (17:50 -0800)]
Remove nonnull from sync_vector_free

It is permissible to pass NULL to sync_vector_free, so remove the
GCC annotation.

10 years agoFix the contents of the distribution
Russ Allbery [Tue, 10 Dec 2013 01:32:38 +0000 (17:32 -0800)]
Fix the contents of the distribution

10 years agoRelease 3.0
Russ Allbery [Tue, 10 Dec 2013 01:26:55 +0000 (17:26 -0800)]
Release 3.0

10 years agoRemove stray blank line in portable/krb5.h
Russ Allbery [Tue, 10 Dec 2013 00:11:15 +0000 (16:11 -0800)]
Remove stray blank line in portable/krb5.h

10 years agoOnly probe for krb5/kadm5_hook_plugin.h when building with MIT
Russ Allbery [Tue, 10 Dec 2013 00:09:06 +0000 (16:09 -0800)]
Only probe for krb5/kadm5_hook_plugin.h when building with MIT

If building with Heimdal using non-standard paths, we may find the
MIT Kerberos header but not be able to compile with it because of
all the symbol conflicts.  Work around this by only checking for
the header when building with Heimdal.

10 years agoUpdate version numbers of Test::RRA* modules
Russ Allbery [Tue, 10 Dec 2013 01:18:12 +0000 (17:18 -0800)]
Update version numbers of Test::RRA* modules

10 years agoFix detection of ad_base_instance principals
Russ Allbery [Sat, 7 Dec 2013 03:56:37 +0000 (19:56 -0800)]
Fix detection of ad_base_instance principals

The logic for checking the Kerberos database for the principal
was incorrect in the case where the principal exists.  Fix the
status code checking to work properly.

10 years agoCorrectly ignore ad_base_instance for enable and disable
Russ Allbery [Sat, 7 Dec 2013 03:54:29 +0000 (19:54 -0800)]
Correctly ignore ad_base_instance for enable and disable

The logic to ignore ad_base_instance for enable and disable was
accidentally skipped.

10 years agoAllow propagation of base instances
Russ Allbery [Sat, 7 Dec 2013 03:53:33 +0000 (19:53 -0800)]
Allow propagation of base instances

We weren't allowing ad_base_instance instances through far enough
into the password change logic to determine that they should be
propagated to the base account.

10 years agoFix error in storing credentials for AD propagation
Russ Allbery [Sat, 7 Dec 2013 03:16:00 +0000 (19:16 -0800)]
Fix error in storing credentials for AD propagation

A one-character error caused us to never properly initialize the
local ticket cache.

10 years agoCompile libtap with the right CPPFLAGS
Russ Allbery [Sat, 7 Dec 2013 00:45:29 +0000 (16:45 -0800)]
Compile libtap with the right CPPFLAGS

Now that we include the Kerberos tests, we need to include
AM_CPPFLAGS in the CPPFLAGS for libtap.

10 years agoAdd new spelling stopwords to krb5-sync-backend
Russ Allbery [Sat, 7 Dec 2013 00:45:07 +0000 (16:45 -0800)]
Add new spelling stopwords to krb5-sync-backend

Now that the license is in the documentation, we need a few more
stopwords for POD spelling tests.

10 years agoCast password error lengths for Heimdal
Russ Allbery [Sat, 7 Dec 2013 00:44:37 +0000 (16:44 -0800)]
Cast password error lengths for Heimdal

The length fields are size_t with Heimdal, so cast them to an int
so that printf is happy.

10 years agoFix formatting of the new backend test
Russ Allbery [Sat, 7 Dec 2013 00:44:24 +0000 (16:44 -0800)]
Fix formatting of the new backend test

10 years agoAdd tests for instance handling
Russ Allbery [Fri, 6 Dec 2013 23:43:37 +0000 (15:43 -0800)]
Add tests for instance handling

Test allowed and disallowed instances and ensure that they're
queued or ignored as appropriate.

10 years agoReorganize TODO and synchronize with current status
Russ Allbery [Fri, 6 Dec 2013 23:22:23 +0000 (15:22 -0800)]
Reorganize TODO and synchronize with current status

10 years agoAdd a basic test suite for krb5-sync-backend
Russ Allbery [Fri, 6 Dec 2013 23:15:33 +0000 (15:15 -0800)]
Add a basic test suite for krb5-sync-backend

This does not (yet) test the process function, but everything
else gets some reasonable basic testing.  Still to be done, as
well as process, is testing of creating files when there are
conflicts and testing the purge function.

10 years agoWork around Net::Remctl::Backend bug in krb5-sync-backend
Russ Allbery [Fri, 6 Dec 2013 23:13:57 +0000 (15:13 -0800)]
Work around Net::Remctl::Backend bug in krb5-sync-backend

Net::Remctl::Backend doesn't do argument count validation
properly with arguments from standard input, which affected the
password command.  Allow one fewer argument than we require and
do a separate check that the number of arguments is correct.

10 years agoFix locking in krb5-sync-backend with non-default queues
Russ Allbery [Fri, 6 Dec 2013 23:10:39 +0000 (15:10 -0800)]
Fix locking in krb5-sync-backend with non-default queues

Allow krb5-sync-backend to create the lock file if it's missing,
and pass in the queue directory to the lock function so that it
can find the correct lock file.

10 years agoAdd test_tmpdir function to Test::RRA::Automake
Russ Allbery [Fri, 6 Dec 2013 23:09:24 +0000 (15:09 -0800)]
Add test_tmpdir function to Test::RRA::Automake

This parallels the C TAP library function: create a temporary
directory and return the path, and remove the directory if possible
on program exit.

10 years agoFinish cleanup of krb5-sync-backend coding style
Russ Allbery [Fri, 6 Dec 2013 06:45:40 +0000 (22:45 -0800)]
Finish cleanup of krb5-sync-backend coding style

Functionality should be the same, but it now uses IPC::Run and
Net::Remctl::Backend and holds a queue lock while processing a
particular queue file.  The -h option was removed and a new
manual command was added.

10 years agoAdd standard Perl test suite
Russ Allbery [Thu, 5 Dec 2013 07:27:27 +0000 (23:27 -0800)]
Add standard Perl test suite

Add the test suite for Perl programs.  Currently, the critic test
does not pass if maintainer tests are enabled, since the coding
style for krb5-sync-backend is out of date.

10 years agoInitial work on updating krb5-sync-backend coding style
Russ Allbery [Thu, 5 Dec 2013 07:27:01 +0000 (23:27 -0800)]
Initial work on updating krb5-sync-backend coding style

Still a work in progress.  The program has only been about half
converted.

10 years agoAdd some more test data files to the distribution
Russ Allbery [Thu, 5 Dec 2013 06:44:59 +0000 (22:44 -0800)]
Add some more test data files to the distribution

10 years agoRename test Kerberos configuration files for clarity
Russ Allbery [Thu, 5 Dec 2013 06:44:16 +0000 (22:44 -0800)]
Rename test Kerberos configuration files for clarity

Now that we can generate the queue file, let's call these something
that makes it clearer what they are.

10 years agoClean up the setup and teardown of the queue-only test
Russ Allbery [Thu, 5 Dec 2013 06:40:43 +0000 (22:40 -0800)]
Clean up the setup and teardown of the queue-only test

10 years agoFix some minor error-handling issues in the queue-only test
Russ Allbery [Thu, 5 Dec 2013 06:40:29 +0000 (22:40 -0800)]
Fix some minor error-handling issues in the queue-only test

10 years agoClose some memory leaks in the test suite
Russ Allbery [Thu, 5 Dec 2013 06:11:03 +0000 (22:11 -0800)]
Close some memory leaks in the test suite

Caught by running the test suite under valgrind.

10 years agoMerge krb5-sync sections in generated krb5.conf files
Russ Allbery [Thu, 5 Dec 2013 06:10:21 +0000 (22:10 -0800)]
Merge krb5-sync sections in generated krb5.conf files

It looks like the profile library can't handle multiple appdefault
sections for krb5-sync and doesn't combine them properly.  Make
make-krb5-conf a bit more complicated to merge the settings into
the existing section.

10 years agoIn run_setup, better error reporting for a failed setup program
Russ Allbery [Thu, 5 Dec 2013 06:07:37 +0000 (22:07 -0800)]
In run_setup, better error reporting for a failed setup program

If the setup program fails without producing any output, say so,
rather than just calling bail with the empty string.

10 years agoAdd support for valgrind testing
Russ Allbery [Thu, 5 Dec 2013 06:07:05 +0000 (22:07 -0800)]
Add support for valgrind testing

Include the suppression file from rra-c-util.

10 years agoFix some memory management issues caught by clang
Russ Allbery [Thu, 5 Dec 2013 05:13:46 +0000 (21:13 -0800)]
Fix some memory management issues caught by clang

One use-after-free and one case in plugin/vector.c that was actually
okay but that was too difficult to analyze.

10 years agoUpdate to rra-c-util 4.12 (to be) and C TAP Harness 2.3
Russ Allbery [Thu, 5 Dec 2013 05:02:57 +0000 (21:02 -0800)]
Update to rra-c-util 4.12 (to be) and C TAP Harness 2.3

Update to rra-c-util 4.12:

* Better error messages from xasprintf on failure to format output.
* Check return status of vsnprintf properly.
* Significant improvements to POD tests.
* Avoid leaking a dummy symbol from the portability layer.
* Probe for Kerberos headers with file existence checks.

Update to C TAP Harness 2.3:

* runtests now treats the command line as a list of tests by default.
* The full test executable path can now be passed to runtests -o.
* Improved harness output for tests with lazy plans.
* Improved harness output to a terminal for some abort cases.
* Flush harness output after each test even when not on a terminal.
* bail and sysbail now exit with status 255 to match Test::More.
* Suppress lazy plans and test summaries if the test failed with bail.
* Add warn_unused_result gcc attributes to relevant functions.

10 years agoAdd build-aux/ar-lib to MAINTAINERCLEANFILES
Russ Allbery [Thu, 5 Dec 2013 04:40:18 +0000 (20:40 -0800)]
Add build-aux/ar-lib to MAINTAINERCLEANFILES

10 years agoUpdate warning flags from the latest rra-c-util
Russ Allbery [Thu, 5 Dec 2013 04:39:41 +0000 (20:39 -0800)]
Update warning flags from the latest rra-c-util

10 years agoUpdate portable/snprintf.c from rra-c-util
Russ Allbery [Thu, 5 Dec 2013 04:39:28 +0000 (20:39 -0800)]
Update portable/snprintf.c from rra-c-util

Contains some warning fixes for the new warning flags.

10 years agoSimplify queue-only test using make-krb5-conf
Russ Allbery [Thu, 5 Dec 2013 04:36:29 +0000 (20:36 -0800)]
Simplify queue-only test using make-krb5-conf

Generate the krb5.conf file for the queue-only test by adding the
configuration setting on to the default.conf file instead of using
a separate file.  Also redo the setup to be somewhat cleaner.

10 years agoSimplify the queuing tests
Russ Allbery [Thu, 5 Dec 2013 03:54:54 +0000 (19:54 -0800)]
Simplify the queuing tests

Create a library of common utility funcitons to check properties
of the queue, and use them in the queue-only and queuing tests.

10 years agoChange the name of the module to drop the redundant krb5_
Russ Allbery [Thu, 5 Dec 2013 02:27:39 +0000 (18:27 -0800)]
Change the name of the module to drop the redundant krb5_

This will require configuration changes during upgrades.

10 years agoStart cleaning up module test suite
Russ Allbery [Thu, 5 Dec 2013 02:14:58 +0000 (18:14 -0800)]
Start cleaning up module test suite

Import the Kerberos TAP functions from rra-c-util so that we can
use bail_krb5, and update the Kerberos Autoconf macros to match.
Add make-krb5-conf to build a configuration with known settings,
although it's not being used yet.  Clean up and comment the dynamic
loading tests and use bail more to avoid making the whole test
conditional.

10 years agoRename the default test krb5.conf file
Russ Allbery [Thu, 5 Dec 2013 01:29:27 +0000 (17:29 -0800)]
Rename the default test krb5.conf file

Calling it krb5.conf is confusing.  Call it default.conf instead,
which is clearer about its role.

10 years agoRemove obsolete patches from EXTRA_DIST
Russ Allbery [Thu, 5 Dec 2013 01:20:14 +0000 (17:20 -0800)]
Remove obsolete patches from EXTRA_DIST

10 years agoRename plugin/api.c to plugin/general.c and comment it
Russ Allbery [Thu, 5 Dec 2013 01:19:47 +0000 (17:19 -0800)]
Rename plugin/api.c to plugin/general.c and comment it

10 years agoNew syslog option to suppress syslog logging
Russ Allbery [Thu, 5 Dec 2013 00:48:08 +0000 (16:48 -0800)]
New syslog option to suppress syslog logging

Add a new boolean krb5.conf option, syslog, which can be set to false
to suppress syslog logging of the actions taken by the plugin and
error messages leading to queuing the change.  Always log the error
that leads to queuing a status change.

10 years agoImprove formatting of the configuration documentation
Russ Allbery [Wed, 4 Dec 2013 23:47:54 +0000 (15:47 -0800)]
Improve formatting of the configuration documentation

Break up the configuration documentation in README into separate
paragraphs for each configuration option and organize in
alphabetical order by configuration option name.  Be clearer
about the required or not required status of some options.

10 years agoAdd portable replacement for strndup
Russ Allbery [Wed, 4 Dec 2013 23:31:10 +0000 (15:31 -0800)]
Add portable replacement for strndup

We're now using this again, now that we're using the vector
library for the ad_instances configuration, so add a replacement
for Mac OS X.

10 years agoUse a vector for ad_instances
Russ Allbery [Wed, 4 Dec 2013 23:29:45 +0000 (15:29 -0800)]
Use a vector for ad_instances

Rather than doing complicated parsing of the space-separated list
of acceptable instances, add support for vectors and parsing the
configuration option into a vector, which makes the code fairly
simple and straightforward.

10 years agoFor queuing, strip realm using krb5_unparse_name_flags
Russ Allbery [Wed, 4 Dec 2013 22:48:09 +0000 (14:48 -0800)]
For queuing, strip realm using krb5_unparse_name_flags

Rather than trying to parse the resulting string for the realm
separator, use krb5_unparse_name_flags and tell the Kerberos
library to strip the realm for us.

10 years agoRemove the domain parameter from queuing
Russ Allbery [Wed, 4 Dec 2013 22:43:24 +0000 (14:43 -0800)]
Remove the domain parameter from queuing

We keep it in the file format, but just hard-code it to "ad" for
right now, since we don't support any other domains at the moment.

10 years agoConvert remaining internal functions to Kerberos error handling
Russ Allbery [Wed, 4 Dec 2013 22:18:54 +0000 (14:18 -0800)]
Convert remaining internal functions to Kerberos error handling

Return a Kerberos status code as the uniform error reporting
mechanism and move the result into an out parameter.

10 years agoPass the Kerberos context to sync_close
Russ Allbery [Wed, 4 Dec 2013 21:55:05 +0000 (13:55 -0800)]
Pass the Kerberos context to sync_close

We don't use it now, but may as well match the plugin interface
just in case.

10 years agoFail the password change if we can't check the instance
Russ Allbery [Wed, 4 Dec 2013 21:47:13 +0000 (13:47 -0800)]
Fail the password change if we can't check the instance

If configured with a base instance, fail the password change if
we can't look up the instance in the Kerberos database to determine
whether it should be propagated.

10 years agoRewrite instance_allowed to use bool
Russ Allbery [Wed, 4 Dec 2013 21:46:41 +0000 (13:46 -0800)]
Rewrite instance_allowed to use bool

The logic still needs some improvement, but at least we can use
real boolean variables.

10 years agoFix a stray use of rra@stanford.edu
Russ Allbery [Tue, 3 Dec 2013 19:41:29 +0000 (11:41 -0800)]
Fix a stray use of rra@stanford.edu

10 years agoReturn a real status from sync_instance_exists
Russ Allbery [Thu, 21 Nov 2013 06:09:46 +0000 (22:09 -0800)]
Return a real status from sync_instance_exists

Return a Kerberos status and store the existence in a separate
boolean variable.  This doesn't abort the password change on failure
yet due to some problems in calling functions, but it's the first
step.

10 years agoRemove unused config argument from sync_instance_exists
Russ Allbery [Thu, 21 Nov 2013 05:58:19 +0000 (21:58 -0800)]
Remove unused config argument from sync_instance_exists

10 years agoReport better error messages when queue locking fails
Russ Allbery [Thu, 21 Nov 2013 05:56:01 +0000 (21:56 -0800)]
Report better error messages when queue locking fails

Put the full error message in the Kerberos context, and change an
internal function to be able to returna proper status.

10 years agoRemove portable version of strndup
Russ Allbery [Thu, 21 Nov 2013 05:04:27 +0000 (21:04 -0800)]
Remove portable version of strndup

We don't use this anywhere in the source tree, so there's no
reason to have it around.

10 years agoRemove strlcpy and strlcat portability functions
Russ Allbery [Thu, 21 Nov 2013 04:57:38 +0000 (20:57 -0800)]
Remove strlcpy and strlcat portability functions

Now that ad_ldap_base is the full base DN, we no longer use either
of those functions anywhere in the source tree.  Remove the
portability glue.

10 years agoad_ldap_base now contains the entire base DN
Russ Allbery [Thu, 21 Nov 2013 04:54:17 +0000 (20:54 -0800)]
ad_ldap_base now contains the entire base DN

The meaning of the ad_ldap_base configuration option has changed, and
it's now mandatory for status synchronization.  This setting should
now contain the full DN of the tree in Active Directory where account
information is stored (such as cn=Accounts,dc=example,dc=com).
Previously, the dc components should be omitted and were derived from
the realm; this is no longer done.  If this configuration option is
not set, principal status will not be synchronized to Active
Directory.

10 years agoReplace remaining uses of snprintf with asprintf
Russ Allbery [Thu, 21 Nov 2013 04:15:29 +0000 (20:15 -0800)]
Replace remaining uses of snprintf with asprintf

There's still a remaining use of strlcpy and strlcat to build the
LDAP base DN, which I'm going to change in a more comprehensive
manner.

10 years agoChange the type of the enabled argument to sync_status to bool
Russ Allbery [Thu, 21 Nov 2013 03:29:40 +0000 (19:29 -0800)]
Change the type of the enabled argument to sync_status to bool

10 years agoUse bool for the flag in principal_allowed
Russ Allbery [Thu, 21 Nov 2013 03:26:09 +0000 (19:26 -0800)]
Use bool for the flag in principal_allowed

10 years agoRemove the password length from the interface
Russ Allbery [Thu, 21 Nov 2013 03:21:47 +0000 (19:21 -0800)]
Remove the password length from the interface

Nothing used it anyway, so why complicate our life.

10 years agoRename all of the internal functions
Russ Allbery [Thu, 21 Nov 2013 03:13:38 +0000 (19:13 -0800)]
Rename all of the internal functions

Use the much shorter sync_ prefix instead of pwupdate, and don't
care internally about pre-commit vs. post-commit.  We handle that
entirely in the module glue layer now.  Remove the empty and
never-called postcommit password function.

10 years agoInvert the arguments to pwupdate_init
Russ Allbery [Thu, 21 Nov 2013 02:48:37 +0000 (18:48 -0800)]
Invert the arguments to pwupdate_init

Pass in the out parameter last, which is more consistent with the
Kerberos calling convention and the hook APIs for both MIT and
Heimdal.

10 years agoAssume free(NULL) is safe to call
Russ Allbery [Thu, 21 Nov 2013 02:45:02 +0000 (18:45 -0800)]
Assume free(NULL) is safe to call

ISO C requires that this do nothing, silently.

10 years agoUse kadm5_hook_modinfo for the internal structure
Russ Allbery [Thu, 21 Nov 2013 02:36:30 +0000 (18:36 -0800)]
Use kadm5_hook_modinfo for the internal structure

This is the MIT Kerberos name, and by adopting it we get a little
bit more type checking and don't have to invent our own data
structure name.

10 years agoAdd NEWS entry for the new password change queuing behavior
Russ Allbery [Thu, 21 Nov 2013 02:18:07 +0000 (18:18 -0800)]
Add NEWS entry for the new password change queuing behavior

10 years agoRework internal error handling to use Kerberos errors
Russ Allbery [Thu, 21 Nov 2013 02:15:08 +0000 (18:15 -0800)]
Rework internal error handling to use Kerberos errors

Now that we've dropped the old API, we can drop the error handling
mode, which predates rich Kerberos errors.  Replace it with use of
krb5_set_error_message everywhere, and change a lot of functions
to return a krb5_error_code instead of a boolean or some special
status code.

As part of this change, all password changes are queued for Active
Directory if they fail regardless of the reason for the failure.

10 years agoPass the Kerberos context into all internal functions
Russ Allbery [Wed, 20 Nov 2013 23:00:13 +0000 (15:00 -0800)]
Pass the Kerberos context into all internal functions

Standardize the API so that all functions except the init and
shutdown take the plugin configuration and the Kerberos context,
and stop internally creating and removing Kerberos contexts.  Stop
using void * in a bunch of places, isolating that to the MIT and
Heimdal plugin code.

10 years agoDocument krb5.conf realm handling
Russ Allbery [Wed, 20 Nov 2013 01:27:27 +0000 (17:27 -0800)]
Document krb5.conf realm handling

You can use sections for the local default realm, but not separate
configuration based on the realm of the affected principal.

10 years agoRefactor krb5.conf handling
Russ Allbery [Wed, 20 Nov 2013 01:25:32 +0000 (17:25 -0800)]
Refactor krb5.conf handling

Use the code from krb5-strength to improve how configuration is
extracted from krb5.conf and support configuration based on the
default realm.

10 years agoDrop support for old versions of MIT Kerberos
Russ Allbery [Wed, 20 Nov 2013 00:44:43 +0000 (16:44 -0800)]
Drop support for old versions of MIT Kerberos

Drop support for MIT Kerberos versions prior to 1.9.  All major
distributions are now shipping with a newer version of MIT Kerberos
than this, and supporting older versions requires supporting patches
and maintaining handicapped internal APIs.  MIT Kerberos 1.9 and later
do not require patches to use this module.  Patches for Heimdal are
still provided.

10 years agoUse portable/krb5.h and portable/kadmin.h
Russ Allbery [Wed, 20 Nov 2013 00:22:15 +0000 (16:22 -0800)]
Use portable/krb5.h and portable/kadmin.h

The hook glue code for MIT and Heimdal wasn't using the portable
header wrappers.  Fix that.

10 years agoHide all internal functions, use C bindings
Russ Allbery [Wed, 20 Nov 2013 00:11:41 +0000 (16:11 -0800)]
Hide all internal functions, use C bindings

Set the visibility of all internal functions to hidden when built
with gcc to avoid leaking symbols from the module.  Use the macros
to force C binding when built with a C++ compiler.

Also use portable/krb5.h instead of krb5.h in internal.h.

10 years agoDocument the configure flags used for kadmin server support
Russ Allbery [Wed, 20 Nov 2013 00:05:01 +0000 (16:05 -0800)]
Document the configure flags used for kadmin server support

10 years agoUpdate my email address to eagle@eyrie.org
Russ Allbery [Wed, 20 Nov 2013 00:02:25 +0000 (16:02 -0800)]
Update my email address to eagle@eyrie.org

10 years agoAdd support for ad_base_instance
Russ Allbery [Tue, 19 Nov 2013 00:55:15 +0000 (16:55 -0800)]
Add support for ad_base_instance

Add a new string krb5.conf option, ad_base_instance, which, if set,
changes the way that password synchronization is handled.  When this
option is set, the password for the principal formed by appending that
instance to a base principal is propagated to Active Directory as the
password for the base principal.  So, for instance, if this is set to
the string "windows", the password of the principal "user/windows" is
propagated to Active Directory as the password for the principal
"user" and password changes for the principal "user" are ignored.
This special behavior only happens if "user/windows" exists in the
local Kerberos KDC database; if not, password propagation for the
principal "user" happens normally, just as if this option weren't set.
This allows the Active Directory principal to be treated as an
instance rather than a main account for specific users without
affecting behavior for other users.

No regressions, but currently untested otherwise.

10 years agoAdd ad_queue_only to force queuing of all changes
Russ Allbery [Sat, 16 Nov 2013 00:27:09 +0000 (16:27 -0800)]
Add ad_queue_only to force queuing of all changes

Add a new boolean krb5.conf option, ad_queue_only, which, if set to
true, forces all changes to be queued even if there are no conflicting
changes already queued.  The changes can then be processed later with
krb5-sync-backend.  This can be useful if real-time updates to Active
Directory cause performance issues in kadmind or kpasswdd.  kpasswd
clients in particular are often intolerant of delays.