URL: https://github.com/freeipa/freeipa/pull/699
Author: neffs
 Title: #699: Fix libkrb5 filename for macOS
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/699/head:pr699
git checkout pr699
From ad835186c4b799363110522407e3a3cd993d6194 Mon Sep 17 00:00:00 2001
From: David Kreitschmann <da...@kreitschmann.de>
Date: Fri, 7 Apr 2017 14:02:46 +0200
Subject: [PATCH 1/2] Fix libkrb5 filename for macOS

Signed-off-by: David Kreitschmann <da...@kreitschmann.de>
---
 ipapython/session_storage.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ipapython/session_storage.py b/ipapython/session_storage.py
index 1443413..92e9825 100644
--- a/ipapython/session_storage.py
+++ b/ipapython/session_storage.py
@@ -7,9 +7,12 @@
 
 KRB5_CC_NOSUPP = -1765328137
 
+LIBKRB5_FILENAME = 'libkrb5.so.3'
+if platform.system()=="Darwin":
+    LIBKRB5_FILENAME = 'libkrb5.dylib'
 
 try:
-    LIBKRB5 = ctypes.CDLL('libkrb5.so.3')
+    LIBKRB5 = ctypes.CDLL(LIBKRB5_FILENAME)
 except OSError as e:  # pragma: no cover
     raise ImportError(str(e))
 

From 4257af46f8b18f874e3e416b449c931e267ef5d9 Mon Sep 17 00:00:00 2001
From: David Kreitschmann <da...@kreitschmann.de>
Date: Fri, 7 Apr 2017 15:02:05 +0200
Subject: [PATCH 2/2] Fix PEP8 error

Signed-off-by: David Kreitschmann <da...@kreitschmann.de>
---
 ipapython/session_storage.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipapython/session_storage.py b/ipapython/session_storage.py
index 92e9825..ac5682e 100644
--- a/ipapython/session_storage.py
+++ b/ipapython/session_storage.py
@@ -8,7 +8,7 @@
 KRB5_CC_NOSUPP = -1765328137
 
 LIBKRB5_FILENAME = 'libkrb5.so.3'
-if platform.system()=="Darwin":
+if platform.system() == "Darwin":
     LIBKRB5_FILENAME = 'libkrb5.dylib'
 
 try:
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to