/sssd-io/src/tests/intg/ |
H A D | ds.py | 26 def __init__(self, dir, port, base_dn, admin_rdn, admin_pw): 38 self.dir = dir 39 self.port = port 40 self.ldap_url = "ldap://localhost:" + str(self.port) 41 self.base_dn = base_dn 42 self.admin_rdn = admin_rdn 43 self.admin_dn = admin_rdn + "," + base_dn 44 self.admin_pw = admin_pw 46 def setup(self) [all...] |
H A D | kdc.py | 31 def __init__(self, basedir, realm, 36 self.basedir = basedir 37 self.realm = realm 38 self.kdc_port = kdc_port 39 self.kadmin_port = kadmin_port 40 self.master_key = master_key 42 self.kdc_basedir = self.basedir + "/var/krb5kdc" 43 self.includedir = includedir or (self [all...] |
H A D | secrets.py | 29 def __init__(self, host, timeout=60, **kwargs): 30 super(HTTPUnixConnection, self).__init__('localhost') 31 self.unix_socket = host 32 self.timeout = timeout 34 def connect(self): 36 sock.settimeout(self.timeout) 37 sock.connect(self.unix_socket) 38 self.sock = sock 47 def get_connection(self, url, proxies=None): 57 def __init__(self, content_typ [all...] |
H A D | ds_openldap.py | 51 def __init__(self, dir, port, base_dn, admin_rdn, admin_pw): 63 DS.__init__(self, dir, port, base_dn, admin_rdn, admin_pw) 64 self.run_dir = self.dir + "/var/run/ldap" 65 self.pid_path = self.run_dir + "/slapd.pid" 66 self.conf_dir = self.dir + "/etc/ldap" 67 self.conf_slapd_d_dir = self [all...] |
H A D | krb5utils.py | 23 def __init__(self): 24 Exception.__init__(self, 'No principals in the collection') 28 def __init__(self, principal): 29 Exception.__init__(self, 'Principal %s not found' % principal) 36 def __init__(self, krb5_conf_path): 37 self.krb5_conf_path = krb5_conf_path 39 def spawn_in_env(self, args, stdin=None, extra_env=None): 41 my_env['KRB5_CONFIG'] = self.krb5_conf_path 55 def _run_in_env(self, args, stdin=None, extra_env=None): 56 cmd = self [all...] |
H A D | sssd_nss.py | 34 def __init__(self, errno, nssop): 35 self.errno = errno 36 self.nssop = nssop 38 def __str__(self):
|
H A D | sssd_ldb.py | 36 def __init__(self, domain_name): 37 self._domain_name = domain_name 38 self._sysdb = self._create_dbconn(CacheType.sysdb, 40 self._timestamps = self._create_dbconn(CacheType.timestamps, 43 def _create_dbconn(self, cache_type, domain_name): 57 def _get_dbconn(self, cache_type): 60 dbconn = self._sysdb 62 dbconn = self [all...] |
H A D | files_ops.py | 61 def __init__(self, file_name): 62 self.file_name = file_name 63 self.tmp_dir = os.path.dirname(self.file_name) 73 def _read_contents(self): 74 with open(self.file_name, "r") as pfile: 78 def _write_contents(self, contents): 79 tmp_file = tempfile.NamedTemporaryFile(mode='w', dir=self.tmp_dir, 84 os.rename(tmp_file.name, self.file_name) 86 def _append_line(self, new_lin [all...] |
H A D | sssd_netgroup.py | 68 def __init__(self, name): 69 self.name = name.encode('utf-8') 70 self.needed_groups = [] 71 self.known_groups = [] 72 self.netgroups = [] 146 def get_netgroups(self): 162 res, errno, result = self._flat_fetch_netgroups(self.name) 164 return (res, errno, self.netgroups) 166 self [all...] |
H A D | ldap_ent.py | 111 def __init__(self, base_dn): 112 self.base_dn = base_dn 114 def add_user(self, uid, uidNumber, gidNumber, 123 self.append(user(base_dn or self.base_dn, 132 def add_group(self, cn, gidNumber, member_uids=[], 135 self.append(group(base_dn or self.base_dn, 138 def add_group_bis(self, cn, gidNumber, 142 self [all...] |
/sssd-io/src/tests/python/sssd/testlib/common/ |
H A D | libkrb5.py | 14 def __init__(self, multihost, krb_realm=None): 17 self.krb_realm = 'EXAMPLE.TEST' 19 self.krb_realm = krb_realm.upper() 20 self.multihost = multihost 21 self.kdc_port = '88' 22 self.kadmin_port = '749' 23 self.admin_password = 'Secret123' 24 self.krb5_kdc_data_dir = '/var/kerberos/krb5kdc' 25 self.krb5_kdc_sysconfig = '/etc/sysconfig/krb5kdc' 26 self [all...] |
H A D | exceptions.py | 9 def __init__(self, msg=None, rval=1): 12 self.msg = msg 13 self.rval = rval 14 super(StandardException, self).__init__(self.msg) 16 def __str__(self): 17 return "{} ({})".format(self.msg, self.rval)
|
H A D | authconfig.py | 43 def __init__(self, host): 47 self.host = host 48 self.parameters = {} 50 def enable(self, option): 55 self.parameters[option] = True 56 return self 58 def disable(self, option): 63 self.parameters[option] = False 64 return self 66 def add_option(self, optio [all...] |
H A D | libdirsrv.py | 28 def __init__(self, **kwargs): 30 self.instance_name = kwargs.get('name') 31 self.dsinstance_host = kwargs.get('host') 32 self.dsinstance_suffix = kwargs.get('suffix') 33 self.multihost = kwargs.get('multihost') 34 self.dsrootdn_pwd = kwargs.get('root_dn_password') 35 self.dsldap_port = kwargs.get('ldap_port', None) 36 self.dstls_port = kwargs.get('ldap_tls_port', None) 37 self.dsrootdn = DS_ROOTDN 38 self [all...] |
H A D | utils.py | 33 def __init__(self, Host): 34 self.multihost = Host 35 self.authbackup = "/root/authconfig_backup" 37 def update_resolv_conf(self, ip_addr): 44 self.multihost.log.info("Taking backup of /etc/resolv.conf") 45 output = self.multihost.run_command(['cp', '-f', '/etc/resolv.conf', 49 self.multihost.log.info("/etc/resolv.conf successfully backed up") 50 self.multihost.log.info("Add ip addr %s in resolv.conf" % ip_addr) 52 contents = self.multihost.get_file_contents('/etc/resolv.conf') 55 self [all...] |
H A D | qe_class.py | 15 def __init__(self, **kwargs): 16 self.log = self.get_logger('%s.%s' % (__name__, type(self).__name__)) 17 pytest_multihost.config.Config.__init__(self, **kwargs) 19 def get_domain_class(self): 33 def get_logger(self, name): 71 def sys_hostname(self): 80 cmd = self.run_command(['hostname'], raiseonerr=False) 84 def distro(self) [all...] |
/sssd-io/src/tests/ |
H A D | python-test.py | 37 def setUp(self): 38 self.local = pysss.local() 40 def _run_and_check(self, runme): 42 self.failUnlessEqual(status, 0, output) 44 def _get_object_info(self, name, subtree, domain): 47 cmd = "ldbsearch -H %s %s" % (self.local_path, search_dn) 61 def get_user_info(self, name, domain="LOCAL"): 62 return self._get_object_info(name, "users", domain) 64 def get_group_info(self, name, domain="LOCAL"): 65 return self [all...] |
H A D | pyhbac-test.py | 45 def setUp(self): 47 self.system_path = sys.path[:] 50 def tearDown(self): 52 sys.path = self.system_path 54 def testImport(self): 72 self.assertEqual(pyhbac.__file__, MODPATH + "/pyhbac.so") 76 def testInstantiateEmpty(self): 78 self.assertCountEqual(el.names, []) 79 self.assertCountEqual(el.groups, []) 80 self [all...] |
H A D | pysss_murmur-test.py | 33 def setUp(self): 35 self.system_path = sys.path[:] 40 def tearDown(self): 42 sys.path = self.system_path 44 def testImport(self): 62 self.assertEqual(pysss_murmur.__file__, MODPATH + "/pysss_murmur.so") 66 def test_invalid_arguments(self): 67 self.assertRaises(ValueError, pysss_murmur.murmurhash3, 1, 2, 3) 68 self.assertRaises(ValueError, pysss_murmur.murmurhash3, "test", 2) 69 self [all...] |
/sssd-io/src/config/SSSDConfig/ |
H A D | ipachangeconf.py | 55 def __init__(self, name): 56 self.progname = name 57 self.indent = ("","","") 58 self.assign = (" = ","=") 59 self.dassign = self.assign[0] 60 self.comment = ("#",) 61 self.dcomment = self.comment[0] 62 self [all...] |
/sssd-io/src/config/ |
H A D | SSSDConfigTest.py | 30 def setUp(self): 31 self.tmp_dir = create_temp_dir() 33 def tearDown(self): 34 shutil.rmtree(self.tmp_dir) 36 def testServices(self): 43 self.assertTrue('sssd' in services) 44 self.assertTrue('nss' in services) 45 self.assertTrue('pam' in services) 52 self.assertTrue('services' in service_opts.keys()) 54 self [all...] |
/sssd-io/contrib/gdb/ |
H A D | sssd_gdb_plugin.py | 24 def __init__(self, val): 25 self.val = val 27 def to_string(self): 28 return self.as_string() 34 def as_string(self, indent=0): 35 ret = "{ <%s>\tlinearized:%s }" % (self.val.type, 36 self.val['linearized']) 43 def as_string(self, indent=0): 44 ret = "data = %(data)s, length = %(length)s" % self.val 45 return indent_string("{ <%s>\t%s }" % (self [all...] |
/sssd-io/src/sbus/ |
H A D | sbus_codegen | 84 def __str__(self): 85 message = Exception.__str__(self) 86 if self.file and self.line: 87 return "%s:%d: %s" % (self.file, self.line, message) 88 elif self.file: 89 return "%s: %s" % (self.file, message) 94 def __init__(self, name): 97 self [all...] |
/sssd-io/src/python/ |
H A D | pyhbac.c | 302 HbacRuleElement *self; local 304 self = (HbacRuleElement *) type->tp_alloc(type, 0); 305 if (self == NULL) { 310 self->category = PySet_New(NULL); 311 self->names = PyList_New(0); 312 self->groups = PyList_New(0); 313 if (!self->names || !self->groups || !self->category) { 314 Py_DECREF(self); 323 HbacRuleElement_clear(HbacRuleElement *self) argument 332 HbacRuleElement_dealloc(HbacRuleElement *self) argument 339 HbacRuleElement_traverse(HbacRuleElement *self, visitproc visit, void *arg) argument 358 HbacRuleElement_init(HbacRuleElement *self, PyObject *args, PyObject *kwargs) argument 405 hbac_rule_element_set_names(HbacRuleElement *self, PyObject *names, void *closure) argument 420 hbac_rule_element_get_names(HbacRuleElement *self, void *closure) argument 427 hbac_rule_element_set_groups(HbacRuleElement *self, PyObject *groups, void *closure) argument 442 hbac_rule_element_get_groups(HbacRuleElement *self, void *closure) argument 449 hbac_rule_element_set_category(HbacRuleElement *self, PyObject *category, void *closure) argument 486 hbac_rule_element_get_category(HbacRuleElement *self, void *closure) argument 493 HbacRuleElement_repr(HbacRuleElement *self) argument 652 HbacRuleObject *self; local 697 HbacRule_clear(HbacRuleObject *self) argument 708 HbacRule_dealloc(HbacRuleObject *self) argument 715 HbacRule_traverse(HbacRuleObject *self, visitproc visit, void *arg) argument 731 HbacRule_init(HbacRuleObject *self, PyObject *args, PyObject *kwargs) argument 773 hbac_rule_set_enabled(HbacRuleObject *self, PyObject *enabled, void *closure) argument 830 hbac_rule_get_enabled(HbacRuleObject *self, void *closure) argument 840 hbac_rule_set_name(HbacRuleObject *self, PyObject *name, void *closure) argument 854 hbac_rule_get_name(HbacRuleObject *self, void *closure) argument 870 HbacRule_repr(HbacRuleObject *self) argument 923 py_hbac_rule_validate(HbacRuleObject *self, PyObject *args) argument 1150 HbacRequestElement *self; local 1177 HbacRequestElement_clear(HbacRequestElement *self) argument 1185 HbacRequestElement_dealloc(HbacRequestElement *self) argument 1192 HbacRequestElement_traverse(HbacRequestElement *self, visitproc visit, void *arg) argument 1210 HbacRequestElement_init(HbacRequestElement *self, PyObject *args, PyObject *kwargs) argument 1241 hbac_request_element_set_name(HbacRequestElement *self, PyObject *name, void *closure) argument 1257 hbac_request_element_get_name(HbacRequestElement *self, void *closure) argument 1273 hbac_request_element_set_groups(HbacRequestElement *self, PyObject *groups, void *closure) argument 1288 hbac_request_element_get_groups(HbacRequestElement *self, void *closure) argument 1295 HbacRequestElement_repr(HbacRequestElement *self) argument 1434 HbacRequest *self; local 1469 HbacRequest_clear(HbacRequest *self) argument 1480 HbacRequest_dealloc(HbacRequest *self) argument 1487 HbacRequest_traverse(HbacRequest *self, visitproc visit, void *arg) argument 1497 HbacRequest_init(HbacRequest *self, PyObject *args, PyObject *kwargs) argument 1552 py_hbac_evaluate(HbacRequest *self, PyObject *args) argument 1649 hbac_request_element_get_rule_name(HbacRequest *self, void *closure) argument 1664 HbacRequest_repr(HbacRequest *self) argument [all...] |
H A D | pysss.c | 111 static struct tools_ctx *init_ctx(PySssLocalObject *self) argument 116 tctx = talloc_zero(self->mem_ctx, struct tools_ctx); 121 tctx->confdb = self->confdb; 122 tctx->sysdb = self->sysdb; 123 tctx->local = self->local; 132 octx->domain = self->local; 156 static PyObject *py_sss_useradd(PySssLocalObject *self, argument 195 tctx = init_ctx(self); 222 self->confdb, 311 static PyObject *py_sss_userdel(PySssLocalObject *self, argument 421 py_sss_usermod(PySssLocalObject *self, PyObject *args, PyObject *kwds) argument 542 py_sss_groupadd(PySssLocalObject *self, PyObject *args, PyObject *kwds) argument 613 py_sss_groupdel(PySssLocalObject *self, PyObject *args, PyObject *kwds) argument 660 py_sss_groupmod(PySssLocalObject *self, PyObject *args, PyObject *kwds) argument 758 py_sss_getgrouplist(PyObject *self, PyObject *args) argument 836 PySssLocalObject_dealloc(PySssLocalObject *self) argument 850 PySssLocalObject *self; local 965 py_sss_encrypt(PySssPasswordObject *self, PyObject *args) argument 1052 PySssPasswordObject_dealloc(PySssPasswordObject *self) argument 1064 PySssPasswordObject *self; local [all...] |