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

PR body:
"""
libkrb5.so.3 is called libkrb5.dylib on macOS


"""

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] 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))
 
-- 
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