Lines Matching refs:fd

141 int fill_grent_from_fd(int fd, struct group *gbuf, char *buf, size_t buflen)
146 len = fs_read_attr(fd, B_GR_GID, B_INT32_TYPE, 0LL, &gbuf->gr_gid, sizeof(gid_t));
155 len = fs_read_attr(fd, B_GR_NAME, B_STRING_TYPE, 0LL, buf, GR_MAX_NAME);
197 int fd;
221 fd = dentopen(dent, p->grfile);
222 if (fd < B_OK)
224 err = fill_grent_from_fd(fd, gbuf, buf, buflen);
226 close(fd);
264 int fd;
286 fd = dentopen(dent, p->grfile);
288 if (fd < B_OK)
290 err = fill_grent_from_fd(fd, &p->grent, p->grbuff, GRBUFFSZ);
292 close(fd);
306 int fd;
332 fd = dentopen(dent, p->grfile);
334 if (fd < B_OK)
336 err = fill_grent_from_fd(fd, &p->grent, p->grbuff, GRBUFFSZ);
338 close(fd);
362 int fill_pwent_from_fd(int fd, struct passwd *pwbuf, char *buf, size_t buflen)
371 len = fs_read_attr(fd, B_PW_GID, B_INT32_TYPE, 0LL, &pwbuf->pw_gid, sizeof(gid_t));
376 len = fs_read_attr(fd, B_PW_UID, B_INT32_TYPE, 0LL, &pwbuf->pw_uid, sizeof(uid_t));
383 len = fs_read_attr(fd, B_PW_NAME, B_STRING_TYPE, 0LL, buf, PW_MAX_NAME);
394 len = fs_read_attr(fd, B_PW_DIR, B_STRING_TYPE, 0LL, buf, PW_MAX_DIR);
405 len = fs_read_attr(fd, B_PW_SHELL, B_STRING_TYPE, 0LL, buf, PW_MAX_SHELL);
416 len = fs_read_attr(fd, B_PW_GECOS, B_STRING_TYPE, 0LL, buf, PW_MAX_GECOS);
427 len = fs_read_attr(fd, B_PW_PASSWD, B_STRING_TYPE, 0LL, buf, PW_MAX_PASSWD);
474 int fd;
498 fd = dentopen(dent, p->pwfile);
499 if (fd < B_OK)
501 err = fill_pwent_from_fd(fd, pwbuf, buf, buflen);
503 close(fd);
541 int fd;
564 fd = dentopen(dent, p->pwfile);
566 if (fd < B_OK)
568 err = fill_pwent_from_fd(fd, &p->pwent, p->pwbuff, PWBUFFSZ);
570 close(fd);
584 int fd;
612 fd = dentopen(dent, p->pwfile);
614 if (fd < B_OK)
616 err = fill_pwent_from_fd(fd, &p->pwent, p->pwbuff, PWBUFFSZ);
618 close(fd);