9991ea
From cebfd91869bdc22fa8f72c4e47d32cac73487e45 Mon Sep 17 00:00:00 2001
9991ea
From: Martin Kosek <mkosek@redhat.com>
9991ea
Date: Tue, 1 Apr 2014 16:23:14 +0200
9991ea
Subject: [PATCH] Make ipa-client-automount backwards compatible
9991ea
9991ea
ipa-client-automount calls automountlocation-show command during the
9991ea
process. Unfortunately, FreeIPA commands are forward compatible only
9991ea
and thus fail the installer.
9991ea
9991ea
Similarly to ipa-client-install, call XML-RPC interface directly
9991ea
with version fixed to 2.0 (command was already available at that
9991ea
version) to fix the failure.
9991ea
9991ea
https://fedorahosted.org/freeipa/ticket/4290
9991ea
---
9991ea
 ipa-client/ipa-install/ipa-client-automount | 7 ++++++-
9991ea
 1 file changed, 6 insertions(+), 1 deletion(-)
9991ea
9991ea
diff --git a/ipa-client/ipa-install/ipa-client-automount b/ipa-client/ipa-install/ipa-client-automount
9991ea
index 62531bfe1d923b1705aed1187da6766b54c90a0c..77829b927e8c1772598d1a4e590c3f99977aa8eb 100755
9991ea
--- a/ipa-client/ipa-install/ipa-client-automount
9991ea
+++ b/ipa-client/ipa-install/ipa-client-automount
9991ea
@@ -440,7 +440,12 @@ def main():
9991ea
         except errors.KerberosError, e:
9991ea
             sys.exit('Cannot connect to the server due to ' + str(e))
9991ea
         try:
9991ea
-            api.Command['automountlocation_show'](unicode(options.location))
9991ea
+            # Use the RPC directly so older servers are supported
9991ea
+            result = api.Backend.xmlclient.forward(
9991ea
+                'automountlocation_show',
9991ea
+                unicode(options.location),
9991ea
+                version=u'2.0',
9991ea
+            )
9991ea
         except errors.VersionError, e:
9991ea
             sys.exit('This client is incompatible: ' + str(e))
9991ea
         except errors.NotFound:
9991ea
-- 
9991ea
1.8.5.3
9991ea