Lines Matching refs:pwd

57 #include <pwd.h>
376 proc_maps(char *domain, struct passwd_entry *pwd)
385 ans = proc_map_list(map_list, domain, pwd, FALSE);
405 ans = proc_map_list(map_list, domain, pwd, TRUE);
427 struct passwd_entry *pwd, bool_t adjunct_flag)
437 if ((adjunct_flag) && (!pwd->adjunct)) {
468 if (0 != (ans = update_single_map(map_name, pwd, adjunct_flag)))
529 update_single_map(char *map_name, struct passwd_entry *pwd, bool_t adjunct_flag)
537 data.dptr = pwd->adjunct_str;
539 data.dptr = pwd->pwd_str;
545 key.dptr = pwd->pw_name;
547 key.dptr = pwd->pw_uid;
549 key.dptr = pwd->pw_gid;
797 decode_pwd_entry(datum *data, struct passwd_entry *pwd, bool_t adjunct)
811 if (NULL != pwd->pw_name)
812 sfree(pwd->pw_name);
814 pwd->pw_name = temp;
821 if (NULL != pwd->pw_passwd)
822 sfree(pwd->pw_passwd);
824 pwd->pw_passwd = temp;
828 pwd->adjunct_tail = am(myself, str_end - p + 1);
829 if (NULL == pwd->adjunct_tail)
831 strncpy(pwd->adjunct_tail, p, str_end - p);
832 pwd->adjunct_tail[str_end - p] = '\0';
835 pwd->adjunct = TRUE;
842 if (NULL == (p = get_next_token(p, &(pwd->pw_uid), str_end)))
846 if (NULL == (p = get_next_token(p, &(pwd->pw_gid), str_end)))
850 if (NULL == (p = get_next_token(p, &(pwd->pw_gecos), str_end)))
854 if (NULL == (p = get_next_token(p, &(pwd->pw_dir), str_end)))
858 get_next_token(p, &(pwd->pw_shell), str_end);
860 if (NULL == pwd->pw_shell)
933 free_pwd_entry(struct passwd_entry *pwd)
936 if (NULL != pwd->pw_name)
937 sfree(pwd->pw_name);
939 if (NULL != pwd->pw_passwd)
940 sfree(pwd->pw_passwd);
942 if (NULL != pwd->pw_gecos)
943 sfree(pwd->pw_gecos);
945 if (NULL != pwd->pw_shell)
946 sfree(pwd->pw_shell);
948 if (NULL != pwd->pw_dir)
949 sfree(pwd->pw_dir);
951 if (NULL != pwd->adjunct_tail)
952 sfree(pwd->adjunct_tail);
954 if (NULL != pwd->pwd_str)
955 sfree(pwd->pwd_str);
957 if (NULL != pwd->adjunct_str)
958 sfree(pwd->adjunct_str);
961 sfree(pwd);
976 create_pwd_str(struct passwd_entry *pwd, bool_t adjunct)
986 len = strlen(pwd->pw_name) + 1;
987 len += strlen(pwd->pw_passwd) + 1;
989 len += strlen(pwd->adjunct_tail) + 1;
991 len += strlen(pwd->pw_uid) + 1;
992 len += strlen(pwd->pw_gid) + 1;
993 len += strlen(pwd->pw_gecos) + 1;
994 len += strlen(pwd->pw_dir) + 1;
995 len += strlen(pwd->pw_shell) + 1;
1003 strcpy(s, pwd->pw_name);
1009 if (pwd->adjunct) {
1011 strcat(s, pwd->pw_name);
1013 strcat(s, pwd->pw_passwd);
1016 strcat(s, pwd->pw_uid);
1018 strcat(s, pwd->pw_gid);
1020 strcat(s, pwd->pw_gecos);
1022 strcat(s, pwd->pw_dir);
1024 strcat(s, pwd->pw_shell);
1027 strcat(s, pwd->pw_passwd);
1029 strcat(s, pwd->adjunct_tail);
1066 "Could not read old pwd for %s", name);
1073 logmsg(MSG_NOMEM, LOG_ERR, "Could not alloc for pwd decode");
1126 put_new_info(struct passwd_entry *pwd, char *domain)
1131 data.dptr = pwd->pwd_str;
1133 key.dptr = pwd->pw_name;
1141 if (pwd->adjunct) {
1142 data.dptr = pwd->adjunct_str;
1144 key.dptr = pwd->pw_name;