The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
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
10
struct
passwd
11
{
12
char
*
pw_name
;
13
char
*
pw_passwd
;
14
uid_t
pw_uid
;
15
gid_t
pw_gid
;
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
*/
25
struct
passwd
*
getpwuid
(
uid_t
uid);
26
struct
passwd
*
getpwnam
(
const
char
*name);
getpwuid
struct passwd * getpwuid(uid_t uid)
look up a user by id or name.
getpwnam
struct passwd * getpwnam(const char *name)
passwd
Definition
pwd.h:11
passwd::pw_name
char * pw_name
Definition
pwd.h:12
passwd::pw_gecos
char * pw_gecos
Definition
pwd.h:16
passwd::pw_passwd
char * pw_passwd
Definition
pwd.h:13
passwd::pw_shell
char * pw_shell
Definition
pwd.h:18
passwd::pw_uid
uid_t pw_uid
Definition
pwd.h:14
passwd::pw_gid
gid_t pw_gid
Definition
pwd.h:15
passwd::pw_dir
char * pw_dir
Definition
pwd.h:17
types.h
basic system types.
uid_t
unsigned int uid_t
Definition
types.h:17
gid_t
unsigned int gid_t
Definition
types.h:18
src
libc
include
pwd.h
Generated by
1.18.0