Commit Graph
100 Commits
Author SHA1 Message Date
Simo Sorce 7aae58fd2d uuid-plugin: Fix control access bug on replication
Fixes: https://fedorahosted.org/freeipa/ticket/468
2010-11-10 15:34:58 -05:00
Simo Sorce caa3f843da Use strongest keytype for master key 2010-11-09 15:01:43 -05:00
Simo Sorce 4f8e4482b3 pwd-plugin: Always use a special salt by default.
This should make renamed users able to keep using old credentials as the salt
is not derived from the principal name but is always a random quantity.

https://fedorahosted.org/freeipa/ticket/412
2010-10-28 17:18:03 -04:00
Simo Sorce 79c39339da pwd-plugin: fix slapi log target in logging functions 2010-10-28 17:17:59 -04:00
Simo Sorce c51ce61e4d UUIDs: remove uuid python plugin and let DS always autogenerate
merge in remove uuid
2010-10-28 07:58:31 -04:00
Simo Sorce 1bfd0f8791 ipa_uuid: prevent false positives on modifies
If a modify operation does not specify our attribute then we need to short
circuit the loop, otherwise on enforcing we will return an error by mistake if
we are not Directory Manager because generate is false if the attr is not
found.
2010-10-28 07:58:31 -04:00
Simo Sorce 99a7f83c3c ipa_uuid: Handle generation of the uuid when it is a RDN 2010-10-28 07:58:31 -04:00
Simo Sorce 2a141bf2c1 ipa-uuid: Add enforce mode
By setting the enforce flag in the configuration we prevent anyone from storing
arbitrary values and allow only Directory Manager to override the plugin.
Users can only set the value to the magic value (usually 0) to have the uuid
regenerated, and nothing else.
2010-10-28 07:58:31 -04:00
Simo Sorce 7fc6dfbcac ipa-uuid: Code cleanups
Remove one level of indentation from the main function by jumping
to the end immediately if the configuration list is empty.
Other minor style cleanups.
2010-10-28 07:58:31 -04:00
Simo Sorce 1233a7aff3 ipa-uuid: safer unlock handling
This allows the code in the for loop to error out without worrying of
forgetting to unlock the config entries.
2010-10-28 07:58:31 -04:00
Simo Sorce 2d63522d48 ipa-uuid: Reset generate flag at every cycle
Avoid false positives if more than one uuid attribute is generated
in the same entry.
2010-10-28 07:58:31 -04:00
Simo Sorce 56724fa024 ipa-uuid: Remove unused functions 2010-10-28 07:58:31 -04:00
Simo Sorce 3f1293582f ipa-modrdn: Remove unused functions 2010-10-28 07:58:31 -04:00
Simo Sorce 874dc15c5d ipa-modrdn: Enable plugin to handle krbPrincipalName on renames 2010-10-28 07:58:31 -04:00
Simo Sorce 984942ee49 Add new plugin used to modify related attributes after a modrdn operation. 2010-10-28 07:58:31 -04:00
Simo Sorce 9018b601cd ipa-uuid: enable plugin in IPA 2010-10-22 17:22:46 -04:00
Simo Sorce 3a05149201 ipa-uuid: DNA-like plugin that generates uuids 2010-10-22 17:22:40 -04:00
Simo Sorce f6a50c49ad Handle cases where ntpd options are scattered on multiple lines 2010-10-22 17:22:34 -04:00
Simo Sorce c2a2ffbe69 ntpdinstance: Do not replace the config files, just add needed options 2010-10-18 13:54:17 -04:00
Simo Sorce 00217308c5 Ignore useless stuff by default 2010-10-18 13:25:20 -04:00
Simo Sorce 2165182492 dsinstance: Fix ldappasswd invocation to specify the server name
Apparently on some machines if this is not done SSL validation will fail.
Fixes bug #394
2010-10-18 12:00:33 -04:00
Simo Sorce 8f82db0e99 Fix build after file was removed but not eliminated from Makefile.am 2010-10-18 10:53:52 -04:00
Simo Sorce 0c6980bed6 Remove ipa-memberof, memberof plugin is now included in 389 DS 2010-10-15 18:05:56 -04:00
Simo Sorce e304f0436b Avoid writing customized perl scripts in /usr
Keep instance specific data in /var/lib/dirsrv
2010-10-14 14:10:32 -04:00
Simo Sorce 7a14767f1a dsinstance: avoid exposing passwords when invoking ldappaswd
Pass passwords to ldappasswd by using files.
Replace use of mozldap's ldappaswd with openldap's one.
2010-10-14 14:10:32 -04:00
Simo Sorce 2e17649aae Update .po/.pot files and add Spanish and Polish transalations 2010-10-13 14:35:35 -04:00
Simo Sorce cf21396345 Update .po[t] files after adding C files for translation 2010-10-12 15:46:27 -04:00
Simo Sorce b735fc8d17 Initial gettext support for C utils
Add automatic creation of python an C file lists for potfiles
Deletes useless copy of Makefile in install/po
Remove duplicate maintainer-clean target
Add debug target that prints file lists
Unbreak update-po target, merges in patch from John
2010-10-12 15:46:27 -04:00
Simo Sorce f9c0eb5222 Remove Makefile from git, this file is autogenerated 2010-10-12 15:46:27 -04:00
Simo Sorce 016f889a51 Improve logging facilities
Provide simplified logging macros that appropriately use __func__ __FILE__,
__LINE__, or the plugin name depending on the log level.
2010-10-07 11:23:51 -04:00
Simo Sorce ec33e38e9a pwd-plugin: Fix unresolve symbol
This fixes a har crash when someone tries to fetch a keytab
2010-10-07 11:16:19 -04:00
Simo Sorce 3e98d8ddad install-script: Do not ask to remove DNS data
When we uninstall we wipe out the entire LDAP database, so it doesn't really
make mush sense to try to also remove single entries from it.
This avoids the --uninstall procedure to fail because the DM password is not
available or the LDAP server is down, and we are just trying to cleanup
everything.
2010-10-07 07:54:06 -04:00
Simo Sorce 475c064227 When dealing with samba password set also the sambaPwdLastSet
This attribute is required for samba to properly identify a user has changed
it's password and doesn't need to change it again at next login.

