Lines Matching defs:map

106  * DESCRIPTION:	Read (i.e. get and map) a single NIS entry from the LDAP DIT.
120 read_from_dit(char *map, char *domain, datum *key, datum *value)
145 if (TRUE == singleReadFromDIT(map, domain, key, value, &res))
182 * INPUTS: Pointer to (unqualified) map name
196 write_to_dit(char *map, char *domain, datum key, datum value,
222 res = singleWriteToDIT(map, domain, &key, &value, replace);
268 * GIVEN : Pointer to map
275 get_ttl_value(map_ctrl *map, TTL_TYPE type)
281 /* Get the mapping structure corresponding to `map.domain' */
282 table_map = mappingFromMap(map->map_name, map->domain, &res);
286 "Get TTL request could not access map %s in domain %s "
287 "(error %d)", map->map_name, map->domain, res);
366 * DESCRIPTION: Frees a map list.
368 * GIVEN : Pointer to the map list.
381 * DESCRIPTION: Gets a list of either passwd or passwd.adjunct map files
396 * RETURNS : Null terminated list of map names in malloced memory. To be
438 /* Check right map */
527 * DESCRIPTION: Adds the special (YP_*) entries to a map.
534 * Pointer to map information (do not use DBM fields).
541 add_special_entries(DBM *db, map_ctrl *map, bool_t *secure_flag)
551 addpair(db, yp_domain_name, map->domain);
557 /* Get the mapping structure corresponding to `map.domain' */
558 table_map = mappingFromMap(map->map_name, map->domain, &res);
578 * DESCRIPTION: Core code called to update an entire map.
583 * INPUTS: map_ctrl containing lots of information about the map and a
591 update_map_from_dit(map_ctrl *map, bool_t log_flag) {
625 if (!map || !map->map_name || !map->domain) {
633 * the netgroup map, not the DIT, so handle special case.
635 if ((0 == strcmp(map->map_name, NETGROUP_BYHOST)) ||
636 0 == (strcmp(map->map_name, NETGROUP_BYUSER))) {
637 return (update_netgroup_byxxx(map));
640 /* Get the mapping information for the map */
641 if ((t = mappingFromMap(map->map_name, map->domain, &statP)) == 0) {
645 myself, map->map_name, map->domain);
650 if (SUCCESS != alloc_temp_names(map->map_path,
653 "%s: Unable to create map names for %s",
654 myself, map->map_path);
684 if (0 == strcasecmp(map->domain, ypDomains.domainLabels[i])) {
690 if (!(objname = getFullMapName(map->map_name, map->domain))) {
708 if (strncmp(map->map_name, xlate_to_lcase_maps[m],
716 /* Try each mapping for the map */
728 myself, t->dbId, map->map_name);
745 map->map_name,
765 * in this map.
773 t->dbId, map->map_name,
795 map->domain);
805 t->dbId, map->map_name,
819 t->dbId, map->map_name,
833 map->map_name,
840 /* Write to the temporary map */
866 map->map_name,
904 temp_map.map_name = map->map_name;
905 temp_map.domain = map->domain;
920 "(key=%s) for map %s,%s",
921 myself, NIL(key.dptr), map->map_name,
922 map->domain);
926 /* Update map TTL */
928 logmsg(MSG_NOTIMECHECK, LOG_ERR, "%s: Could not update map TTL "
929 "for %s,%s", myself, map->map_name, map->domain);
933 add_special_entries(temp_entries_db, map, &secure_flag);
939 /* Lock access to the map for copy */
940 lock_map_ctrl(map);
943 rename_map(temp_entries, map->map_path, secure_flag);
944 rename_map(temp_ttl, map->ttl_path, secure_flag);
950 /* Unlock map */
951 unlock_map_ctrl(map);
966 * RETURNS : List of map names in malloced memory. MUST BE FREED BY CALLER.
1106 /* Get the mapping information for the map */
1179 * INPUTS: map_ctrl containing lots of information about the map and a
1186 update_netgroup_byxxx(map_ctrl *map) {
1214 if (0 == strcmp(map->map_name, NETGROUP_BYHOST))
1221 (strlen(map->map_path) - strlen(map->map_name)) +
1224 (strlen(map->map_path) - strlen(map->map_name)) +
1235 * If necessary update (and wait for) netgroups map. This is a lot of
1236 * work but if the netgroup map itself is not being accessed it may
1239 * We use the cmdbuf to store the qualified netgroup map name there will
1242 strlcpy(cmdbuf, map->map_path, strlen(map->map_path) -
1243 strlen(map->map_name) + 1);
1264 /* Unmake the netgroup file in same domain as map */
1265 strncat(cmdbuf, map->map_path, strlen(map->map_path) -
1266 strlen(map->map_name));
1269 if (0 == strcmp(map->map_name, NETGROUP_BYHOST)) {
1275 /* Create temp file file in same domain as map */
1276 strncat(cmdbuf, map->map_path, strlen(map->map_path) -
1277 strlen(map->map_name));
1289 if (SUCCESS != alloc_temp_names(map->map_path,
1292 "%s: Unable to create map names for %s",
1293 myself, map->map_path);
1299 (strlen(map->map_path) - strlen(map->map_name)) +
1311 strncat(cmdbuf, map->map_path, strlen(map->map_path) -
1312 strlen(map->map_name));
1327 strlcpy(cmdbuf, map->map_path, strlen(map->map_path) -
1328 strlen(map->map_name) + 1);
1364 * values for netgroup map
1367 temp_map.domain = map->domain;
1371 * Generate new TTL file. Since these maps work only on the whole map
1385 "(key=%s) for map %s,%s",
1386 myself, NIL(key.dptr), map->map_name,
1387 map->domain);
1391 /* Update map TTL */
1398 /* Lock access to the map for copy */
1399 lock_map_ctrl(map);
1402 rename_map(temp_entries, map->map_path, FALSE);
1403 rename_map(temp_ttl, map->ttl_path, FALSE);
1409 /* Unlock map */
1410 unlock_map_ctrl(map);