Commit Graph

408 Commits

Author SHA1 Message Date
John Dennis
bba4ccb3a0 add session manager and cache krb auth
This patch adds a session manager and support for caching
authentication in the session. Major elements of the patch are:

* Add a session manager to support cookie based sessions which
  stores session data in a memcached entry.

* Add ipalib/krb_utils.py which contains functions to parse ccache
  names, format principals, format KRB timestamps, and a KRB_CCache
  class which reads ccache entry and allows one to extract information
  such as the principal, credentials, credential timestamps, etc.

* Move krb constants defined in ipalib/rpc.py to ipa_krb_utils.py so
  that all kerberos items are co-located.

* Modify javascript in ipa.js so that the IPA.command() RPC call
  checks for authentication needed error response and if it receives
  it sends a GET request to /ipa/login URL to refresh credentials.

* Add session_auth_duration config item to constants.py, used to
  configure how long a session remains valid.

* Add parse_time_duration utility to ipalib/util.py. Used to parse the
  session_auth_duration config item.

* Update the default.conf.5 man page to document session_auth_duration
  config item (also added documentation for log_manager config items
  which had been inadvertantly omitted from a previous commit).

* Add SessionError object to ipalib/errors.py

* Move Kerberos protection in Apache config from /ipa to /ipa/xml and
  /ipa/login

* Add SessionCCache class to session.py to manage temporary Kerberos
  ccache file in effect for the duration of an RPC command.

* Adds a krblogin plugin used to implement the /ipa/login
  handler. login handler sets the session expiration time, currently
  60 minutes or the expiration of the TGT, whichever is shorter. It
  also copies the ccache provied by mod_auth_kerb into the session
  data.  The json handler will later extract and validate the ccache
  belonging to the session.

* Refactored the WSGI handlers so that json and xlmrpc could have
  independent behavior, this also moves where create and destroy
  context occurs, now done in the individual handler rather than the
  parent class.

* The json handler now looks up the session data, validates the ccache
  bound to the session, if it's expired replies with authenicated
  needed error.

* Add documentation to session.py. Fully documents the entire process,
  got questions, read the doc.

* Add exclusions to make-lint as needed.
2012-02-09 13:20:45 -06:00
Ondrej Hamada
f7b4eb6a09 localhost.localdomain clients refused to join
Machines with hostname 'localhost' or 'localhost.localdomain' are
refused from joining IPA domain and proper error message is shown.
The hostname check is done both in 'ipa-client-install' script and in
'ipa-join'.

https://fedorahosted.org/freeipa/ticket/2112
2012-01-22 22:01:40 -05:00
Rob Crittenden
2d6eeb205e Require an HTTP Referer header in the server. Send one in ipa tools.
This is to prevent a Cross-Site Request Forgery (CSRF) attack where
a rogue server tricks a user who was logged into the FreeIPA
management interface into visiting a specially-crafted URL where
the attacker could perform FreeIPA oonfiguration changes with the
privileges of the logged-in user.

https://bugzilla.redhat.com/show_bug.cgi?id=747710
2011-12-12 17:36:45 -05:00
Alexander Bokovoy
790ffc42a8 Check through all LDAP servers in the domain during IPA discovery
When discovering IPA LDAP servers through DNS records, look through all
servers found until first success. A master might be not available or
denied access but replica may succeed.

Ticket #1827
https://fedorahosted.org/freeipa/ticket/1827
2011-12-09 00:19:57 -05:00
Ondrej Hamada
005b74d869 Client install checks for nss_ldap
In order to check presence of nss_ldap or nss-pam-ldapd when installing
client with '--no-sssd' option there was added code into ipa-client-install.
Checking is based on existence of one of nss_ldap configuration files.
This configuration could be in 'etc/ldap.conf', '/etc/nss_ldap.conf' or
'/etc/libnss_ldap.conf'. Optionaly the nss_ldap could cooperate with
pam_ldap module and hence the presence of it is checked by looking for
'pam_ldap.conf' file. Existence of nss-pam-ldapd is checked against
existence of 'nslcd.conf' file. All this checking is done by function
nssldap_exists(). Because both modules are maintained by two different
functions, the function returns tuple containing return code and dictionary
structure - its key is name of target function and value is list of existing
configuration files. Files to check are specified inside the
nssldap_exists() function. nssldap_exists() also returns True if any of
the mandatory files was found, otherwise returns False.

In order to fit the returned values, the functions
configure_{ldap|nslcd}_conf() were slightly modified. They accept one more
parameter which is list of existing files.  They are not checking existence
of above mentioned files anymore.