At the same time, if we are forcing a pssword reset we also need to let samba
know the user must change its password.
2010-10-07 07:53:36 -04:00
Simo Sorce ceb91a3f71 Always detect openldap and mozldap at the same time
Slapi plugins must use mozldap because 389 ds is compiled against that.
ipa_kpasswd, instead, should be linked against openldap.
So always make sure both are available.
2010-10-07 07:53:36 -04:00
Simo Sorce 6682b63438 pwd-plugin: Remove the correct password from the history
We were mistakenly removeing the latest password from the passwordHistory
once the max history values were reached. Make sure we remove the oldest one
instead.
2010-10-05 08:54:08 -04:00
Simo Sorce 9cd0330e5d Fix ipapwd_start() style
Trun tabs into quartets of spaces. Fit lines to not exceed 80 columns.
2010-10-05 08:54:08 -04:00
Simo Sorce c594ab88ba Add options to control NTLM hashes
By default LM hash is disabled.
Of course generation still depends on whether the SamAccount objectclass is
present in the user object.
2010-10-05 08:54:08 -04:00
Simo Sorce 3b38e74da5 Add Generic config class.
Helps when you need to add random snippets of config that really do not deserve
a full atttribute, but are still something you want to put in LDAP and have
replicated.
2010-10-05 08:54:07 -04:00
Simo Sorce b9c02a50c2 Fix descriptions 2010-10-05 08:54:06 -04:00
Simo Sorce 19d3ba9733 pwd-plugin: format/style changes
Use __func__ in log functions instead of the explicit function name
so that if the function need to be renamed later logs reflect the
change automatically w/o the need to change all occurrences.

Also makes a grep for the function name less noisy avoiding tons of
false positives.
2010-10-05 08:52:43 -04:00
Simo Sorce fea9181eaf pwd-plugin: Remove 14 chars limitation from the NT hash 2010-10-05 08:52:43 -04:00
Simo Sorce 3127df2aee Split ipa_pwd_extop plugin in multiple files
The plugin was getting difficult to read and maintain.
Split it (and apply cosmetic cleanups to some functions) in smaller
pieces that perform specific tasks.
2010-10-01 11:17:40 -04:00
Simo Sorce 4262358111 Fix SASL mappings 2009-11-18 14:26:29 -05:00
Simo Sorce 9fe707a3f2 Basic changes to get a default principal for DNS
Also moves delagation layout installation in dsinstance.
This is needed to allow us to set default membership in
other modules like bindinstance.

