Lines Matching refs:map
107 * DESCRIPTION: Read (i.e. get and map) a single NIS entry from the LDAP DIT.
121 read_from_dit(char *map, char *domain, datum *key, datum *value)
146 if (TRUE == singleReadFromDIT(map, domain, key, value, &res))
183 * INPUTS: Pointer to (unqualified) map name
197 write_to_dit(char *map, char *domain, datum key, datum value,
223 res = singleWriteToDIT(map, domain, &key, &value, replace);
269 * GIVEN : Pointer to map
276 get_ttl_value(map_ctrl *map, TTL_TYPE type)
282 /* Get the mapping structure corresponding to `map.domain' */
283 table_map = mappingFromMap(map->map_name, map->domain, &res);
287 "Get TTL request could not access map %s in domain %s "
288 "(error %d)", map->map_name, map->domain, res);
367 * DESCRIPTION: Frees a map list.
369 * GIVEN : Pointer to the map list.
382 * DESCRIPTION: Gets a list of either passwd or passwd.adjunct map files
397 * RETURNS : Null terminated list of map names in malloced memory. To be
439 /* Check right map */
528 * DESCRIPTION: Adds the special (YP_*) entries to a map.
535 * Pointer to map information (do not use DBM fields).
542 add_special_entries(DBM *db, map_ctrl *map, bool_t *secure_flag)
552 addpair(db, yp_domain_name, map->domain);
558 /* Get the mapping structure corresponding to `map.domain' */
559 table_map = mappingFromMap(map->map_name, map->domain, &res);
579 * DESCRIPTION: Core code called to update an entire map.
584 * INPUTS: map_ctrl containing lots of information about the map and a
592 update_map_from_dit(map_ctrl *map, bool_t log_flag) {
626 if (!map || !map->map_name || !map->domain) {
634 * the netgroup map, not the DIT, so handle special case.
636 if ((0 == strcmp(map->map_name, NETGROUP_BYHOST)) ||
637 0 == (strcmp(map->map_name, NETGROUP_BYUSER))) {
638 return (update_netgroup_byxxx(map));
641 /* Get the mapping information for the map */
642 if ((t = mappingFromMap(map->map_name, map->domain, &statP)) == 0) {
646 myself, map->map_name, map->domain);
651 if (SUCCESS != alloc_temp_names(map->map_path,
654 "%s: Unable to create map names for %s",
655 myself, map->map_path);
685 if (0 == strcasecmp(map->domain, ypDomains.domainLabels[i])) {
691 if (!(objname = getFullMapName(map->map_name, map->domain))) {
709 if (strncmp(map->map_name, xlate_to_lcase_maps[m],
717 /* Try each mapping for the map */
729 myself, t->dbId, map->map_name);
746 map->map_name,
766 * in this map.
774 t->dbId, map->map_name,
796 map->domain);
806 t->dbId, map->map_name,
820 t->dbId, map->map_name,
834 map->map_name,
841 /* Write to the temporary map */
867 map->map_name,
905 temp_map.map_name = map->map_name;
906 temp_map.domain = map->domain;
921 "(key=%s) for map %s,%s",
922 myself, NIL(key.dptr), map->map_name,
923 map->domain);
927 /* Update map TTL */
929 logmsg(MSG_NOTIMECHECK, LOG_ERR, "%s: Could not update map TTL "
930 "for %s,%s", myself, map->map_name, map->domain);
934 add_special_entries(temp_entries_db, map, &secure_flag);
940 /* Lock access to the map for copy */
941 lock_map_ctrl(map);
944 rename_map(temp_entries, map->map_path, secure_flag);
945 rename_map(temp_ttl, map->ttl_path, secure_flag);
951 /* Unlock map */
952 unlock_map_ctrl(map);
967 * RETURNS : List of map names in malloced memory. MUST BE FREED BY CALLER.
1107 /* Get the mapping information for the map */
1180 * INPUTS: map_ctrl containing lots of information about the map and a
1187 update_netgroup_byxxx(map_ctrl *map) {
1215 if (0 == strcmp(map->map_name, NETGROUP_BYHOST))
1222 (strlen(map->map_path) - strlen(map->map_name)) +
1225 (strlen(map->map_path) - strlen(map->map_name)) +
1236 * If necessary update (and wait for) netgroups map. This is a lot of
1237 * work but if the netgroup map itself is not being accessed it may
1240 * We use the cmdbuf to store the qualified netgroup map name there will
1243 strlcpy(cmdbuf, map->map_path, strlen(map->map_path) -
1244 strlen(map->map_name) + 1);
1265 /* Unmake the netgroup file in same domain as map */
1266 strncat(cmdbuf, map->map_path, strlen(map->map_path) -
1267 strlen(map->map_name));
1270 if (0 == strcmp(map->map_name, NETGROUP_BYHOST)) {
1276 /* Create temp file file in same domain as map */
1277 strncat(cmdbuf, map->map_path, strlen(map->map_path) -
1278 strlen(map->map_name));
1290 if (SUCCESS != alloc_temp_names(map->map_path,
1293 "%s: Unable to create map names for %s",
1294 myself, map->map_path);
1300 (strlen(map->map_path) - strlen(map->map_name)) +
1312 strncat(cmdbuf, map->map_path, strlen(map->map_path) -
1313 strlen(map->map_name));
1328 strlcpy(cmdbuf, map->map_path, strlen(map->map_path) -
1329 strlen(map->map_name) + 1);
1365 * values for netgroup map
1368 temp_map.domain = map->domain;
1372 * Generate new TTL file. Since these maps work only on the whole map
1386 "(key=%s) for map %s,%s",
1387 myself, NIL(key.dptr), map->map_name,
1388 map->domain);
1392 /* Update map TTL */
1399 /* Lock access to the map for copy */
1400 lock_map_ctrl(map);
1403 rename_map(temp_entries, map->map_path, FALSE);
1404 rename_map(temp_ttl, map->ttl_path, FALSE);
1410 /* Unlock map */
1411 unlock_map_ctrl(map);