Commit Graph

26 Commits

Author SHA1 Message Date
Rob Crittenden
f2fb6552c9 Make ipa-join work against an LDAP server that disallows anon binds
We determine the realm in the client installer so we can deduce
the base dn, pass that into ipa-join so we don't have to hunt for
it.

Re-order the bind so when doing an OTP enrollment so we can use the host
entry to authenticate before we retrieve the subject base, then initiate
the enrollment.

If ipa-join is called without a basedn it will still attempt to
determine it, but it will fail if anonymous binds are not allowed.

https://fedorahosted.org/freeipa/ticket/1935
2011-10-11 18:26:29 -04:00
Rob Crittenden
a750ccb5a2 Disable reverse lookups in ipa-join and ipa-getkeytab
This prevents broken DNS from causing enrollment problems.

https://fedorahosted.org/freeipa/ticket/1693
2011-08-25 20:38:11 -04:00
Martin Kosek
a1c690cc02 Fix client enrollment
Enable GSSAPI credentials delegation in xmlrpc-c/curl to fix client
enrollment. The unconditional GSSAPI was previously dropped from
curl because of CVE-2011-2192.

https://fedorahosted.org/freeipa/ticket/1452
2011-08-11 22:07:16 +00:00
Rob Crittenden
02df85bb2e Make ipa-client-install error messages more understandable and relevant.
* Check remote LDAP server to see if it is a V2 server
* Replace numeric return values with alphanumeric constants
* Display the error message from the ipa-enrollment extended op
* Remove generic join failed error message when XML-RPC fails
* Don't display Certificate subject base when enrollment fails
* Return proper error message when LDAP bind fails

https://fedorahosted.org/freeipa/ticket/1417
2011-07-19 20:41:54 -04:00
Jan Cholasta
16d1db4996 Fix issues found by Coverity.
tickets 1166, 1167, 1168, 1169
2011-05-09 16:23:40 -04:00
Jan Zeleny
7fe78b4e48 Fixes in ipa-join man page
https://fedorahosted.org/freeipa/ticket/784
https://fedorahosted.org/freeipa/ticket/786
https://fedorahosted.org/freeipa/ticket/787
2011-02-18 10:37:46 -05:00
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
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
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
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
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
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
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
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
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
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
c2f89941ed Initialize XML-RPC structures to fix issues uncovered by MALLOC_PERTURB_
Also re-arrange some code around reading the configuration file. In trying
to eliminate bogus error messages I prevented the file from being read at all.
It isn't a problem when joining with ipa-client (which uses -s) but it wouldn't
work if you don't pass in a server name.
2010-05-06 09:04:49 -06:00
Rob Crittenden
cef30893ec client installation fixes: nscd, sssd min version, bogus join error
- Don't run nscd if using sssd, the caching of nscd conflicts with sssd
- Set the minimum version of sssd to 1.1.1 to pick up needed hbac fixes
- only try to read the file configuration if the server isn't passed in
2010-05-03 13:40:14 -06:00
Rob Crittenden
1d635090cb Use the certificate subject base in IPA when requesting certs in certmonger.
When using the dogtag CA we can control what the subject of an issued
certificate is regardless of what is in the CSR, we just use the CN value.
The selfsign CA does not have this capability. The subject format must
match the configured format or certificate requests are rejected.

The default format is CN=%s,O=IPA. certmonger by default issues requests
with just CN so all requests would fail if using the selfsign CA.

This subject base is stored in cn=ipaconfig so we can just fetch that
value in the enrollment process and pass it to certmonger to request
the right thing.

Note that this also fixes ipa-join to work with the new argument passing
mechanism.
2010-04-23 04:57:40 -06:00
Rob Crittenden
d6a79f9cd8 Add the popt auto-help/usage macro for enhanced help output. 2010-03-02 18:20:13 -05:00
Rob Crittenden
7baafe4f41 Require that the hostname we are joining as is fully-qualified 2010-01-26 10:41:56 -05:00
Rob Crittenden
0dcaea8d16 Add server option to ipa-join so the IPA server can be specified.
This is needed because in the client installer we actually perform the
join before creating the configuration files that join uses. All we need
is the IPA server to join to and we have that from the CLI options so
use that.
2009-11-30 18:12:11 -07:00
Rob Crittenden
34f6cba0c3 Clean up some return values
Because ipa-join calls ipa-getkeytab I'd like to keep the return values in
sync. ipa-join returns the value returned by ipa-getkeytab so in order to
tell what failed the return values need to mean the same things and not
overlap.
2009-11-19 03:07:52 -07:00
Rob Crittenden
416c2a894f Improve debugging, general output, initialize xmlrpc-c properly 2009-10-12 09:37:12 -04:00
Rob Crittenden
d0587cbdd5 Enrollment for a host in an IPA domain
This will create a host service principal and may create a host entry (for
admins).  A keytab will be generated, by default in /etc/krb5.keytab
If no kerberos credentails are available then enrollment over LDAPS is used
if a password is provided.

This change requires that openldap be used as our C LDAP client. It is much
easier to do SSL using openldap than mozldap (no certdb required). Otherwise
we'd have to write a slew of extra code to create a temporary cert database,
import the CA cert, ...
2009-09-24 17:45:49 -06:00