Signed-off-by: Martin Nagy <mnagy@redhat.com>
2009-07-10 09:42:22 -04:00
Simo Sorce 24089821fb Check error in kpasswd 2009-07-10 09:42:21 -04:00
Simo Sorce c4ed025001 Fix delegation using the special python-kerberos patch. 2009-01-26 14:44:49 -05:00
Simo Sorce 077d6a0d35 Make KDC listen to TCP port as well by default 2009-01-26 14:44:40 -05:00
Simo Sorce 0fb3f394a5 read_file() was a remnant of the conversion of ldapupdate.py to a library and
is not accessible directly. Use ipautil.template_file, this works.
2009-01-26 14:44:34 -05:00
Simo Sorce 2b8b87b4d6 memberof was not indexed in older versions of fedora-ds, keep it around
as an update so that if it is not there it will be added
2008-12-05 18:18:14 -05:00
Simo Sorce 7c5ae7f402 Fix stupid typo in update file 2008-12-03 12:03:04 -05:00
Simo Sorce 80cc2c3715 Change ipa-compat-manage to work on older python versions too. Break try,except,finally into a try,try,finally,except Add also checks for LDAPError, errors. 2008-12-03 11:17:55 -05:00
Simo Sorce b3b4435d0e One line fix for ipa-server spec file 2008-12-03 11:17:51 -05:00
Simo Sorce d006587937 Adding an index for memberuid. Alsthough we do not use this attribute, many clients still ask for it so let's index it and make stuff faster. 2008-12-02 19:28:51 -05:00
Simo Sorce 0e6928dd1b Forgot to add ipa-compat-manage to the sbin programs 2008-12-02 16:50:21 -05:00
Simo Sorce e0e784f77f Add man page for ipa-compat-manage 2008-12-02 16:39:57 -05:00
Simo Sorce 3fb6343149 Fix makefiles after schema compat changes 2008-12-02 16:39:57 -05:00
Simo Sorce ef0bb46923 Fix typo, thanks to Michele for pointing it out 2008-12-01 17:19:10 -05:00
Simo Sorce 78166d949c Run updates on the replica too, otherwise changes to cn=config will be missing. 2008-12-01 17:19:10 -05:00
Simo Sorce 3a263e9466 Make sure the CA cert is copied to the replica, fail if no ca.crt is available. Cope with some versions of ipa that forgot to copy the ca.crt cert in the right place. 2008-12-01 17:19:10 -05:00
Simo Sorce 5d1d292c15 Add tool to enable or disable the schema compatibility plugin 2008-12-01 17:19:10 -05:00
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
Simo Sorce 818cafdd4d Bump up version number to 1.2.0 2008-11-13 11:20:06 -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
Simo Sorce b4938f5e35 Fix syntax error 2008-09-18 17:23:13 -04:00
Simo Sorce f6cd489909 We were assuming that, if the realm was correct then also the
rest of the krb5.conf configuration were. This clearly breaks
with the default EXAMPLE.COM realm configuratrion. Furthermore
it makes it not possible to try to 'fix' an installation by
rerruninng ipa-client-install

This patch removes the special case and avoids krb5.conf only
if the on_master flag is passed.
Fix also one inner 'if' statement to be simpler to understand.
2008-09-18 17:23:12 -04:00
Simo Sorce bc70a5146f Remove reference to very unlikely service examples that are not
currently kerberized (and may never be due to their nature).
2008-09-18 17:23:12 -04:00
Simo Sorce 57669ba432 Add script to simplify operations to fix CVE 2008 3274
Import all of change master key directly into the help fix,
allows for better control
2008-09-10 15:07:42 -04:00
Simo Sorce 8e7c98eb7f CVE 2008 3274 related fixes 2008-09-10 15:07:33 -04:00
Simo Sorce 89ed5a0277 Add a tool to change the kerberos Master Key in case an admin wants to.
This tool will dump and re-encrypt all keys, then reload and change
the master key in LDAP and in the stash file.
It will also restart the Directory Server and the the KDC
2008-09-10 15:07:26 -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 2846083979 Add 2 features to ipa-getkeytab:
1. Allow to specify the salt type along with the enctype
2. Allow to specify a password instead of forcing a random secret
2008-08-21 11:04:59 -04:00
Simo Sorce 2659fb0eb4 Minor bugs found while testing stuff.
- wrong import in certs.py makes ipa-replica-manage fail
- close the fs after the stash file is written so that the file is updated
  immediately and not when the fd is garbage collected
