Commit Graph
85 Commits
Author SHA1 Message Date
Simo Sorce 83a4c7207d Fix memleaks found by valgrind 2008-11-20 19:54:03 -05:00
Simo Sorce 00e8af8ac3 We must always zero out the target ientry unconditionally where it is used
and never free it in the destructor.
2008-11-20 14:03:19 -05:00
Simo Sorce 16bb6e19df Avoid potential crashbug on invalid DNs (not in the tree). 2008-11-19 14:00:30 -05:00
Simo Sorce 7156f2ddfb Fix a free before use bug, it may lead to crashes but usually just corrupts
the changepw dn we store so that it won't match. This causes normal password
changes to be interpreted as password resets instead, and the new legit
password is immediately expired.
2008-11-14 10:23:43 -05:00
Rich Megginson e3929e60d5 set winsync account disable sync default value to both instead of none 2008-11-13 11:36:37 -05:00
Simo Sorce 8929075150 Make the list of users that can skip passwrod policies configurable.
Addresses bz#471130

Also fix bugs in ipapwd_start.
Also remove mutex, it is not necessary with the current code,
we needed it when we used to change reload the configuration and
keep it referenced in a static pointer.
ipapwd_start runs only once and the global variables it sets are fixed
in stone until DS is restarted.
2008-11-12 13:21:03 -05:00
Rich Megginson 47863ac169 Make DNA work with internal operations 2008-11-10 09:38:39 -05:00
Rich Megginson 5c56c43693 do not store the OUs from the AD DN in the IPA user entry when flattening 2008-10-13 14:09:14 -04:00
Rich Megginson 0988e1c53c Do not depend on MMR plugin - start before MMR plugin
The ipa-winsync plugin needs to start before the MMR plugin, so that it
can register the API functions.  Also, the slapi-nis schema compat
plugin creates an entry that looks exactly like the default IPA group
gidNumber entry, so I added an extra (objectclass=groupOfNames) to the
filter since the slapi-nis entry doesn't have that.
2008-10-13 14:09:13 -04:00
Rich Megginson 068ed81195 Do not add enabled user to activated group - clean up parse_acct_disable
If a user needs to be enabled, just delete the user from the inactivated group,
but do not add to the activated group.  If a user is in no group, the user is
active by default.  IPA uses the activated group for override purposes.

parse_acct_disable is only used when the config changes, but I cleaned it
up anyway to make the code clearer.
2008-10-13 14:09:10 -04:00
Rich Megginson 69180c2dcc Adds winsync account disable and force sync 2008-10-13 14:09:08 -04:00
Rich Megginson e8bebebc23 fix issues brought up by initial review of ipa winsync enhancements 2008-10-13 14:09:08 -04:00
Rich Megginson 5a5bfa2c70 Added support to IPA server install to install the winsync plugin configuration entry Added support to ipa-replica-manage to add winsync agreements. I mostly used the existing code for setting up replication agreements since replication and winsync are quite similar in their configuration. I just had to add some extra attributes to the sync agreement configuration. The tricky part was importing the Windows CA cert. 2008-10-13 14:09:07 -04:00
Rich Megginson 434f9aca6a Use dirsrv/file.h with includes by default - only use the other style if we are debugging within the directory server 2008-10-13 14:09:05 -04:00
Rich Megginson 4bc89c427e fix some memory leaks 2008-10-13 14:09:04 -04:00
Rich Megginson c80ecc8c2a Added ipa-winsync-config.c - this handles dynamic configuration via the DSE callbacks, and gets default values from various configuration entries in the IPA tree 2008-10-13 14:09:04 -04:00
Rich Megginson 61b5a95dd1 Added support for posixAccount -lookup attribute containing the homeDirectory prefix and use that to construct the homeDirectory attribute -lookup attribute containing the default gidNumber and use that to add the gidNumber to new users -construct the gecos field from the cn attribute 2008-10-13 14:09:03 -04:00
Rich Megginson 6454956d51 Added the new IPA WinSync Plug-in Work done so far * added the new plugin to makefiles, spec file * added stubs for the api, including begin update, end update, and destroy callbacks * added config code to allow dynamic dse config changes and auto-discovery of realm and new user objectclass list 2008-10-13 14:09:03 -04:00
Rich Megginson 0951496593 Initial addition of ipa-winsync plugin 2008-10-13 14:09:02 -04:00
Simo Sorce 86afc680cd Retrieve the kerberos configuration every time a new, it will be a bit slower
but will allow for changing configurations without having to restart DS.
Password operations are slow and rare enough this is an acceptable compromise.
2008-09-10 15:07:17 -04:00
Simo Sorce 0c6aeee6f1 Fix segfault cause by empty target entry 2008-08-19 11:14:27 -04:00
Simo Sorce c5b44f77a1 Comment out code that generates keys with a random salt, apparently this does not work as expected and generates faulty keys 2008-08-15 08:54:44 +02:00
Simo Sorce 0d6b6fa084 Implement password operation checks and key material generation for the
ldap add and modify operation performed on the userPassword attribute.

Add helper functions to reduce code duplication.