https://fedorahosted.org/freeipa/ticket/2063
2011-12-05 22:53:04 -05:00
Martin Kosek
216505d2a0 Fix coverity issues in client CLI tools
This patch fixes 2 coverity issues:
 * ipa-client/config.c: CID 11090: Resource leak
 * ipa-client/ipa-getkeytab.c: CID 11018: Unchecked return value

https://fedorahosted.org/freeipa/ticket/2035
2011-11-23 00:30:41 -05:00
John Dennis
56401c1abe ticket 2022 - modify codebase to utilize IPALogManager, obsoletes logging
change default_logger_level to debug in configure_standard_logging

add new ipa_log_manager module, move log_mgr there, also export
root_logger from log_mgr.

change all log_manager imports to ipa_log_manager and change
log_manager.root_logger to root_logger.

add missing import for parse_log_level()
2011-11-23 09:36:18 +01:00
Ondrej Hamada
bf57388e54 Client install root privileges check
ipa-client-install was failing and returning traceback when
wasn't run by root. It was caused by logging initialization that
was taking part before the root privileges check. To correct it,
the check was moved before the logging initialization.

https://fedorahosted.org/freeipa/ticket/2123
2011-11-21 09:39:37 +01:00
Alexander Bokovoy
1f9ab4283c Add configure check for libintl.h
There are some distributions which do not provide gettext support within
libc.

For these cases checking for libintl is required.

https://fedorahosted.org/freeipa/ticket/1840
2011-11-16 18:35:19 -05:00
Martin Kosek
bb6e720393 Fix client krb5 domain mapping and DNS
Add Kerberos mapping for clients outside of server domain. Otherwise
certmonger had problems issuing the certificate. Also make sure that
client DNS records on the server are set before certmonger is started
and certificate is requested.

Based on Lars Sjostrom patch.

https://fedorahosted.org/freeipa/ticket/2006
2011-10-21 14:53:12 +02:00
Rob Crittenden
470576a832 If our domain is already configured in sssd.conf start with a new config.
https://fedorahosted.org/freeipa/ticket/1989
2011-10-13 21:24:07 -04:00
Rob Crittenden
814a424a37 Update all LDAP configuration files that we can.
LDAP can be configured in any number of places, we need to update everything
we find.

https://fedorahosted.org/freeipa/ticket/1986
2011-10-13 20:45:06 -04:00
Martin Kosek
d6a1ff9eb6 Fix ipa-client-install -U option alignment 2011-10-14 10:35:15 +02:00
Alexander Bokovoy
8ad4a648a9 Document --preserve-sssd option of ipa-client-install
Add documentation about --preserve-sssd, an ipa-client-install's option to
honor previously available SSSD configuration in case it is not possible to
merge it cleanly with the new one. In this case ipa-client-install will fail
and ask user to fix SSSD config before continuing.

Additional fix for
https://fedorahosted.org/freeipa/ticket/1750
https://fedorahosted.org/freeipa/ticket/1769
2011-10-14 10:30:37 +02:00
Martin Kosek
77cc5e0246 Hostname used by IPA must be a system hostname
Make sure that the hostname IPA uses is a system hostname. If user
passes a non-system hostname, update the network settings and
system hostname in the same way that ipa-client-install does.

This step should prevent various services failures which may not
be ready to talk to IPA with non-system hostname.

https://fedorahosted.org/freeipa/ticket/1931
2011-10-13 00:54:41 -04:00
Alexander Bokovoy
8baec8d06b Refactor authconfig use in ipa-client-install
When certain features are being configured via authconfig, we need to
remember what was configured and what was the state before it so that
during uninstall we restore proper state of the services.

Mostly it affects sssd configuration with multiple domains but also
pre-existing LDAP and krb5 configurations.

This should fix following tickets:
https://fedorahosted.org/freeipa/ticket/1750
https://fedorahosted.org/freeipa/ticket/1769
2011-10-12 19:20:09 -04:00
Martin Kosek
17f247d6c2 ipa-client-install hangs if the discovered server is unresponsive
Add a timeout to the wget call to cover a case when autodiscovered
server does not response to our attempt to download ca.crt. Let
user specify a different IPA server in that case.

https://fedorahosted.org/freeipa/ticket/1960
2011-10-12 00:50:22 -04:00
Jan Cholasta
592bf62161 Remove more redundant configuration values from krb5.conf.
ticket 1358
2011-10-11 22:00:50 -04:00
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
Alexander Bokovoy
59c2e0fbd1 Increase number of 'getent passwd attempts' to 10
During ipa-client-install SSSD is not always started up properly for some
reason, things like "getent passwd admin" do not work.  This is particulary
true for large setups where admin is included in a large set of groups.