2008-08-21 11:04:52 -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 cee4b2cc1e Fix usage of mozldap libraries,
thanks to W. Michael Petullo <mike@flyn.org> for finding the problem.
2008-08-13 15:57:43 -04:00
Simo Sorce 44689b93c9 Remove unused stuff. 2008-08-13 15:57:35 -04:00
Simo Sorce afad6d96ae apparently the "configure" target is never used 2008-08-13 15:57:28 -04:00
Simo Sorce f5177e6b84 Install the ca.crt file early on so that we can always enforce SSL
protected connections to other LDAP servers
Fix error reporting on replica creation.
2008-08-13 15:36:57 -04: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 9648da8f5f Fix versioning for configure.ac and ipa-python/setup.py
Fix make maintainer-clean

Also make RPM naming consistent by using a temp RELEASE file.
This one helps when testing builds using rpms.
Just 'echo X > RELEASE' to build a new rpms (X, X+1, X+2 ...)

Version 1.1.0 was released some times ago, bump up to 1.1.1
2008-08-11 18:31:05 -04:00
Simo Sorce 0368d4329a Used the encrypt_file and decrypt_file utility functions to encrypt replica
information. This way we do not risk to leave around sensitive data.
Set the destination host in the replica file too and do checks against
in ipa-replica-install
2008-08-11 18:30:57 -04:00
Simo Sorce 5cbc453d89 Add encrypt_file and decrypt_file utility functions.
We will use them to encrypt the replica file so that we can
transport it over more safely.
It contains sensitive data, by encrypting it we assure that
even if a distracted admin leaves it around it cannot be accessed
without knowing the access passphrase (usually the Directory Manager
password)

Along the way fix also ipautil.run which was buggy and not passing
in correctly stdin.

Add dependency for gnupg in spec file
2008-08-11 18:30:50 -04:00
Simo Sorce 599fe1a0f5 Use larger set from which to choose chars for random passwords.
Use SystemRandom() instead of Random() so that the randomicity
is non-deterministic.
2008-08-11 18:30:40 -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
Simo Sorce 67f62709f8 In openvz we found out some interfaces may return a null pointer here.
Skip them if no address is provided or we later get a segfault because
we dereference a null pointer.
2008-07-15 16:16:33 -04:00
Simo Sorce 4b4e0e1516 fix typo 2008-07-15 16:16:33 -04:00
Simo Sorce 66aa3581fc Make sure we have the right prototypes when using openldap libs 2008-07-09 16:51:18 -04:00
Simo Sorce f86c8420b1 Admin must be able to add/delete too 2008-07-09 16:50:54 -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
Simo Sorce 79df2465a7 After the rework of the code that binds to specific interfaces to
correctly support multihomed server, we need to add a couple of
SELinux lines to the policy file. (lines suggested by Dan Walsh)
2008-07-07 10:01:20 -04:00
Simo Sorce 675df04806 Make sure we listen only on the krb5 port and therefore disable krb4 support 2008-07-02 15:24:36 -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 2dc64eddd4 Fix make all 2008-06-16 14:28:41 -04:00
Simo Sorce 798d345e13 Very ugly fix to configure to make it actually find a
correctly installed slapi-plugin.h file
2008-06-16 13:52:26 -04:00
Simo Sorce d2bd1b29a0 Must index uidnumber and gidnumber and any attribute that dna plugin is going
to generate or that we need to search on.
2008-06-12 19:06:38 -04:00
Simo Sorce 24f0f632b6 Fix uninizialized counter, was causing allocation to fail and command to
return in case any encryption type was explicitly requested
2008-06-12 19:06:30 -04:00