mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
compat: Save server's API version in for pre-schema servers
When client comunicates with server that doesn't support 'schema' command it needs to determine its api version to be able to use the right compat code. Storing information about server version reduces the need to call 'env' or 'ping' command only to first time the server is contacted. https://fedorahosted.org/freeipa/ticket/6069 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Jan Cholasta
parent
e76b0bbbcc
commit
229e2a1ed9
@@ -21,6 +21,8 @@
|
||||
This base platform module exports default filesystem paths.
|
||||
'''
|
||||
|
||||
import os
|
||||
|
||||
|
||||
class BasePathNamespace(object):
|
||||
BASH = "/bin/bash"
|
||||
@@ -353,4 +355,17 @@ class BasePathNamespace(object):
|
||||
IPA_CUSTODIA_AUDIT_LOG = '/var/log/ipa-custodia.audit.log'
|
||||
IPA_GETKEYTAB = '/usr/sbin/ipa-getkeytab'
|
||||
|
||||
@property
|
||||
def USER_CACHE_PATH(self):
|
||||
return (
|
||||
os.environ.get('XDG_CACHE_HOME') or
|
||||
os.path.join(
|
||||
os.environ.get(
|
||||
'HOME',
|
||||
os.path.expanduser('~')
|
||||
),
|
||||
'.cache'
|
||||
)
|
||||
)
|
||||
|
||||
path_namespace = BasePathNamespace
|
||||
|
||||
Reference in New Issue
Block a user