Lines Matching refs:pwbuf
65 struct pwbuf { struct
90 struct pwbuf *pwbuf; in nss_getpwnam() argument
94 *buf = calloc(1, sizeof (struct pwbuf)); in nss_getpwnam()
95 pwbuf = (struct pwbuf *)*buf; in nss_getpwnam()
96 if (pwbuf == NULL) in nss_getpwnam()
113 if (pwbuf->pwd == NULL) in nss_getpwnam()
114 pwbuf->pwd = (struct passwd *) in nss_getpwnam()
116 if (pwbuf->pwd == NULL) { in nss_getpwnam()
118 if (pwbuf->spwd) in nss_getpwnam()
119 free(pwbuf->spwd); in nss_getpwnam()
135 if (pwbuf->spwd == NULL) in nss_getpwnam()
136 pwbuf->spwd = (struct spwd *) in nss_getpwnam()
138 if (pwbuf->spwd == NULL) { in nss_getpwnam()
140 if (pwbuf->pwd) in nss_getpwnam()
141 free(pwbuf->pwd); in nss_getpwnam()
158 if (pwbuf->pwd) { in nss_getpwnam()
159 if ((pwbuf->pwd_scratch = malloc(PWD_SCRATCH_SIZE)) == NULL) { in nss_getpwnam()
163 if (getpwnam_r(name, pwbuf->pwd, pwbuf->pwd_scratch, in nss_getpwnam()
170 if (pwbuf->spwd) { in nss_getpwnam()
171 if ((pwbuf->spwd_scratch = malloc(SPW_SCRATCH_SIZE)) == NULL) { in nss_getpwnam()
175 if (getspnam_r(name, pwbuf->spwd, pwbuf->spwd_scratch, in nss_getpwnam()
190 pwbuf->rep_name = "files"; in nss_getpwnam()
192 pwbuf->rep_name = "ldap"; in nss_getpwnam()
194 pwbuf->rep_name = "nis"; in nss_getpwnam()
196 pwbuf->rep_name = "nss"; in nss_getpwnam()
198 pwbuf->rep_name = "nss"; in nss_getpwnam()
202 if (pwbuf->pwd) free(pwbuf->pwd); in nss_getpwnam()
203 if (pwbuf->pwd_scratch) free(pwbuf->pwd_scratch); in nss_getpwnam()
204 if (pwbuf->spwd) free(pwbuf->spwd); in nss_getpwnam()
205 if (pwbuf->spwd_scratch) free(pwbuf->spwd_scratch); in nss_getpwnam()
206 free(pwbuf); in nss_getpwnam()
221 struct pwbuf *pwbuf; in nss_getattr() local
227 res = nss_getpwnam(name, items, rep, (void **)&pwbuf); in nss_getattr()
231 pw = pwbuf->pwd; in nss_getattr()
232 spw = pwbuf->spwd; in nss_getattr()
270 if ((w->data.val_s = strdup(pwbuf->rep_name)) == NULL) in nss_getattr()
310 if (pwbuf->pwd) free(pwbuf->pwd); in nss_getattr()
311 if (pwbuf->pwd_scratch) free(pwbuf->pwd_scratch); in nss_getattr()
312 if (pwbuf->spwd) free(pwbuf->spwd); in nss_getattr()
313 if (pwbuf->spwd_scratch) free(pwbuf->spwd_scratch); in nss_getattr()
314 free(pwbuf); in nss_getattr()