Commit Graph

177 Commits

Author SHA1 Message Date
Simo Sorce
50318b60ee Fix duplicate OIDs
Apparently we forgot to check OID consistency between the schema and the
extensions, and we got duplicates.

Technically the schema was done later but it is easier to change the extensions
OIDs than to change the schema of current beta2/rc1 installations.

The only side effect is that older ipa-getkeytab and ipa-join binaries will
fail. So all the admin/client tools must be upgraded at the same time as well
as all the masters (otherwise some will show/accept the new OID while others
won't).

Fixes: https://fedorahosted.org/freeipa/ticket/976
2011-02-17 08:38:53 -05:00
Jan Zeleny
5f317ab680 Fix a typo in ipa-client-install man page
https://fedorahosted.org/freeipa/ticket/782
2011-02-15 15:41:19 -05:00
Jr Aquino
72e315c936 Bugfix for ipa-client-install echo's password in cleartext to stdout https://fedorahosted.org/freeipa/ticket/959 2011-02-14 15:43:18 -05:00
Martin Kosek
309ed42865 Detection of v1 server during ipa-client-install
When v2 IPA client is trying to join an IPA v1 server
a strange exception is printed out to the user. This patch
detects this by catching an XML-RPC error reported by ipa-join
binary called in the process which fails on unexisting IPA server
'join' method.

https://fedorahosted.org/freeipa/ticket/553
2011-02-14 15:03:32 -05:00
Jakub Hrozek
22c3a681da Fine tuning DNS options
Add pointer to self to /etc/hosts to avoid chicken/egg problems when
restarting DNS.

On servers set both dns_lookup_realm and dns_lookup_kdc to false so we don't
attempt to do any resolving. Leave it to true on clients.

Set rdns to false on both server and client.

https://fedorahosted.org/freeipa/ticket/931
2011-02-14 14:45:22 -05:00
Jakub Hrozek
856d890bb3 Make sure only root can run ipa-client-install
https://fedorahosted.org/freeipa/ticket/957
2011-02-14 10:43:56 -05:00
Rob Crittenden
fd50d9e900 nscd should be disabled before sssd is configured/started.
If not then sssd spits out a warning message:

sssd: nscd socket was detected.  As nscd caching capabilities may conflict
with SSSD, it is recommended to not run nscd in parallel with SSSD

Stop nscd before configuring sssd so we don't confuse our users.

ticket 743
2011-02-10 13:50:47 -05:00
Rob Crittenden
e6d3b7031d Fix prompt for confirmation of fixed values wrapping around terminal.
ticket 940
2011-02-10 13:50:06 -05:00
Jakub Hrozek
a3a154d915 Fix filter_keys in ipa-getkeytab
https://fedorahosted.org/freeipa/ticket/723
2011-01-28 11:44:38 -05:00
Rob Crittenden
80e87e75bd Add an option for overriding the hostname value.
Ticket 834
2011-01-26 15:53:41 -05:00
Rob Crittenden
35f2f1d720 Improve output when options are not found in non-interactive client install
We should still give some feedback when things go wrong when in
non-interactive mode.

ticket 828
2011-01-21 13:47:55 -05:00
Simo Sorce
8a6547943f Do not try to dereference bindpw if it is null
Fixes: https://fedorahosted.org/freeipa/ticket/783
2011-01-18 11:56:03 -05:00
Martin Kosek
bd965c92d8 Mozldap-specific code removed
Mozldap code removed from all sources and configure source script.
Now, IPA will compile even when package mozldap-devel is not
installed on the system.

https://fedorahosted.org/freeipa/ticket/756
2011-01-14 17:33:11 -05:00
Martin Kosek
a6a91e5dbc Unitialized pointer read in ipa-join
This patch fixes a possible situation when krb5_kt_close()
function is called with uninitialized keytab parameter.

https://fedorahosted.org/freeipa/ticket/712
2011-01-14 14:20:57 -05:00
Martin Kosek
7b5601eeb5 Potential memory leaks in ipa-getkeytab
This patch fixes 2 situations where a pointer to allocated error
string could be overwritten - which could have resulted in
a memory leak.

https://fedorahosted.org/freeipa/ticket/714
2011-01-14 14:20:57 -05:00
Martin Kosek
974287895e Unchecked return values in ipa-join
krb5_get_default_realm() and asprintf() return values were ignored.
This could lead to unhandled error issues or memory access
issues.

This patch adds return value checks to all such functions.
As a consequence, one new return value has been added to man page.

https://fedorahosted.org/freeipa/ticket/720
2011-01-12 11:31:26 -05:00
Martin Kosek
b739df4c11 Unchecked return value in ipa-getkeytab
krb5_init_context return value was not checked. This could lead
to unhandled error issues.

This patch moves the Kerberos context initialization to the
branch where it is needed and handles the error value in a way
that allows program exit in a standard way deallocating all
resources.

https://fedorahosted.org/freeipa/ticket/721
2011-01-12 11:29:19 -05:00
Martin Kosek
e2d4e9477e Uninitialized pointer read in ipa-rmkeytab
Fix "--realm" parameter processing in ipa-rmkeytab. Also make sure
that memory allocated in this process is also freed.

https://fedorahosted.org/freeipa/ticket/711
2011-01-12 11:28:25 -05:00
Martin Kosek
6503813608 Use of pointer after free in ipa-join
In some cases recently freed memory was used/freed again. This
patch introduces more consistency between functions
join_ldap/join_krb5 when dealing with affected variables.

https://fedorahosted.org/freeipa/ticket/709
2011-01-12 11:20:42 -05:00
Rob Crittenden
a1188d95e8 Better detection when not working with a real keytab in ipa-rmkeytab.
Resolving the keytab isn't enough, this just creates a name. Try to
create a cursor into the keytab to see if it is a valid keytab.

ticket 654
2011-01-07 05:15:37 -05:00
Jakub Hrozek
8a9fdbfb03 Do not use LDAP_DEPRECATED in plugins
Remove the LDAP_DEPRECATED constant and do not use functions that are
marked as deprecated in recent OpenLDAP releases. Also always define
WITH_{MOZLDAP,OPENLDAP} since there are conditional header includes that
depend on that constant.

https://fedorahosted.org/freeipa/ticket/576
2011-01-07 05:00:44 -05:00
Jakub Hrozek
7493d781df Change FreeIPA license to GPLv3+
The changes include:
 * Change license blobs in source files to mention GPLv3+ not GPLv2 only
 * Add GPLv3+ license text
 * Package COPYING not LICENSE as the license blobs (even the old ones)
   mention COPYING specifically, it is also more common, I think

 https://fedorahosted.org/freeipa/ticket/239
2010-12-20 17:19:53 -05:00
Gowrishankar Rajaiyan
018ca2ce3f Fixing typos in man page of ipa-getkeytab 2010-12-20 10:56:31 -05:00
Nalin Dahyabhai
b683c7261b build tweaks - use automake's foreign mode, avoid creating empty files to satisfy gnu mode - run autoreconf -f to ensure that everything matches 2010-11-29 11:39:55 -05:00
Jakub Hrozek
960fc66447 ipa-client code cleanup
Fixes errors about implicit function declaration and moves duplicated
gettext code into a common module. Also silences some warnings.

Signed-off-by: Simo Sorce <ssorce@redhat.com>
2010-11-22 16:01:35 -05:00
Jakub Hrozek
110397f059 Don't use deprecated ldap_bind_s
ldap_bind_s is marked as deprecated in new libldap releases.

Signed-off-by: Simo Sorce <ssorce@redhat.com>
2010-11-22 16:01:35 -05:00
Jakub Hrozek
3b7a86024b Use internal implementation of internal Kerberos functions
Don't use KRB5_PRIVATE.

The patch implements and uses the following krb5 functions that are
otherwise private in recent MIT Kerberos releases:
 * krb5_principal2salt_norealm
 * krb5_free_ktypes

Signed-off-by: Simo Sorce <ssorce@redhat.com>
2010-11-22 16:01:35 -05:00
Jakub Hrozek
ce75d1c6d6 Stricter compilation flags
Use a little stricter compilation flags, in particular -Wall and treat
implicit function declarations as errors.

Signed-off-by: Simo Sorce <ssorce@redhat.com>
2010-11-22 16:01:35 -05:00
Rob Crittenden
f6b094156d Handle wget failures trying to retrieve the CA during the client install
ticket 405
2010-11-22 14:47:15 -05:00
Jakub Hrozek
57e1edd052 Use sys.exit to quit scripts
Instead of print and return, use sys.exit() to quit scripts with an
error message and a non zero return code.

https://fedorahosted.org/freeipa/ticket/425
2010-11-22 09:51:07 -05:00
Jan Zeleny
cbddbc2fbb Use provided domain name for the rest of installation
When installing IPA client, the install script used detected domain name
of the machine instead of that given by administrator (in case one was
given)

https://fedorahosted.org/freeipa/ticket/363
2010-11-19 14:05:22 -05:00
Jakub Hrozek
d9dd838014 Log interactive options in install scripts 2010-11-19 13:53:09 -05:00
Simo Sorce
74ba0cc7c1 Use Realm as certs subject base name
Also use the realm name as nickname for the CA certificate
2010-11-18 15:09:31 -05:00
Jakub Hrozek
594adb9877 Log script options to logfile
Uses a new subclass IPAOptionParser in scripts instead of OptionParser
from the standard python library. IPAOptionParser uses its own IPAOption
class to store options, which adds a new 'sensitive' attribute.

https://fedorahosted.org/freeipa/ticket/393
2010-11-09 13:28:10 -05:00
Rob Crittenden
9afedcb683 Error out when configure finds missing dependencies
ticket 315
2010-10-26 15:39:43 -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
Rob Crittenden
81fe26bdcf Add missing options to ipa-getkeytab man page.
ticket 229
2010-10-11 22:35:47 -04:00
Rob Crittenden
3d3197b11a Don't do autodiscovery on master install.
If we pass in the domain and server to ipa-client-install it doesn't do
service discovery which is what we want. We want to be sure the server
is properly configured at install time.
2010-09-23 16:12:11 -04:00
Rob Crittenden
2a85755968 Add minimal client configuration for when we eventually get to PKINIT
Also move the unenroll to clients only. This isn't necessary on the master

ticket 53
2010-09-23 12:03:11 -04:00
Rob Crittenden
6de0834fca Unenroll the client from the IPA server on uninstall.
Unenrollment means that the host keytab is disabled on the server making
it possible to re-install on the client. This host principal is how we
distinguish an enrolled vs an unenrolled client machine on the server.

I added a --unroll option to ipa-join that binds using the host credentials
and disables its own keytab.

I fixed a couple of other unrelated problems in ipa-join at the same time.

I also documented all the possible return values of ipa-getkeytab and
ipa-join. There is so much overlap because ipa-join calls ipa-getkeytab
and it returns whatever value ipa-getkeytab returned on failure.

ticket 242
2010-09-20 16:07:42 -04:00
Rob Crittenden
74e5d8c2af Better distinguish between when DNS discovery works and search more domains.
Passing domain and server on the command-line used to be considered as
DNS autodiscovery worked. This was problematic if there was in fact no
SRV records because krb5.conf would be configured without a specific KDC
causing all Kerberos ops to fail.

Now if you pass in a domain/server it still tries to see if they are
discoverable and if so won't hardcode a server, but will fall back to doing
so if necessary.

Also be a lot more aggressive on looking for the SRV records. Use the
search and domain values from /etc/resolv.conf on the chance that the
SRV records aren't in the domain of the hostname of the machine.

An example of this would be if your laptop is in dhcp.example.com and
your company's SRV records are in corp.example.com. Searching
dhcp.example.com and example.com won't find the SRV records but the user
is likely to have corp.redhat.com in the search list, at least.

ticket 234
2010-09-20 16:04:30 -04:00
Rob Crittenden
4f37775db7 Use a more specific name for the IPA server certificate we install.
This should avoid conflicts with any other certs that might be installed
there.

ticket 49
2010-09-17 17:21:43 -04:00
Rob Crittenden
67a4549519 Remove some additional instances of krbV from ipa-client
Make two krbV imports conditional. These aren't used during a client
install so should cause no problems.

Also fix the client installer to use the new env option in ipautil.run.
We weren't getting the krb5 configuration set in the environment because
we were overriding the environment to set the PATH.

ticket 136
2010-09-10 17:04:01 -04:00
Rob Crittenden
f87bd57c1d Fix certmonger errors when doing a client or server uninstall.
This started with the client uninstaller returning a 1 when not installed.
There was no way to tell whether the uninstall failed or the client
simply wasn't installed which caused no end of grief with the installer.

This led to a lot of certmonger failures too, either trying to stop
tracking a non-existent cert or not handling an existing tracked
certificate.

I moved the certmonger code out of the installer and put it into the
client/server shared ipapython lib. It now tries a lot harder and smarter
to untrack a certificate.

ticket 142
2010-09-09 16:38:52 -04:00
Rob Crittenden
ea76d8c59a Configure nslcd and a host of possible systems that use LDAP.
We will update any/all of /etc/ldap.conf, /etc/nss_ldap.conf,
/etc/libnss-ldap.conf and /etc/pam_ldap.conf.

nslcd is the replacement for nss_ldap.

ticket 50
2010-08-27 09:50:50 -04:00
Adam Young
05501e54f1 ldap_initialize
the code was calling ldap_init, which is a deprecated function, and getting a compilation warning.  This version uses the recommended function ldap_initilaize.
2010-08-20 09:47:54 -04:00
Adam Young
cee78ed04d const correctness
made the data type for server consistant and correct across its usage
2010-08-20 09:47:42 -04:00
Rob Crittenden
2f4f9054aa Enable a host to retrieve a keytab for all its services.
Using the host service principal one should be able to retrieve a keytab
for other services for the host using ipa-getkeytab. This required a number
of changes:

- allow hosts in the service's managedby to write krbPrincipalKey
- automatically add the host to managedby when a service is created
- fix ipa-getkeytab to return the entire prinicpal and not just the
  first data element. It was returning "host" from the service tgt
  and not host/ipa.example.com
- fix the display of the managedby attribute in the service plugin

This led to a number of changes in the service unit tests. I took the
opportunity to switch to the Declarative scheme and tripled the number
of tests we were doing. This shed some light on a few bugs in the plugin:

- if a service had a bad usercertificate it was impossible to delete the
  service. I made it a bit more flexible.
- I added a summary for the mod and find commands
- has_keytab wasn't being set in the find output

ticket 68
2010-08-16 17:13:56 -04:00
Rob Crittenden
4ca95a0cbf Retrieve the CA certificate before starting enrollment.
We need the CA certificate so we can use SSL when binding with a
one-time password (bulk enrollment)
2010-06-21 09:52:15 -04:00
Rob Crittenden
ebab635250 Drop --with-openldap option in the client. This is no longer optional. 2010-06-21 09:52:11 -04:00