Do not enforce encrypted connections on ldap add/ldap mod for compatibility
reasons. (We cannot enforce people not to send the password in the clear
anyway, we can only refuse to accept it at the most which does not gain
you much if someone then re-send you the same password previously exposed)
2008-08-12 14:48:41 -04:00
Simo Sorce 1b613fafa6 Treat Jan 1 1970 in krbPrincipalExpiration as a special date that means
the account Never Expires
2008-08-07 11:50:33 -04:00
Simo Sorce 4d88900c22 Fix a stupidty introduced recently in a fix to a segfault. 2008-07-24 11:35:04 -04:00
Nathan Kinder 72a3114a01 Cleaned up comments that were mangled by vim 2008-07-18 13:11:21 -04:00
Nathan Kinder 2301f60652 Re-base memberOf plug-in off of current FDS memberOf plug-in. Resolves: 452537, 453011, 443241, 439628 2008-07-18 13:11:19 -04:00
Simo Sorce aead1f652e If krbPasswordExpiration or krbLastPwdChange are not present on the entry
we might segfault trying a direct strcmp(), check they are not NULL.
Also fix a couple of memleaks.
2008-07-07 10:01:29 -04:00
Martin Nagy 6cce2f45e8 Fix some small issues that caused compiler warnings, like uninitialized or unused variables or missing krb5 prototypes. 2008-06-30 14:17:10 -04:00
Simo Sorce f5d9dd647f slapi_pw_find_sv() expects an array, make sure we have a NULL terminated
one to avoid potential segfaults
Avoid leaking memory too.
2008-06-30 14:13:25 -04:00
Simo Sorce b3ca8359ee Fix cut&paste error 2008-06-11 11:36:21 -04:00
Simo Sorce 3f4b182bc4 Let DS encode the password, this will allow IPA -> AD password
synchronization to work again.
2008-06-11 09:18:38 -04:00
Rich Megginson 2d588a8254 Fedora DS 1.1.1 exposes a public task api. In order for ipa-1-0 to build against this, ipa-memberof.c needs to be able to use the public api or the private one. 2008-05-30 13:49:46 -04:00
Simo Sorce f32f8d6d82 Use a value that is explicitly 64bit on all architectures 2008-05-23 15:07:49 -04:00
Jim Meyering 0d2212fe2f remove useless if-before-free tests
I've been on a crusade (;-) to remove useless if-before-free tests,
so ran a script that spotted some here.  I think I removed the first
batch (without braces) automatically, then manually removed the ones
with curly braces around the free statements.

You may well have doubts about the portability of removing those
tests, but as long as you don't care about SunOS4 or earlier, you'll
be fine.  I've done similar things for e.g., coreutils, glibc, and git,
and have had no problems.
2008-05-15 12:59:28 -04:00
Jim Meyering 3256365277 * ipa_pwd_extop.c (encrypt_encode_key): Handle malloc failure. 2008-05-15 12:59:28 -04:00
Simo Sorce d0f0d97be6 If there is an error we need to send back a reply ourselves.
Return also an intelligible error message.
2008-05-15 12:59:28 -04:00
Simo Sorce fb3555c483 For some unknown reason the sort control returns values sorted in reverse.
Ask for inverse order to get them straight ...
2008-05-15 12:59:28 -04:00
Simo Sorce 10f0881dba Implement checks to make sure we are not assigning a number that is in use.
Change config to support a maximum value so that ranges can be defined.
Add stubs to reach out and ask to swap in new ranges and notify that new
chuncks are needed/used.
2008-05-15 12:59:28 -04:00
Simo Sorce 6f4d71d2cc Indent the plugin accordingly to our style guidelines.
Used indent -kr -nut dna.c for most of the changes
2008-05-07 14:45:46 -04:00
W. Michael Petullo 29ddbc610c This patch begins the process of replacing OpenLDAP with mozldap.
FreeIPA relies on RedHat's Directory Server, which uses mozldap.
A FreeIPA build using mozldap would reduce the project's dependencies and
redundant code. In addition, mozldap uses NSS instead of OpenSSL.
This is beneficial for the reasons listed in [1].

[1] http://fedoraproject.org/wiki/FedoraCryptoConsolidation
2008-05-01 09:59:43 -04:00
Nathan Kinder d854d25483 Fixed various memory leaks in memberOf plug-in.
440474
2008-04-22 16:55:50 -04:00
Simo Sorce f16d2d6e2d Password policy checks fixes.
- don't let a user set a password identical to the current one.
- don't check more then the policy defined number of passwords in history
- don't set an history longer than policy defined
2008-04-07 09:26:18 -04:00
Simo Sorce e666bfbca7 Some more function name errors due to merge from DS own memberof plugin that
has different function names. This was a runtime linker crash bug :/
2008-03-31 17:22:37 -04:00
Simo Sorce 1737dbb174 Fix typo 2008-03-31 12:53:45 -04:00
Nathan Kinder 6340de3fb8 Avoid listing a group as a memberOf itself when a circular grouping
is created.

We basically just need to add a check to see if we're to use a group
DN as the memberOf value when performing an operation on itself for
all operation types.

439450
2008-03-28 14:18:18 -07:00
Nathan Kinder 80149d9f11 Fixed handling of modify operations that delete all present member
values without specifying the values to delete in the memberOf
plug-in.  Member entries were not being updated because the code
used the values in the mod to find the member entries to update.

The fix is to detect when a delete modify has no values specified
and just use the replace code since it compares the pre-op and
post-op copies of the group to figure out what member entries to
update.

439097
2008-03-28 08:56:06 -07:00
Nathan Kinder 07059a5ef2 Handle MODRDN operations properly for indirect group members.
Without this, an entry's memberOf attribute is not updated with
the new group DN when an indirect group is renamed.

This is in bugzilla for FDS as bz 438891.
2008-03-26 15:03:01 -07:00
Simo Sorce f87db10a07 Purely indentiation, trailing spaces, cosmetic fixes 2008-02-21 09:36:35 -05:00
Nathan Kinder 71c21b5293 Fix bugs in handling of circular groupings in memberOf plug-in.
Resolves 432140
2008-02-14 16:27:34 -08:00