https://fedorahosted.org/freeipa/ticket/1774
2011-10-11 10:36:45 +02:00
Martin Kosek
af63731363 Make sure ipa-client-install returns correct error code
https://fedorahosted.org/freeipa/ticket/1937
2011-10-07 15:23:17 +02:00
Alexander Bokovoy
acb2c3106a Before kinit, try to sync time with the NTP servers of the domain we are joining
When running ipa-client-install on a system whose clock is not in sync
with the master, kinit fails and enrollment is aborted. Manual checking
of current time at the master and adjusting on the client-to-be is then
needed.

The patch tries to fetch SRV records for NTP servers of the domain we aim
to join and runs ntpdate to get time synchronized. If no SRV records are
found, sync with IPA server itself.  If that fails, warn that time might
be not in sync with KDC.

https://fedorahosted.org/freeipa/ticket/1773
2011-10-06 05:16:41 -04:00
Martin Kosek
185ca8f6fc Install tools crash when password prompt is interrupted
When getpass.getpass() function is interrupted via CTRL+D, EOFError
exception is thrown. Most of the install tools are not prepared for
this event and crash with this exception. Make sure that it is
handled properly and nice error message is printed.

https://fedorahosted.org/freeipa/ticket/1916
2011-10-06 08:28:15 +02:00
Alexander Bokovoy
c76bbd5129 Fix 'referenced before assignment' warning 2011-10-05 15:04:12 +02:00
Alexander Bokovoy
f93d71409a Setup and restore ntp configuration on the client side properly
When setting up the client-side NTP configuration, make sure that /etc/ntp/step-tickers
point to IPA NTP server as well.
When restoring the client during ipa-client-install --uninstall, make sure NTP configuration
is fully restored and NTP service is disabled if it was disabled before the installation.

https://fedorahosted.org/freeipa/ticket/1770
2011-10-05 12:52:40 +02:00
Jan Cholasta
12bfed37d4 Add a function for formatting network locations of the form host:port for use in URLs.
If the host part is a literal IPv6 address, it must be enclosed in square
brackets (RFC 2732).

ticket 1869
2011-10-05 10:58:25 +02:00
Alexander Bokovoy
fb79c50b39 Configure pam_krb5 on the client only if sssd is not configured
https://fedorahosted.org/freeipa/ticket/1775
2011-10-04 17:00:37 +02:00
Martin Kosek
00cffce6c2 ipa-client assumes a single namingcontext
When LDAP server contains more that one suffixes, the ipa client
installation does not detect it as IPA server and fails to install.
Fix ipa server discovery so that it correctly searches all naming
contexts for the IPA one.

https://fedorahosted.org/freeipa/ticket/1868
2011-09-30 16:53:59 +02:00
Simo Sorce
8f2e333395 ipa-client-install: Fix joining when LDAP access is restricted
Fixes: https://fedorahosted.org/freeipa/ticket/1881
2011-09-30 16:42:30 +02:00
Marko Myllynen
6c9b6548cc Don't remove /tmp when removing temp cert dir
If /tmp happens to be empty os.removedirs() happily removes it...

https://fedorahosted.org/freeipa/ticket/1843
2011-09-22 22:02:54 -04:00
Rob Crittenden
4487a9564b Don't log one-time password in logs when configuring client.
https://fedorahosted.org/freeipa/ticket/1801
2011-09-23 15:31:45 +02:00
Marko Myllynen
45aa801952 include <stdint.h> for uintptr_t 2011-09-22 09:42:11 -04:00
Jan Cholasta
7854d8166e Fix client install on IPv6 machines.
ticket 1804
2011-09-19 18:11:24 +02:00
Alexander Bokovoy
45e379d5bf Convert client-side tools to platform-independent access to system services
https://fedorahosted.org/freeipa/ticket/1605
2011-09-13 11:15:31 +02:00
Martin Kosek
d0ce604b4d Fix permissions in installers
Fix permissions for (configuration) files produced by
ipa-server-install or ipa-client-install. This patch is needed
when root has a umask preventing files from being world readable.

https://fedorahosted.org/freeipa/ticket/1644
2011-09-07 13:02:43 +02:00
Martin Kosek
95beb84464 Improve ipa-join man page
Make it clear in man pages that ipa-join -u does not remove keytab.

