Lines Matching refs:arglist

297 static int credCheck(clientopts_t *arglist);
298 static int adminCredCheck(clientopts_t *arglist);
301 static void dumpargs(clientopts_t *arglist);
302 static int num_args(clientopts_t *arglist);
310 static int client_list(clientopts_t *arglist);
311 static int client_manual(clientopts_t *arglist);
312 static int client_mod(clientopts_t *arglist);
313 static int client_uninit(clientopts_t *arglist);
314 static int client_genProfile(clientopts_t *arglist);
315 static int client_init(clientopts_t *arglist);
651 client_list(clientopts_t *arglist)
656 if (num_args(arglist) > 0) {
677 client_uninit(clientopts_t *arglist)
689 if (num_args(arglist) > 0) {
780 client_manual(clientopts_t *arglist)
797 if (arglist->defaultSearchBase == NULL) {
805 if ((arglist->defaultServerList == NULL) &&
806 (arglist->preferredServerList == NULL)) {
815 if (arglist->profileTTL != NULL) {
823 if (arglist->profileName != NULL) {
831 LDAP_CHECK_INVALID(arglist->bindDN, "bind DN");
832 LDAP_CHECK_INVALID(arglist->bindPasswd, "bind password");
844 LDAP_SET_PARAM(arglist->authenticationMethod, NS_LDAP_AUTH_P);
845 LDAP_SET_PARAM(arglist->defaultSearchBase, NS_LDAP_SEARCH_BASEDN_P);
846 LDAP_SET_PARAM(arglist->credentialLevel, NS_LDAP_CREDENTIAL_LEVEL_P);
847 LDAP_SET_PARAM(arglist->proxyDN, NS_LDAP_BINDDN_P);
848 LDAP_SET_PARAM(arglist->enableShadowUpdate,
850 LDAP_SET_PARAM(arglist->adminDN, NS_LDAP_ADMIN_BINDDN_P);
851 LDAP_SET_PARAM(arglist->searchTimeLimit, NS_LDAP_SEARCH_TIME_P);
852 LDAP_SET_PARAM(arglist->preferredServerList, NS_LDAP_SERVER_PREF_P);
853 LDAP_SET_PARAM(arglist->profileName, NS_LDAP_PROFILE_P);
854 LDAP_SET_PARAM(arglist->followReferrals, NS_LDAP_SEARCH_REF_P);
855 LDAP_SET_PARAM(arglist->defaultSearchScope, NS_LDAP_SEARCH_SCOPE_P);
856 LDAP_SET_PARAM(arglist->bindTimeLimit, NS_LDAP_BIND_TIME_P);
857 LDAP_SET_PARAM(arglist->proxyPassword, NS_LDAP_BINDPASSWD_P);
858 LDAP_SET_PARAM(arglist->adminPassword, NS_LDAP_ADMIN_BINDPASSWD_P);
859 LDAP_SET_PARAM(arglist->defaultServerList, NS_LDAP_SERVERS_P);
860 LDAP_SET_PARAM(arglist->certificatePath, NS_LDAP_HOST_CERTPATH_P);
863 counter < arglist->serviceAuthenticationMethod->count;
867 arglist->serviceAuthenticationMethod->optlist[counter],
871 counter < arglist->serviceCredentialLevel->count;
875 arglist->serviceCredentialLevel->optlist[counter],
879 counter < arglist->objectclassMap->count;
882 LDAP_SET_PARAM(arglist->objectclassMap->optlist[counter],
885 for (counter = 0; counter < arglist->attributeMap->count; counter++) {
886 LDAP_SET_PARAM(arglist->attributeMap->optlist[counter],
890 counter < arglist->serviceSearchDescriptor->count;
894 arglist->serviceSearchDescriptor->optlist[counter],
898 retcode = credCheck(arglist);
900 retcode = adminCredCheck(arglist);
986 /* if (credargs(arglist)) */
1094 client_mod(clientopts_t *arglist)
1112 if (arglist->profileTTL != NULL) {
1120 if (arglist->profileName != NULL) {
1130 LDAP_CHECK_INVALID(arglist->bindDN, "bind DN");
1131 LDAP_CHECK_INVALID(arglist->bindPasswd, "bind password");
1134 LDAP_SET_PARAM(arglist->authenticationMethod, NS_LDAP_AUTH_P);
1135 LDAP_SET_PARAM(arglist->defaultSearchBase, NS_LDAP_SEARCH_BASEDN_P);
1136 LDAP_SET_PARAM(arglist->credentialLevel, NS_LDAP_CREDENTIAL_LEVEL_P);
1137 LDAP_SET_PARAM(arglist->proxyDN, NS_LDAP_BINDDN_P);
1138 LDAP_SET_PARAM(arglist->adminDN, NS_LDAP_ADMIN_BINDDN_P);
1139 LDAP_SET_PARAM(arglist->profileTTL, NS_LDAP_CACHETTL_P);
1140 LDAP_SET_PARAM(arglist->searchTimeLimit, NS_LDAP_SEARCH_TIME_P);
1141 LDAP_SET_PARAM(arglist->preferredServerList, NS_LDAP_SERVER_PREF_P);
1142 LDAP_SET_PARAM(arglist->profileName, NS_LDAP_PROFILE_P);
1143 LDAP_SET_PARAM(arglist->followReferrals, NS_LDAP_SEARCH_REF_P);
1144 LDAP_SET_PARAM(arglist->defaultSearchScope, NS_LDAP_SEARCH_SCOPE_P);
1145 LDAP_SET_PARAM(arglist->bindTimeLimit, NS_LDAP_BIND_TIME_P);
1146 LDAP_SET_PARAM(arglist->proxyPassword, NS_LDAP_BINDPASSWD_P);
1147 LDAP_SET_PARAM(arglist->adminPassword, NS_LDAP_ADMIN_BINDPASSWD_P);
1148 LDAP_SET_PARAM(arglist->defaultServerList, NS_LDAP_SERVERS_P);
1149 LDAP_SET_PARAM(arglist->enableShadowUpdate,
1151 LDAP_SET_PARAM(arglist->certificatePath, NS_LDAP_HOST_CERTPATH_P);
1154 counter < arglist->serviceAuthenticationMethod->count;
1158 arglist->serviceAuthenticationMethod->optlist[counter],
1162 counter < arglist->serviceCredentialLevel->count;
1166 arglist->serviceCredentialLevel->optlist[counter],
1170 counter < arglist->objectclassMap->count;
1174 arglist->objectclassMap->optlist[counter],
1178 counter < arglist->attributeMap->count;
1182 arglist->attributeMap->optlist[counter],
1186 counter < arglist->serviceSearchDescriptor->count;
1190 arglist->serviceSearchDescriptor->optlist[counter],
1194 retcode = credCheck(arglist);
1196 retcode = adminCredCheck(arglist);
1253 /* if (credargs(arglist)) */
1341 client_genProfile(clientopts_t *arglist)
1351 LDAP_CHECK_INVALID(arglist->proxyDN, "proxyDN");
1352 LDAP_CHECK_INVALID(arglist->proxyPassword, "proxyPassword");
1353 LDAP_CHECK_INVALID(arglist->enableShadowUpdate,
1355 LDAP_CHECK_INVALID(arglist->adminDN, "adminDN");
1356 LDAP_CHECK_INVALID(arglist->adminPassword, "adminPassword");
1357 LDAP_CHECK_INVALID(arglist->certificatePath, "certificatePath");
1358 LDAP_CHECK_INVALID(arglist->domainName, "domainName");
1359 LDAP_CHECK_INVALID(arglist->bindDN, "bind DN");
1360 LDAP_CHECK_INVALID(arglist->bindPasswd, "bind password");
1363 if (arglist->profileName == NULL) {
1369 arglist->profileName = "default";
1379 LDAP_SET_PARAM(arglist->authenticationMethod, NS_LDAP_AUTH_P);
1380 LDAP_SET_PARAM(arglist->defaultSearchBase, NS_LDAP_SEARCH_BASEDN_P);
1381 LDAP_SET_PARAM(arglist->credentialLevel, NS_LDAP_CREDENTIAL_LEVEL_P);
1382 LDAP_SET_PARAM(arglist->profileTTL, NS_LDAP_CACHETTL_P);
1383 LDAP_SET_PARAM(arglist->searchTimeLimit, NS_LDAP_SEARCH_TIME_P);
1384 LDAP_SET_PARAM(arglist->preferredServerList, NS_LDAP_SERVER_PREF_P);
1385 LDAP_SET_PARAM(arglist->profileName, NS_LDAP_PROFILE_P);
1386 LDAP_SET_PARAM(arglist->followReferrals, NS_LDAP_SEARCH_REF_P);
1387 LDAP_SET_PARAM(arglist->defaultSearchScope, NS_LDAP_SEARCH_SCOPE_P);
1388 LDAP_SET_PARAM(arglist->bindTimeLimit, NS_LDAP_BIND_TIME_P);
1389 LDAP_SET_PARAM(arglist->defaultServerList, NS_LDAP_SERVERS_P);
1392 counter < arglist->serviceAuthenticationMethod->count;
1396 arglist->serviceAuthenticationMethod->optlist[counter],
1400 counter < arglist->serviceCredentialLevel->count;
1404 arglist->serviceCredentialLevel->optlist[counter],
1408 counter < arglist->objectclassMap->count;
1412 arglist->objectclassMap->optlist[counter],
1416 counter < arglist->attributeMap->count;
1420 arglist->attributeMap->optlist[counter],
1424 counter < arglist->serviceSearchDescriptor->count;
1428 arglist->serviceSearchDescriptor->optlist[counter],
1447 client_init(clientopts_t *arglist)
1478 if (!arglist->defaultServerList) {
1484 LDAP_CHECK_INVALID(arglist->defaultSearchBase,
1486 LDAP_CHECK_INVALID(arglist->profileTTL,
1488 LDAP_CHECK_INVALID(arglist->searchTimeLimit,
1490 LDAP_CHECK_INVALID(arglist->preferredServerList,
1492 LDAP_CHECK_INVALID(arglist->followReferrals,
1494 LDAP_CHECK_INVALID(arglist->defaultSearchScope,
1496 LDAP_CHECK_INVALID(arglist->bindTimeLimit,
1499 LDAP_CHECK_INVALID(arglist->objectclassMap->count,
1501 LDAP_CHECK_INVALID(arglist->attributeMap->count,
1503 LDAP_CHECK_INVALID(arglist->serviceAuthenticationMethod->count,
1505 LDAP_CHECK_INVALID(arglist->serviceCredentialLevel->count,
1507 LDAP_CHECK_INVALID(arglist->serviceSearchDescriptor->count,
1511 if (arglist->profileName == NULL) {
1517 arglist->profileName = "default";
1520 (void) strncpy(peer, arglist->defaultServerList, MAX_HOSTADDR_LEN - 1);
1525 if (arglist->bindDN != NULL) {
1533 if (arglist->bindPasswd == NULL) {
1534 arglist->bindPasswd =
1536 if (arglist->bindPasswd == NULL) {
1551 cfg.SA_BIND_DN = arglist->bindDN;
1552 cfg.SA_BIND_PWD = arglist->bindPasswd;
1554 if (arglist->authenticationMethod != NULL) {
1555 if (__ns_ldap_initAuth(arglist->authenticationMethod,
1571 cfg.SA_CRED = arglist->credentialLevel;
1573 cfg.SA_DOMAIN = arglist->domainName;
1574 cfg.SA_PROFILE_NAME = arglist->profileName;
1575 cfg.SA_CERT_PATH = arglist->certificatePath;
1593 if (arglist->proxyDN != NULL && arglist->proxyPassword == NULL) {
1594 arglist->proxyPassword = getpassphrase("Proxy Bind Password:");
1595 if (arglist->proxyPassword == NULL) {
1606 if (arglist->proxyDN != NULL && arglist->proxyPassword != NULL) {
1608 arglist->proxyDN, &errorp) != NS_LDAP_SUCCESS) {
1616 arglist->proxyPassword, &errorp) != NS_LDAP_SUCCESS) {
1625 if (arglist->enableShadowUpdate != NULL) {
1626 LDAP_SET_PARAM(arglist->enableShadowUpdate,
1630 if (arglist->enableShadowUpdate &&
1631 strcasecmp(arglist->enableShadowUpdate, "TRUE") == 0 &&
1632 arglist->adminDN != NULL && arglist->adminPassword == NULL) {
1633 arglist->adminPassword = getpassphrase("admin Bind Password:");
1634 if (arglist->adminPassword == NULL) {
1645 if (arglist->adminDN != NULL && arglist->adminPassword != NULL) {
1647 arglist->adminDN, &errorp) != NS_LDAP_SUCCESS) {
1655 arglist->adminPassword, &errorp) != NS_LDAP_SUCCESS) {
1664 if (arglist->authenticationMethod != NULL) {
1699 if (arglist->credentialLevel != NULL) {
1726 arglist->credentialLevel) == 0) {
1747 retcode = credCheck(arglist);
1749 retcode = adminCredCheck(arglist);
1840 /* if (credargs(arglist)) */
2317 credCheck(clientopts_t *arglist)
2424 arglist->proxyPassword = getpassphrase("Proxy Bind Password:");
2425 if (arglist->proxyPassword == NULL) {
2429 LDAP_SET_PARAM(arglist->proxyPassword, NS_LDAP_BINDPASSWD_P);
2450 adminCredCheck(clientopts_t *arglist)
2589 arglist->adminPassword = getpassphrase("admin Password:");
2590 if (arglist->adminPassword == NULL) {
2596 LDAP_SET_PARAM(arglist->adminPassword,