Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
pwd.h
Go to the documentation of this file.
1 
4 #ifndef __PWD_H__
5 #define __PWD_H__
6 
7 #include <sys/types.h>
8 
9 /* Tenok has one user, which is root */
10 struct passwd {
11  char *pw_name; /* The name, always "root" */
12  char *pw_passwd; /* Tenok keeps no password, always empty */
13  uid_t pw_uid; /* Always 0 */
14  gid_t pw_gid; /* Always 0 */
15  char *pw_gecos; /* The description, always empty */
16  char *pw_dir; /* The home directory, always "/" */
17  char *pw_shell; /* The shell, always empty */
18 };
19 
26 struct passwd *getpwuid(uid_t uid);
27 
34 struct passwd *getpwnam(const char *name);
35 
36 #endif
struct passwd * getpwnam(const char *name)
Look a user up by its name.
Definition: pwd.c:33
struct passwd * getpwuid(uid_t uid)
Look a user up by its number.
Definition: pwd.c:28
Definition: pwd.h:10