https://fedorahosted.org/freeipa/ticket/1317
2011-09-07 12:59:29 +02:00
Martin Kosek
dc3d0f3879 Improve man pages structure
There are too many options in ipa-*-install scripts which makes it
difficult to read. This patch adds subsections to install script
online help and man pages to improve readability. No option has
been changed.

To further improve man pages:

1) All man pages were changed to have the same header and top-center
   title to provide united look.

2) Few typos in man pages have been fixed

https://fedorahosted.org/freeipa/ticket/1687
2011-09-07 12:55:12 +02:00
Rob Crittenden
ad717bff3c Roll back changes if client installation fails.
If the client installer fails for some reason and --force was not used
then roll back the configuration.

This is needed because we touch /etc/sysconfig/network early in the
configuration and if it fails due to any number of issues (mostly related
to authentication) it will not be reset. We may as well run through the
entire uninstall process to be sure the system has been reset.

https://fedorahosted.org/freeipa/ticket/1704
2011-08-29 17:18:19 -04:00
Martin Kosek
64c100947b ipa-client-install breaks network configuration
Do not forget to add new line in updated /etc/sysconfig/network
configuration. Move the actual change of the hostname after the
user confirmation about proceeding with installation. It confused
users when the hostname change occurred before this prompt.

https://fedorahosted.org/freeipa/ticket/1724
2011-08-29 10:39:19 +02: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
Simo Sorce
e261c55626 Fix build warnings
Some are actual bugs.
2011-08-26 08:24:48 -04:00
Jan Cholasta
1ec531469e Make sure messagebus is running prior to starting certmonger.
ticket 1580
2011-08-18 20:15:48 -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
Alexander Bokovoy
e6d061224e Ensure network configuration file has proper permissions
As network configuration file is created as temporary file, it has stricter permissions than
we need for the target system configuration file. Ensure permissions are properly reset before
installing file.

If permissions are not re-set, system may have no networking enabled after reboot.

https://fedorahosted.org/freeipa/ticket/1606
2011-08-10 16:32:05 +02:00
Alexander Bokovoy
d6875b9adc Make proper LDAP configuration reporting for ipa-client-install
Ticket https://fedorahosted.org/freeipa/ticket/1369
2011-07-28 21:25:53 -04:00
Alexander Bokovoy
a22d00234f Modify /etc/sysconfig/network on a client when IPA manages hostname
https://fedorahosted.org/freeipa/ticket/1368
2011-07-29 16:26:34 +02:00
Jan Cholasta
9e7a3e7f3c Make sure that hostname specified by user is not an IP address.
ticket 1375
2011-07-25 01:47:52 -04: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
Alexander Bokovoy
1b4aaf5756 Fix sssd.conf to always have IPA certificate for the domain.
Fixes https://fedorahosted.org/freeipa/ticket/1476

SSSD will need TLS for checking if ipaMigrationEnabled attribute is set
Note that SSSD will force StartTLS because the channel is later used for
authentication as well if password migration is enabled. Thus set the option
unconditionally.
2011-07-18 19:42:04 -04:00
Rob Crittenden
ba1575772c Change client enrollment principal prompt to hopefully be clearer.
ticket https://fedorahosted.org/freeipa/ticket/1449
2011-07-19 08:43:45 +02:00
Alexander Bokovoy
824ec7e3a2 Rearrange logging for NSCD daemon.
https://fedorahosted.org/freeipa/ticket/1373

When SSSD is in use, we actually trying to disable NSCD daemon. Telling
that we failed to configure automatic _startup_ of the NSCD is wrong then.
2011-07-18 08:03:09 -04:00
Jan Cholasta
1c5028c17d Configure SSSD to store user password if offline.
ticket 1359
2011-07-14 19:26:25 -04:00
Jan Cholasta
f05141e646 Remove redundant configuration values from krb5.conf.
ticket 1358
2011-06-28 01:10:06 -04:00
Rob Crittenden
d0af8b28d7 On a master configure sssd to only talk to the local master.
Otherwise it is possible for sssd to pick a different master to
communicate with via the DNS SRV records and if the remote master
goes down the local one will have problems as well.

ticket https://fedorahosted.org/freeipa/ticket/1187
2011-06-21 16:07:06 +02:00
Martin Kosek
e773124474 Fix support for nss-pam-ldapd
Client installation with --no-sssd option was broken if the client
was based on a nss-pam-ldap instead of nss_ldap. The main issue is
with authconfig rewriting the nslcd.conf after it has been
configured by ipa-client-install.

This has been fixed by changing an order of installation steps.
Additionally, nslcd daemon needed for nss-pam-ldap function is
correctly started.

