The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
pwd.h
Go to the documentation of this file.
1#pragma once
2
3#include <sys/types.h>
4
5/**
6 * @file pwd.h
7 * @brief the user database (/etc/passwd: name:password:uid:gid:gecos:home:shell).
8 */
9
10struct passwd
11{
12 char *pw_name;
13 char *pw_passwd;
16 char *pw_gecos;
17 char *pw_dir;
18 char *pw_shell;
19};
20
21/**
22 * look up a user by id or name. the result is overwritten by the next call.
23 * @return the entry, or NULL if there is none.
24 */
25struct passwd *getpwuid(uid_t uid);
26struct passwd *getpwnam(const char *name);
struct passwd * getpwuid(uid_t uid)
look up a user by id or name.
struct passwd * getpwnam(const char *name)
Definition pwd.h:11
char * pw_name
Definition pwd.h:12
char * pw_gecos
Definition pwd.h:16
char * pw_passwd
Definition pwd.h:13
char * pw_shell
Definition pwd.h:18
uid_t pw_uid
Definition pwd.h:14
gid_t pw_gid
Definition pwd.h:15
char * pw_dir
Definition pwd.h:17
basic system types.
unsigned int uid_t
Definition types.h:17
unsigned int gid_t
Definition types.h:18