Lines Matching refs:pwd

382 proc_maps(char *domain, struct passwd_entry *pwd)  in proc_maps()  argument
391 ans = proc_map_list(map_list, domain, pwd, FALSE); in proc_maps()
411 ans = proc_map_list(map_list, domain, pwd, TRUE); in proc_maps()
433 struct passwd_entry *pwd, bool_t adjunct_flag) in proc_map_list() argument
442 if ((adjunct_flag) && (!pwd->adjunct)) { in proc_map_list()
473 if (0 != (ans = update_single_map(map_name, pwd, adjunct_flag))) in proc_map_list()
534 update_single_map(char *map_name, struct passwd_entry *pwd, bool_t adjunct_flag) in update_single_map() argument
542 data.dptr = pwd->adjunct_str; in update_single_map()
544 data.dptr = pwd->pwd_str; in update_single_map()
550 key.dptr = pwd->pw_name; in update_single_map()
552 key.dptr = pwd->pw_uid; in update_single_map()
554 key.dptr = pwd->pw_gid; in update_single_map()
802 decode_pwd_entry(datum *data, struct passwd_entry *pwd, bool_t adjunct) in decode_pwd_entry() argument
815 if (NULL != pwd->pw_name) in decode_pwd_entry()
816 sfree(pwd->pw_name); in decode_pwd_entry()
818 pwd->pw_name = temp; in decode_pwd_entry()
825 if (NULL != pwd->pw_passwd) in decode_pwd_entry()
826 sfree(pwd->pw_passwd); in decode_pwd_entry()
828 pwd->pw_passwd = temp; in decode_pwd_entry()
832 pwd->adjunct_tail = am(myself, str_end - p + 1); in decode_pwd_entry()
833 if (NULL == pwd->adjunct_tail) in decode_pwd_entry()
835 strncpy(pwd->adjunct_tail, p, str_end - p); in decode_pwd_entry()
836 pwd->adjunct_tail[str_end - p] = '\0'; in decode_pwd_entry()
839 pwd->adjunct = TRUE; in decode_pwd_entry()
846 if (NULL == (p = get_next_token(p, &(pwd->pw_uid), str_end))) in decode_pwd_entry()
850 if (NULL == (p = get_next_token(p, &(pwd->pw_gid), str_end))) in decode_pwd_entry()
854 if (NULL == (p = get_next_token(p, &(pwd->pw_gecos), str_end))) in decode_pwd_entry()
858 if (NULL == (p = get_next_token(p, &(pwd->pw_dir), str_end))) in decode_pwd_entry()
862 get_next_token(p, &(pwd->pw_shell), str_end); in decode_pwd_entry()
864 if (NULL == pwd->pw_shell) in decode_pwd_entry()
937 free_pwd_entry(struct passwd_entry *pwd) in free_pwd_entry() argument
940 if (NULL != pwd->pw_name) in free_pwd_entry()
941 sfree(pwd->pw_name); in free_pwd_entry()
943 if (NULL != pwd->pw_passwd) in free_pwd_entry()
944 sfree(pwd->pw_passwd); in free_pwd_entry()
946 if (NULL != pwd->pw_gecos) in free_pwd_entry()
947 sfree(pwd->pw_gecos); in free_pwd_entry()
949 if (NULL != pwd->pw_shell) in free_pwd_entry()
950 sfree(pwd->pw_shell); in free_pwd_entry()
952 if (NULL != pwd->pw_dir) in free_pwd_entry()
953 sfree(pwd->pw_dir); in free_pwd_entry()
955 if (NULL != pwd->adjunct_tail) in free_pwd_entry()
956 sfree(pwd->adjunct_tail); in free_pwd_entry()
958 if (NULL != pwd->pwd_str) in free_pwd_entry()
959 sfree(pwd->pwd_str); in free_pwd_entry()
961 if (NULL != pwd->adjunct_str) in free_pwd_entry()
962 sfree(pwd->adjunct_str); in free_pwd_entry()
965 sfree(pwd); in free_pwd_entry()
980 create_pwd_str(struct passwd_entry *pwd, bool_t adjunct) in create_pwd_str() argument
990 len = strlen(pwd->pw_name) + 1; in create_pwd_str()
991 len += strlen(pwd->pw_passwd) + 1; in create_pwd_str()
993 len += strlen(pwd->adjunct_tail) + 1; in create_pwd_str()
995 len += strlen(pwd->pw_uid) + 1; in create_pwd_str()
996 len += strlen(pwd->pw_gid) + 1; in create_pwd_str()
997 len += strlen(pwd->pw_gecos) + 1; in create_pwd_str()
998 len += strlen(pwd->pw_dir) + 1; in create_pwd_str()
999 len += strlen(pwd->pw_shell) + 1; in create_pwd_str()
1007 strcpy(s, pwd->pw_name); in create_pwd_str()
1013 if (pwd->adjunct) { in create_pwd_str()
1015 strcat(s, pwd->pw_name); in create_pwd_str()
1017 strcat(s, pwd->pw_passwd); in create_pwd_str()
1020 strcat(s, pwd->pw_uid); in create_pwd_str()
1022 strcat(s, pwd->pw_gid); in create_pwd_str()
1024 strcat(s, pwd->pw_gecos); in create_pwd_str()
1026 strcat(s, pwd->pw_dir); in create_pwd_str()
1028 strcat(s, pwd->pw_shell); in create_pwd_str()
1031 strcat(s, pwd->pw_passwd); in create_pwd_str()
1033 strcat(s, pwd->adjunct_tail); in create_pwd_str()
1129 put_new_info(struct passwd_entry *pwd, char *domain) in put_new_info() argument
1134 data.dptr = pwd->pwd_str; in put_new_info()
1136 key.dptr = pwd->pw_name; in put_new_info()
1144 if (pwd->adjunct) { in put_new_info()
1145 data.dptr = pwd->adjunct_str; in put_new_info()
1147 key.dptr = pwd->pw_name; in put_new_info()