https://fedorahosted.org/freeipa/ticket/1235
2011-06-08 10:00:27 +02:00
Rob Crittenden
7a867102c5 Properly configure nsswitch.conf when using the --no-sssd option.
Even with --no-sssd authconfig was setting nsswitch.conf to use sssd
for users, groups, shadow and netgroups. We need to pass in the
--enableforcelegacy option hwen configuring nss_ldap.

Also always back up and restore sssd.conf. It still gets configured for
kerberos.

ticket 1142
2011-05-18 13:19:06 +02:00
Martin Kosek
95b4040f6b KDC autodiscovery may fail when domain is not realm
When ipa-client-install autodiscovers IPA server values it
doesn't fill the fixed KDC address to Kerberos configuration
file. However, when realm != domain or the autodiscovered values
are overridden, installation may fail because it cannot find the
KDC.

This patch adds a failover to use static KDC address in case when
such an issue occurs.

https://fedorahosted.org/freeipa/ticket/1100
2011-05-17 08:56:22 +02:00
Martin Kosek
2cbc6fd6a2 Improve service manipulation in client install
Remove redundant ipa-client-install error message when optional nscd
daemon was not installed. Additionally, use standard IPA functions
for service manipulation and improve logging.

https://fedorahosted.org/freeipa/ticket/1207
2011-05-13 13:24:35 +02:00
Martin Kosek
9de10f3674 Consolidate man pages and IPA tools help
IPA tools options are not consistent with information in man
pages.

https://fedorahosted.org/freeipa/ticket/1163
https://fedorahosted.org/freeipa/ticket/1178
2011-05-12 16:55:27 -04:00
Jan Cholasta
16d1db4996 Fix issues found by Coverity.
tickets 1166, 1167, 1168, 1169
2011-05-09 16:23:40 -04:00
Simo Sorce
d1fd695467 install-scripts: avoid using --list with chkconfig
This option does not behave properly in F15 as chkconfig does not list services
moved to use systemd service files.

Plus there are more direct ways than parsing its output, which are more
reliable.

Also just testing for the availability of the service calling 'chkconfig name'
is enough.

https://fedorahosted.org/freeipa/ticket/1206
2011-05-06 15:46:41 +02:00
Martin Kosek
e90120bdcb Bad return values for ipa-rmkeytab command
ipa-rmkeytab returns success even when the realm passed to the
program is not found in a keytab. This patch adds an explanatory
error message and returns error code 5 - Principal or realm not
found.

https://fedorahosted.org/freeipa/ticket/694
2011-05-03 15:19:07 +02:00
Martin Kosek
c6763d0a58 ipa-client-install uninstall does not work on IPA server
When IPA server is being uninstalled, IPA client on-master
uninstallation which is called by the script fails.

https://fedorahosted.org/freeipa/ticket/1197
2011-04-29 16:32:59 -04:00
Martin Kosek
2e99c60c8b Forbid reinstallation in ipa-client-install
The --force option may be misused to reinstall an existing IPA
client. This is not supported and may lead to unexpected errors.
When required, the cleanest way to re-install IPA client is to
run uninstall and then install again.

This patch also includes few cosmetic changes in messages to user
to provide more consistent user experience with the script.

https://fedorahosted.org/freeipa/ticket/1117
2011-04-29 09:28:37 +02:00
Martin Kosek
d76b9aef39 Prevent uninstalling client on the IPA server
This patch prevents uninstalling IPA client when it is configured
as a part of IPA server. ipa-server-installation script is advised
for this situation.

https://fedorahosted.org/freeipa/ticket/1049
2011-04-29 09:23:59 +02:00
Martin Kosek
8472dc26b7 Log temporary files in ipa-client-install
This patch adds logging of temporary files (Kerberos configuration,
nsupdate commands) that may be very useful for debugging purposes.

https://fedorahosted.org/freeipa/ticket/1093
https://fedorahosted.org/freeipa/ticket/1094
2011-04-28 10:02:18 +02:00
Jan Cholasta
1ac3ed2c27 Fix lint false positives. 2011-04-13 15:58:45 +02:00
Rob Crittenden
811f631c09 Suppress --on-master from ipa-client-install command-line and man page.
This option is only used when configuring an IPA client on an IPA server.
Describing it on the command-line will only confuse people so don't
list it as an option.

