Lines Matching refs:pwd

378 proc_maps(char *domain, struct passwd_entry *pwd)  in proc_maps()  argument
387 ans = proc_map_list(map_list, domain, pwd, FALSE); in proc_maps()
407 ans = proc_map_list(map_list, domain, pwd, TRUE); in proc_maps()
429 struct passwd_entry *pwd, bool_t adjunct_flag) in proc_map_list() argument
439 if ((adjunct_flag) && (!pwd->adjunct)) { in proc_map_list()
470 if (0 != (ans = update_single_map(map_name, pwd, adjunct_flag))) in proc_map_list()
531 update_single_map(char *map_name, struct passwd_entry *pwd, bool_t adjunct_flag) in update_single_map() argument
539 data.dptr = pwd->adjunct_str; in update_single_map()
541 data.dptr = pwd->pwd_str; in update_single_map()
547 key.dptr = pwd->pw_name; in update_single_map()
549 key.dptr = pwd->pw_uid; in update_single_map()
551 key.dptr = pwd->pw_gid; in update_single_map()
799 decode_pwd_entry(datum *data, struct passwd_entry *pwd, bool_t adjunct) in decode_pwd_entry() argument
812 if (NULL != pwd->pw_name) in decode_pwd_entry()
813 sfree(pwd->pw_name); in decode_pwd_entry()
815 pwd->pw_name = temp; in decode_pwd_entry()
822 if (NULL != pwd->pw_passwd) in decode_pwd_entry()
823 sfree(pwd->pw_passwd); in decode_pwd_entry()
825 pwd->pw_passwd = temp; in decode_pwd_entry()
829 pwd->adjunct_tail = am(myself, str_end - p + 1); in decode_pwd_entry()
830 if (NULL == pwd->adjunct_tail) in decode_pwd_entry()
832 strncpy(pwd->adjunct_tail, p, str_end - p); in decode_pwd_entry()
833 pwd->adjunct_tail[str_end - p] = '\0'; in decode_pwd_entry()
836 pwd->adjunct = TRUE; in decode_pwd_entry()
843 if (NULL == (p = get_next_token(p, &(pwd->pw_uid), str_end))) in decode_pwd_entry()
847 if (NULL == (p = get_next_token(p, &(pwd->pw_gid), str_end))) in decode_pwd_entry()
851 if (NULL == (p = get_next_token(p, &(pwd->pw_gecos), str_end))) in decode_pwd_entry()
855 if (NULL == (p = get_next_token(p, &(pwd->pw_dir), str_end))) in decode_pwd_entry()
859 get_next_token(p, &(pwd->pw_shell), str_end); in decode_pwd_entry()
861 if (NULL == pwd->pw_shell) in decode_pwd_entry()
934 free_pwd_entry(struct passwd_entry *pwd) in free_pwd_entry() argument
937 if (NULL != pwd->pw_name) in free_pwd_entry()
938 sfree(pwd->pw_name); in free_pwd_entry()
940 if (NULL != pwd->pw_passwd) in free_pwd_entry()
941 sfree(pwd->pw_passwd); in free_pwd_entry()
943 if (NULL != pwd->pw_gecos) in free_pwd_entry()
944 sfree(pwd->pw_gecos); in free_pwd_entry()
946 if (NULL != pwd->pw_shell) in free_pwd_entry()
947 sfree(pwd->pw_shell); in free_pwd_entry()
949 if (NULL != pwd->pw_dir) in free_pwd_entry()
950 sfree(pwd->pw_dir); in free_pwd_entry()
952 if (NULL != pwd->adjunct_tail) in free_pwd_entry()
953 sfree(pwd->adjunct_tail); in free_pwd_entry()
955 if (NULL != pwd->pwd_str) in free_pwd_entry()
956 sfree(pwd->pwd_str); in free_pwd_entry()
958 if (NULL != pwd->adjunct_str) in free_pwd_entry()
959 sfree(pwd->adjunct_str); in free_pwd_entry()
962 sfree(pwd); in free_pwd_entry()
977 create_pwd_str(struct passwd_entry *pwd, bool_t adjunct) in create_pwd_str() argument
987 len = strlen(pwd->pw_name) + 1; in create_pwd_str()
988 len += strlen(pwd->pw_passwd) + 1; in create_pwd_str()
990 len += strlen(pwd->adjunct_tail) + 1; in create_pwd_str()
992 len += strlen(pwd->pw_uid) + 1; in create_pwd_str()
993 len += strlen(pwd->pw_gid) + 1; in create_pwd_str()
994 len += strlen(pwd->pw_gecos) + 1; in create_pwd_str()
995 len += strlen(pwd->pw_dir) + 1; in create_pwd_str()
996 len += strlen(pwd->pw_shell) + 1; in create_pwd_str()
1004 strcpy(s, pwd->pw_name); in create_pwd_str()
1010 if (pwd->adjunct) { in create_pwd_str()
1012 strcat(s, pwd->pw_name); in create_pwd_str()
1014 strcat(s, pwd->pw_passwd); in create_pwd_str()
1017 strcat(s, pwd->pw_uid); in create_pwd_str()
1019 strcat(s, pwd->pw_gid); in create_pwd_str()
1021 strcat(s, pwd->pw_gecos); in create_pwd_str()
1023 strcat(s, pwd->pw_dir); in create_pwd_str()
1025 strcat(s, pwd->pw_shell); in create_pwd_str()
1028 strcat(s, pwd->pw_passwd); in create_pwd_str()
1030 strcat(s, pwd->adjunct_tail); in create_pwd_str()
1127 put_new_info(struct passwd_entry *pwd, char *domain) in put_new_info() argument
1132 data.dptr = pwd->pwd_str; in put_new_info()
1134 key.dptr = pwd->pw_name; in put_new_info()
1142 if (pwd->adjunct) { in put_new_info()
1143 data.dptr = pwd->adjunct_str; in put_new_info()
1145 key.dptr = pwd->pw_name; in put_new_info()