The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
Loading...
Searching...
No Matches
shadow.h
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* @file shadow.h
5
* @brief the password hashes (/etc/shadow: name:hash:last:min:max:warn:
6
* inactive:expire:), which only root can read.
7
*
8
* ginnOS uses the name and the hash; the other fields are kept as they
9
* are. a hash of "*" or "!" (or one that starts with "!") is a locked
10
* account; an empty one needs no password.
11
*/
12
13
#define SHADOW_FILE "/etc/shadow"
14
15
struct
spwd
16
{
17
char
*
sp_namp
;
// the user's name
18
char
*
sp_pwdp
;
// the hash ("$5$...")
19
};
20
21
/**
22
* the entry of a user, in a static buffer.
23
* @return NULL if there is none, or the file cannot be read (not root).
24
*/
25
struct
spwd
*
getspnam
(
const
char
*name);
getspnam
struct spwd * getspnam(const char *name)
the entry of a user, in a static buffer.
spwd
Definition
shadow.h:16
spwd::sp_pwdp
char * sp_pwdp
Definition
shadow.h:18
spwd::sp_namp
char * sp_namp
Definition
shadow.h:17
src
libc
include
shadow.h
Generated by
1.18.0