Ticket 1050
2011-04-12 09:31:56 +02:00
Rob Crittenden
b3a85890ef Make retrieval of the CA during DNS discovery non-fatal.
ticket 1135
2011-03-30 10:03:56 -04:00
Rob Crittenden
15e213d025 Ensure that the system hostname is lower-case.
ticket 1080
2011-03-18 14:54:01 -04:00
Rob Crittenden
a36bc4ee93 Always consider domain and server when doing DNS discovery in client.
When not on master we weren't passing in the user-supplied domain and
server. Because of changes made that require TLS on the LDAP calls
we always need the server name early in the process to retrieve the IPA
CA certificate.

ticket 1090
2011-03-15 11:01:03 -04:00
Rob Crittenden
3735450ab8 If --hostname is provided for ipa-client-install use it everywhere.
If a hostname was provided it wasn't used to configure either
certmonger or sssd. This resulted in a non-working configuration.

Additionally on un-enrollment the wrong hostname was unenrolled, it
used the value of gethostname() rather than the one that was passed
into the installer.

We have to modify the CA configuration of certmonger to make it
use the right principal when requesting certificates. The filename
is unpredicable but it will be in /var/lib/certmonger/cas.
We need to hunt for ipa_submit and add -k <principal> to it, then
undo that on uninstall. These files are created the first time
the certmonger service starts, so start and stop it before messing
with them.

ticket 1029
2011-03-08 10:23:07 -05:00
Rob Crittenden
61d70657ab Always try to stop tracking the server cert when uninstalling client.
stop_tracking() is robust enough to do the right thing if no certificate
exists so go ahead and always call it. If the certificate failed to
be issued for some reason the request will still in certmonger
after uninstalling. This would cause problems when trying to reinstall
the client. This will go ahead and always tell certmonger to stop
tracking it.

ticket 1028
2011-03-08 10:23:03 -05:00
Simo Sorce
998dd701a7 Fix kinit invocation in ipa-client-install 2011-03-01 17:49:45 -05:00
Rob Crittenden
388c9a1705 Add man page for the IPA configuration file
ticket 969
2011-02-23 11:56:31 -05:00
Rob Crittenden
e7ed4035b5 Set krb5_realm in sssd.conf in the ipa provider.
ticket 925
2011-02-22 09:06:58 -05:00
Jr Aquino
32e4914584 18 Use TLS for ipadiscovery during ipa-client-install https://fedorahosted.org/freeipa/ticket/974 2011-02-21 16:09:37 -05:00
Jakub Hrozek
119b8a4ccf Document --enable-dns-updates in ipa-client-install man page
https://fedorahosted.org/freeipa/ticket/991
2011-02-21 11:55:50 -05: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
eab4e36ee5 Try to register DNS name through a DNS Update on install.
Fixes: https://fedorahosted.org/freeipa/ticket/935
2011-02-17 19:43:52 -05:00
Rob Crittenden
cd2365bf64 Configure SSSD to use DNS to find the IPA server by default.
Add the server we registered with as a fallback.

