summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/include/pwd.h
blob: 8901a2d7fd42b1447fc3d2117c9433ba5e5c393d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef _PWD_H
#define _PWD_H

#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdio.h>

struct passwd {
  char *pw_name;		/* Username.  */
  char *pw_passwd;		/* Password.  */
  uid_t pw_uid;			/* User ID.  */
  gid_t pw_gid;			/* Group ID.  */
  char *pw_gecos;		/* Real name.  */
  char *pw_dir;			/* Home directory.  */
  char *pw_shell;		/* Shell program.  */
};

extern struct passwd *getpwuid (uid_t uid) __THROW;
extern struct passwd *getpwnam (const char *name) __THROW;

extern struct passwd *getpwent(void) __THROW;
extern void setpwent(void) __THROW;
extern void endpwent(void) __THROW;
extern int putpwent(const struct passwd *p, FILE *stream) __THROW;

int getpwent_r(struct passwd *res, char *buf, size_t buflen,
	       struct passwd **res_sig) __THROW;
int getpwnam_r(const char* name,
	       struct passwd *res, char *buf, size_t buflen,
	       struct passwd **res_sig) __THROW;
int getpwuid_r(uid_t uid,
	       struct passwd *res, char *buf, size_t buflen,
	       struct passwd **res_sig) __THROW;

#endif