Lines Matching defs:passwd
65 plus the size of a struct passwd.
79 full_size = (size_t) n + sizeof(struct passwd);
247 finished with the returned passwd data.
252 struct passwd *pa_getpwnam_malloc(const char *name) {
257 struct passwd *result = NULL;
262 getpw_buflen = buflen - sizeof(struct passwd);
263 getpw_buf = (char *)buf + sizeof(struct passwd);
265 while ((err = getpwnam_r(name, (struct passwd *)buf, getpw_buf, getpw_buflen, &result)) == ERANGE) {
269 getpw_buflen = buflen - sizeof(struct passwd);
270 getpw_buf = (char *)buf + sizeof(struct passwd);
286 void pa_getpwnam_free(struct passwd *passwd) {
287 pa_xfree(passwd);
292 struct passwd *pa_getpwnam_malloc(const char *name) {
296 void pa_getpwnam_free(struct passwd *passwd) {
311 struct passwd *pa_getpwuid_malloc(uid_t uid) {
316 struct passwd *result = NULL;
321 getpw_buflen = buflen - sizeof(struct passwd);
322 getpw_buf = (char *)buf + sizeof(struct passwd);
324 while ((err = getpwuid_r(uid, (struct passwd *)buf, getpw_buf, getpw_buflen, &result)) == ERANGE) {
328 getpw_buflen = buflen - sizeof(struct passwd);
329 getpw_buf = (char *)buf + sizeof(struct passwd);
345 void pa_getpwuid_free(struct passwd *passwd) {
346 pa_xfree(passwd);
351 struct passwd *pa_getpwuid_malloc(uid_t uid) {
355 void pa_getpwuid_free(struct passwd *passwd) {