ticket 980
2011-02-17 17:12:42 -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
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
Rob Crittenden
dbd1f50111 Remove Requires on separate package python-krbV in client
We need the configured kerberos realm so we can clean up /etc/krb5.keytab.
We have this already in /etc/ipa/default.conf so use that instead of
requiring a whole other python package to do it.
2010-06-02 14:41:16 -04:00
Rob Crittenden
2876bd11dd Check to see if we are configured before uninstalling.
Allow the --force flag to override on both install and uninstall
2010-05-07 12:02:12 -04:00
Rob Crittenden
3bf7268d74 Add simple test to see if client is already configured
If this ever gets out of sync the user can always remove
/var/lib/ipa-client/sysrestore/*, they just need to understand the
implications.

One potential problem is with certmonger. If you install the client
and then re-install without uninstalling then the subsequent
certificate request by certmonger will fail because it will already
be tracking a certificate in /etc/pki/nssdb of the same nickname and
subject (the old cert).
2010-05-06 15:17:16 -06:00
Rob Crittenden
cd5eddd843 Make calling service and chkconfig tolerant of the service not installed
For example, if nscd is not installed this would throw lots of errors about
not being able to disable it, stop it, etc.
2010-05-06 14:47:25 -06:00
Rob Crittenden
83cb7e75b8 Call certmonger after krb5, avoid uninstall errors, better password handling.
- Move the ipa-getcert request to after we set up /etc/krb5.conf
- Don't try removing certificates that don't exist
- Don't tell certmonger to stop tracking a cert that doesn't exist
- Allow --password/-w to be the kerberos password
- Print an error if prompting for a password would happen in unattended mode
- Still support echoing a password in when in unattended mode
2010-05-06 09:05:30 -06: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
04e9056ec2 Make the installer/uninstaller more aware of its state
We have had a state file for quite some time that is used to return
the system to its pre-install state. We can use that to determine what
has been configured.

This patch:
- uses the state file to determine if dogtag was installed
- prevents someone from trying to re-install an installed server
- displays some output when uninstalling
- re-arranges the ipa_kpasswd installation so the state is properly saved
- removes pkiuser if it was added by the installer
- fetches and installs the CA on both masters and clients
2010-05-03 13:41:18 -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
244870932c Reorder some things in the client installer
- Fetch the CA cert before running certmonger
- Delete entries from the keytab before removing /etc/krb5.conf
- Add and remove the IPA CA to /etc/pki/nssdb
2010-05-03 13:33:08 -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
rcrit
a887922fa9 Add option to enable pam_mkhomedirs in the IPA client installer 2010-03-19 07:58:47 -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
889cf124d8 Update available options and descriptions in client man pages 2010-03-02 18:20:07 -05:00
Rob Crittenden
4e6373cf95 Fix command-line options convention in ipa-getkeytab man page
Resolves #481230
2010-02-19 14:37:17 -05:00
Martin Nagy
a292e9901b Fix a crash and memory leak in get_config_entry() 2010-02-16 10:42:45 -05:00
Rob Crittenden
a10dc1e59c Make sure the incoming data ins't NULL before strduping it 2010-02-10 11:43:29 -07:00
Rob Crittenden
3ff06c498b Configure sssd and certmonger in ipa-client-install
This does a number of things under the hood:

- Use authconfig to enable sssd in nss and pam
- Configure /etc/sssd/sssd.conf to use our IPA provider
- Enable the certmonger process and request a server cert
- join the IPA domain and retrieve a principal. The clinet machine
  *must* exist in IPA to be able to do a join.
- And then undo all this on uninstall
2010-02-03 15:41:02 -05:00
Rob Crittenden
bf63cd30a6 Remove some configuration files we create upon un-installation
This is particularly important for Apache since we'd leave the web
server handling unconfigured locations.
2010-01-28 17:29:18 -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
0b0cd7872f Remove duplicated code
This strange bit of duplication was not surprisingly causing a double-free
2010-01-26 10:39:30 -05:00
Rob Crittenden
2955c955ac Stop looking when removing entries from a keytab.
keytab entries are locked when looping. Temporarily suspend the looping.
2010-01-20 17:02:50 -05:00
Rob Crittenden
bf9d4c5984 Need to supsend looping through the keytab entries when doing a delete. 2009-12-18 05:20:15 -07:00
Rob Crittenden
d08b8858dd Pass on debug option from ipa-client-install to ipa-join 2009-12-09 17:17:08 -05:00
Rob Crittenden
62d40286ac A utility for removing principals from a keytab.
When we un-enroll a client we'll do a bit of cleanup including removing
any principals for the IPA realm from /etc/krb5.keytab.

This removes principals in 2 ways:
- By principal, only entries matching the full principal are removed
- By realm. Any principal for that realm is removed

This does not change the KDC at all, just removes entries from a file
on the client machine.
2009-12-04 16:29:09 -05:00
Rob Crittenden
060662f320 Better LDAP error handling in ipa-client-install 2009-12-01 09:52:14 -07: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
f14f5156d4 Integrate ipa-join and ipa-rmkeytab into the client install/uninstall
This will fetch a keytab on installation and remove it upon uninstallation.
2009-11-25 09:21:34 -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
1d6e23136a Add man page for ipa-join command 2009-10-12 14:50:02 -04: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
Rob Crittenden
d9c54cd83e Clean up additional issues discovered with pylint and pychecker 2009-08-20 09:20:56 -04:00
rcrit
79029e8179 Fix configure with newer auto* and libtool on Fedora-11 2009-07-01 08:51:18 -04:00
Rob Crittenden
44afa977a8 The new admin tool 'ipa' uses a different configuration file, create it. 2009-04-13 14:53:08 -04:00
Rob Crittenden
f2abe05398 Use OpenSSL for SSL instead of the built-in python version. 2009-02-20 10:40:54 -05:00
Rob Crittenden
262ff2d731 Rename ipa-python directory to ipapython so it is a real python library
We used to install it as ipa, now installing it as ipapython. The rpm
is still ipa-python.
2009-02-09 14:35:15 -05:00
Rob Crittenden
2a584ce985 Minor cleanup of configure.ac 2009-02-05 09:32:41 -05:00
Rob Crittenden
d2b1a37aaf Consolidate to a single autogen.sh and remove a redundant make target
Also cheat a little and don't force auto* to require files to exist
2009-02-04 09:04:22 -05:00
Rob Crittenden
4d8a255c06 Fix segfault in ipa-getkeytab
463548
2008-09-24 18:04:28 -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
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
Martin Nagy
828c9b9cdd Delete old mercurial files. 2008-08-15 08:54:37 +02: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
Martin Nagy
f7ca405716 Wrap up the raw_input() to user_input() for convenience and uniformity. 2008-07-23 10:05:06 -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
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
Rob Crittenden
5c916a1cc8 Fix some minor man page issues.
438771
2008-06-04 12:50:13 -04:00
Rob Crittenden
d6f7998fe7 Fix some formatting issues and correct the example.
443009
2008-06-04 11:14:33 -04:00
Rob Crittenden
28008a4bf2 Fix typo and reorder -q|--quiet so it displays nicer. popt isn't putting it on a separate line so moving it up front makes it easier to find.
443014
2008-06-04 11:05:47 -04:00
Rob Crittenden
c58b7a3d7c Move version.py to the common ipa directory instead of being server-based so it can be used by the client tool.
Fix the client tool imports to fail more gracefully.
2008-06-03 22:39:11 -04:00
Rob Crittenden
e935287f6e Try to clear up messages prompting for domain and IPA server when DNS discovery fails to find them. 2008-05-30 15:44:56 -04:00
Simo Sorce
8f082f2d4f Now that admin is in the common users tree make the nss_ldap
configuration look at the specific tree where users are and
not search the full server.
2008-05-29 09:43:08 -04:00
Simo Sorce
53afb67537 Fix the case where domain != lower(REALM)
add the domain to the ipa.conf file for apps that need to know
This should fix a bug in the replica setup
2008-05-29 09:43:00 -04:00
Martin Nagy
2f69e7e18d Change file mode of log files to 600.
446869
2008-05-20 22:43:03 -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
Rob Crittenden
2b05d973a4 Fix typo in ipa-client-install manpage.
446201
2008-05-14 11:41:56 -04:00
Rob Crittenden
92d7f9c28a Make sure all services are stopped during uninstall.
We were just shutting down the KDC if it had been started prior to IPA
installation. We need to stop it in all cases.

And we should restart nscd as it may have made an LDAP connection.

440322
2008-05-14 09:57:09 -04:00
Simo Sorce
a86b1eaeed fix stupid typo,
thanks Nalin for spotting this.
2008-05-10 11:25:31 -04:00
Simo Sorce
5c4b1770c0 On IPA Servers connect to ourselves using localhost,
and avoid searching for KDC servers via DNS, we just connect
to ourselves.
2008-05-08 17:31:19 -04:00
Rob Crittenden
570b71372f Second half of the redoing how the version is managed. 2008-05-07 18:26:03 -04:00
Rob Crittenden
5ad2af3429 Redo the way versioning works in freeIPA.
The file VERSION is now the sole-source of versioning.

The generated .spec files will been removed in the maintainer-clean targets
and have been removed from the repository.

By default a GIT build is done. To do a non-GIT build do:

 $ make TARGET IPA_VERSION_IS_GIT_SNAPSHOT=no

When updating the version you can run this to regenerate the version:

 $ make version-update

The version can be determined in Python by using ipaserver.version.VERSION
2008-05-05 13:53:57 -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
Simo Sorce
298747e15a Make sure we always have the [domain-realm] section or kerberos libs misbheave. 2008-04-22 15:28:42 -04:00
Rob Crittenden
def28f3d5b Become version 1.0.0 2008-04-16 14:29:17 -07:00
Rob Crittenden
ff3ca61f73 Handle exceptions more gracefully on systems with python-ldap 2.2.0
442136
2008-04-14 18:23:29 -04:00
Simo Sorce
24a7cf3714 Fix client discovery and make sure command line options are not overwritten
with discovered options, just verified.
2008-04-09 15:55:46 -04:00
Simo Sorce
70d3717e8b Add --permitted-enctypes command and add it to the man page too 2008-04-08 18:02:42 -04:00
Simo Sorce
c45d58cc3f Make sure we start the NSCD daemon.
It makes a huge difference on clients, if we cache lookups
2008-04-08 14:58:52 -04:00
Simo Sorce
625d9b2de8 - Better defaults for nss_ldap
- Make sure timeouts are not too high, so that machine does not hang if remote
  servers are not reachable
- Make sure root can always login no matter what the status of the ldap
  servers
- use rfc2307bis schema directive
2008-04-01 18:04:59 -04:00