Lines Matching refs:arglist

295 static int credCheck(clientopts_t *arglist);
296 static int adminCredCheck(clientopts_t *arglist);
299 static void dumpargs(clientopts_t *arglist);
300 static int num_args(clientopts_t *arglist);
308 static int client_list(clientopts_t *arglist);
309 static int client_manual(clientopts_t *arglist);
310 static int client_mod(clientopts_t *arglist);
311 static int client_uninit(clientopts_t *arglist);
312 static int client_genProfile(clientopts_t *arglist);
313 static int client_init(clientopts_t *arglist);
649 client_list(clientopts_t *arglist) in client_list() argument
654 if (num_args(arglist) > 0) { in client_list()
675 client_uninit(clientopts_t *arglist) in client_uninit() argument
687 if (num_args(arglist) > 0) { in client_uninit()
778 client_manual(clientopts_t *arglist) in client_manual() argument
795 if (arglist->defaultSearchBase == NULL) { in client_manual()
803 if ((arglist->defaultServerList == NULL) && in client_manual()
804 (arglist->preferredServerList == NULL)) { in client_manual()
813 if (arglist->profileTTL != NULL) { in client_manual()
821 if (arglist->profileName != NULL) { in client_manual()
829 LDAP_CHECK_INVALID(arglist->bindDN, "bind DN"); in client_manual()
830 LDAP_CHECK_INVALID(arglist->bindPasswd, "bind password"); in client_manual()
842 LDAP_SET_PARAM(arglist->authenticationMethod, NS_LDAP_AUTH_P); in client_manual()
843 LDAP_SET_PARAM(arglist->defaultSearchBase, NS_LDAP_SEARCH_BASEDN_P); in client_manual()
844 LDAP_SET_PARAM(arglist->credentialLevel, NS_LDAP_CREDENTIAL_LEVEL_P); in client_manual()
845 LDAP_SET_PARAM(arglist->proxyDN, NS_LDAP_BINDDN_P); in client_manual()
846 LDAP_SET_PARAM(arglist->enableShadowUpdate, in client_manual()
848 LDAP_SET_PARAM(arglist->adminDN, NS_LDAP_ADMIN_BINDDN_P); in client_manual()
849 LDAP_SET_PARAM(arglist->searchTimeLimit, NS_LDAP_SEARCH_TIME_P); in client_manual()
850 LDAP_SET_PARAM(arglist->preferredServerList, NS_LDAP_SERVER_PREF_P); in client_manual()
851 LDAP_SET_PARAM(arglist->profileName, NS_LDAP_PROFILE_P); in client_manual()
852 LDAP_SET_PARAM(arglist->followReferrals, NS_LDAP_SEARCH_REF_P); in client_manual()
853 LDAP_SET_PARAM(arglist->defaultSearchScope, NS_LDAP_SEARCH_SCOPE_P); in client_manual()
854 LDAP_SET_PARAM(arglist->bindTimeLimit, NS_LDAP_BIND_TIME_P); in client_manual()
855 LDAP_SET_PARAM(arglist->proxyPassword, NS_LDAP_BINDPASSWD_P); in client_manual()
856 LDAP_SET_PARAM(arglist->adminPassword, NS_LDAP_ADMIN_BINDPASSWD_P); in client_manual()
857 LDAP_SET_PARAM(arglist->defaultServerList, NS_LDAP_SERVERS_P); in client_manual()
858 LDAP_SET_PARAM(arglist->certificatePath, NS_LDAP_HOST_CERTPATH_P); in client_manual()
861 counter < arglist->serviceAuthenticationMethod->count; in client_manual()
865 arglist->serviceAuthenticationMethod->optlist[counter], in client_manual()
869 counter < arglist->serviceCredentialLevel->count; in client_manual()
873 arglist->serviceCredentialLevel->optlist[counter], in client_manual()
877 counter < arglist->objectclassMap->count; in client_manual()
880 LDAP_SET_PARAM(arglist->objectclassMap->optlist[counter], in client_manual()
883 for (counter = 0; counter < arglist->attributeMap->count; counter++) { in client_manual()
884 LDAP_SET_PARAM(arglist->attributeMap->optlist[counter], in client_manual()
888 counter < arglist->serviceSearchDescriptor->count; in client_manual()
892 arglist->serviceSearchDescriptor->optlist[counter], in client_manual()
896 retcode = credCheck(arglist); in client_manual()
898 retcode = adminCredCheck(arglist); in client_manual()
1092 client_mod(clientopts_t *arglist) in client_mod() argument
1110 if (arglist->profileTTL != NULL) { in client_mod()
1118 if (arglist->profileName != NULL) { in client_mod()
1128 LDAP_CHECK_INVALID(arglist->bindDN, "bind DN"); in client_mod()
1129 LDAP_CHECK_INVALID(arglist->bindPasswd, "bind password"); in client_mod()
1132 LDAP_SET_PARAM(arglist->authenticationMethod, NS_LDAP_AUTH_P); in client_mod()
1133 LDAP_SET_PARAM(arglist->defaultSearchBase, NS_LDAP_SEARCH_BASEDN_P); in client_mod()
1134 LDAP_SET_PARAM(arglist->credentialLevel, NS_LDAP_CREDENTIAL_LEVEL_P); in client_mod()
1135 LDAP_SET_PARAM(arglist->proxyDN, NS_LDAP_BINDDN_P); in client_mod()
1136 LDAP_SET_PARAM(arglist->adminDN, NS_LDAP_ADMIN_BINDDN_P); in client_mod()
1137 LDAP_SET_PARAM(arglist->profileTTL, NS_LDAP_CACHETTL_P); in client_mod()
1138 LDAP_SET_PARAM(arglist->searchTimeLimit, NS_LDAP_SEARCH_TIME_P); in client_mod()
1139 LDAP_SET_PARAM(arglist->preferredServerList, NS_LDAP_SERVER_PREF_P); in client_mod()
1140 LDAP_SET_PARAM(arglist->profileName, NS_LDAP_PROFILE_P); in client_mod()
1141 LDAP_SET_PARAM(arglist->followReferrals, NS_LDAP_SEARCH_REF_P); in client_mod()
1142 LDAP_SET_PARAM(arglist->defaultSearchScope, NS_LDAP_SEARCH_SCOPE_P); in client_mod()
1143 LDAP_SET_PARAM(arglist->bindTimeLimit, NS_LDAP_BIND_TIME_P); in client_mod()
1144 LDAP_SET_PARAM(arglist->proxyPassword, NS_LDAP_BINDPASSWD_P); in client_mod()
1145 LDAP_SET_PARAM(arglist->adminPassword, NS_LDAP_ADMIN_BINDPASSWD_P); in client_mod()
1146 LDAP_SET_PARAM(arglist->defaultServerList, NS_LDAP_SERVERS_P); in client_mod()
1147 LDAP_SET_PARAM(arglist->enableShadowUpdate, in client_mod()
1149 LDAP_SET_PARAM(arglist->certificatePath, NS_LDAP_HOST_CERTPATH_P); in client_mod()
1152 counter < arglist->serviceAuthenticationMethod->count; in client_mod()
1156 arglist->serviceAuthenticationMethod->optlist[counter], in client_mod()
1160 counter < arglist->serviceCredentialLevel->count; in client_mod()
1164 arglist->serviceCredentialLevel->optlist[counter], in client_mod()
1168 counter < arglist->objectclassMap->count; in client_mod()
1172 arglist->objectclassMap->optlist[counter], in client_mod()
1176 counter < arglist->attributeMap->count; in client_mod()
1180 arglist->attributeMap->optlist[counter], in client_mod()
1184 counter < arglist->serviceSearchDescriptor->count; in client_mod()
1188 arglist->serviceSearchDescriptor->optlist[counter], in client_mod()
1192 retcode = credCheck(arglist); in client_mod()
1194 retcode = adminCredCheck(arglist); in client_mod()
1339 client_genProfile(clientopts_t *arglist) in client_genProfile() argument
1349 LDAP_CHECK_INVALID(arglist->proxyDN, "proxyDN"); in client_genProfile()
1350 LDAP_CHECK_INVALID(arglist->proxyPassword, "proxyPassword"); in client_genProfile()
1351 LDAP_CHECK_INVALID(arglist->enableShadowUpdate, in client_genProfile()
1353 LDAP_CHECK_INVALID(arglist->adminDN, "adminDN"); in client_genProfile()
1354 LDAP_CHECK_INVALID(arglist->adminPassword, "adminPassword"); in client_genProfile()
1355 LDAP_CHECK_INVALID(arglist->certificatePath, "certificatePath"); in client_genProfile()
1356 LDAP_CHECK_INVALID(arglist->domainName, "domainName"); in client_genProfile()
1357 LDAP_CHECK_INVALID(arglist->bindDN, "bind DN"); in client_genProfile()
1358 LDAP_CHECK_INVALID(arglist->bindPasswd, "bind password"); in client_genProfile()
1361 if (arglist->profileName == NULL) { in client_genProfile()
1367 arglist->profileName = "default"; in client_genProfile()
1377 LDAP_SET_PARAM(arglist->authenticationMethod, NS_LDAP_AUTH_P); in client_genProfile()
1378 LDAP_SET_PARAM(arglist->defaultSearchBase, NS_LDAP_SEARCH_BASEDN_P); in client_genProfile()
1379 LDAP_SET_PARAM(arglist->credentialLevel, NS_LDAP_CREDENTIAL_LEVEL_P); in client_genProfile()
1380 LDAP_SET_PARAM(arglist->profileTTL, NS_LDAP_CACHETTL_P); in client_genProfile()
1381 LDAP_SET_PARAM(arglist->searchTimeLimit, NS_LDAP_SEARCH_TIME_P); in client_genProfile()
1382 LDAP_SET_PARAM(arglist->preferredServerList, NS_LDAP_SERVER_PREF_P); in client_genProfile()
1383 LDAP_SET_PARAM(arglist->profileName, NS_LDAP_PROFILE_P); in client_genProfile()
1384 LDAP_SET_PARAM(arglist->followReferrals, NS_LDAP_SEARCH_REF_P); in client_genProfile()
1385 LDAP_SET_PARAM(arglist->defaultSearchScope, NS_LDAP_SEARCH_SCOPE_P); in client_genProfile()
1386 LDAP_SET_PARAM(arglist->bindTimeLimit, NS_LDAP_BIND_TIME_P); in client_genProfile()
1387 LDAP_SET_PARAM(arglist->defaultServerList, NS_LDAP_SERVERS_P); in client_genProfile()
1390 counter < arglist->serviceAuthenticationMethod->count; in client_genProfile()
1394 arglist->serviceAuthenticationMethod->optlist[counter], in client_genProfile()
1398 counter < arglist->serviceCredentialLevel->count; in client_genProfile()
1402 arglist->serviceCredentialLevel->optlist[counter], in client_genProfile()
1406 counter < arglist->objectclassMap->count; in client_genProfile()
1410 arglist->objectclassMap->optlist[counter], in client_genProfile()
1414 counter < arglist->attributeMap->count; in client_genProfile()
1418 arglist->attributeMap->optlist[counter], in client_genProfile()
1422 counter < arglist->serviceSearchDescriptor->count; in client_genProfile()
1426 arglist->serviceSearchDescriptor->optlist[counter], in client_genProfile()
1445 client_init(clientopts_t *arglist) in client_init() argument
1476 if (!arglist->defaultServerList) { in client_init()
1482 LDAP_CHECK_INVALID(arglist->defaultSearchBase, in client_init()
1484 LDAP_CHECK_INVALID(arglist->profileTTL, in client_init()
1486 LDAP_CHECK_INVALID(arglist->searchTimeLimit, in client_init()
1488 LDAP_CHECK_INVALID(arglist->preferredServerList, in client_init()
1490 LDAP_CHECK_INVALID(arglist->followReferrals, in client_init()
1492 LDAP_CHECK_INVALID(arglist->defaultSearchScope, in client_init()
1494 LDAP_CHECK_INVALID(arglist->bindTimeLimit, in client_init()
1497 LDAP_CHECK_INVALID(arglist->objectclassMap->count, in client_init()
1499 LDAP_CHECK_INVALID(arglist->attributeMap->count, in client_init()
1501 LDAP_CHECK_INVALID(arglist->serviceAuthenticationMethod->count, in client_init()
1503 LDAP_CHECK_INVALID(arglist->serviceCredentialLevel->count, in client_init()
1505 LDAP_CHECK_INVALID(arglist->serviceSearchDescriptor->count, in client_init()
1509 if (arglist->profileName == NULL) { in client_init()
1515 arglist->profileName = "default"; in client_init()
1518 (void) strncpy(peer, arglist->defaultServerList, MAX_HOSTADDR_LEN - 1); in client_init()
1523 if (arglist->bindDN != NULL) { in client_init()
1531 if (arglist->bindPasswd == NULL) { in client_init()
1532 arglist->bindPasswd = in client_init()
1534 if (arglist->bindPasswd == NULL) { in client_init()
1545 cfg.SA_BIND_DN = arglist->bindDN; in client_init()
1546 cfg.SA_BIND_PWD = arglist->bindPasswd; in client_init()
1548 if (arglist->authenticationMethod != NULL) { in client_init()
1549 if (__ns_ldap_initAuth(arglist->authenticationMethod, in client_init()
1563 cfg.SA_CRED = arglist->credentialLevel; in client_init()
1565 cfg.SA_DOMAIN = arglist->domainName; in client_init()
1566 cfg.SA_PROFILE_NAME = arglist->profileName; in client_init()
1567 cfg.SA_CERT_PATH = arglist->certificatePath; in client_init()
1583 if (arglist->proxyDN != NULL && arglist->proxyPassword == NULL) { in client_init()
1584 arglist->proxyPassword = getpassphrase("Proxy Bind Password:"); in client_init()
1585 if (arglist->proxyPassword == NULL) { in client_init()
1594 if (arglist->proxyDN != NULL && arglist->proxyPassword != NULL) { in client_init()
1596 arglist->proxyDN, &errorp) != NS_LDAP_SUCCESS) { in client_init()
1604 arglist->proxyPassword, &errorp) != NS_LDAP_SUCCESS) { in client_init()
1613 if (arglist->enableShadowUpdate != NULL) { in client_init()
1614 LDAP_SET_PARAM(arglist->enableShadowUpdate, in client_init()
1618 if (arglist->enableShadowUpdate && in client_init()
1619 strcasecmp(arglist->enableShadowUpdate, "TRUE") == 0 && in client_init()
1620 arglist->adminDN != NULL && arglist->adminPassword == NULL) { in client_init()
1621 arglist->adminPassword = getpassphrase("admin Bind Password:"); in client_init()
1622 if (arglist->adminPassword == NULL) { in client_init()
1631 if (arglist->adminDN != NULL && arglist->adminPassword != NULL) { in client_init()
1633 arglist->adminDN, &errorp) != NS_LDAP_SUCCESS) { in client_init()
1641 arglist->adminPassword, &errorp) != NS_LDAP_SUCCESS) { in client_init()
1650 if (arglist->authenticationMethod != NULL) { in client_init()
1685 if (arglist->credentialLevel != NULL) { in client_init()
1710 arglist->credentialLevel) == 0) { in client_init()
1731 retcode = credCheck(arglist); in client_init()
1733 retcode = adminCredCheck(arglist); in client_init()
2267 credCheck(clientopts_t *arglist) in credCheck() argument
2374 arglist->proxyPassword = getpassphrase("Proxy Bind Password:"); in credCheck()
2375 if (arglist->proxyPassword == NULL) { in credCheck()
2379 LDAP_SET_PARAM(arglist->proxyPassword, NS_LDAP_BINDPASSWD_P); in credCheck()
2400 adminCredCheck(clientopts_t *arglist) in adminCredCheck() argument
2539 arglist->adminPassword = getpassphrase("admin Password:"); in adminCredCheck()
2540 if (arglist->adminPassword == NULL) { in adminCredCheck()
2546 LDAP_SET_PARAM(arglist->adminPassword, in adminCredCheck()