Changeset 1770 in MondoRescue for branches/stable/mindi-busybox/include/pwd_.h
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/include/pwd_.h
r821 r1770 1 /* vi: set sw=4 ts=4: */ 1 2 /* Copyright (C) 1991,92,95,96,97,98,99,2001 Free Software Foundation, Inc. 2 3 This file is part of the GNU C Library. … … 21 22 */ 22 23 23 #if !defined CONFIG_USE_BB_PWD_GRP 24 #if !ENABLE_USE_BB_PWD_GRP 25 24 26 #include <pwd.h> 25 27 … … 27 29 28 30 #ifndef _PWD_H 29 #define _PWD_H 1 30 31 #include <sys/types.h> 32 #include <features.h> 33 #include <stdio.h> 31 #define _PWD_H 1 34 32 35 33 /* The passwd structure. */ 36 struct passwd 37 { 38 char *pw_name; /* Username. */ 39 char *pw_passwd; /* Password. */ 40 uid_t pw_uid; /* User ID. */ 41 gid_t pw_gid; /* Group ID. */ 42 char *pw_gecos; /* Real name. */ 43 char *pw_dir; /* Home directory. */ 44 char *pw_shell; /* Shell program. */ 34 struct passwd { 35 char *pw_name; /* Username. */ 36 char *pw_passwd; /* Password. */ 37 uid_t pw_uid; /* User ID. */ 38 gid_t pw_gid; /* Group ID. */ 39 char *pw_gecos; /* Real name. */ 40 char *pw_dir; /* Home directory. */ 41 char *pw_shell; /* Shell program. */ 45 42 }; 46 43 47 44 45 #define setpwent bb_internal_setpwent 46 #define endpwent bb_internal_endpwent 47 #define getpwent bb_internal_getpwent 48 #define fgetpwent bb_internal_fgetpwent 49 #define putpwent bb_internal_putpwent 50 #define getpwuid bb_internal_getpwuid 51 #define getpwnam bb_internal_getpwnam 52 #define getpwent_r bb_internal_getpwent_r 53 #define getpwuid_r bb_internal_getpwuid_r 54 #define getpwnam_r bb_internal_getpwnam_r 55 #define fgetpwent_r bb_internal_fgetpwent_r 56 #define getpw bb_internal_getpw 57 58 59 /* All function names below should be remapped by #defines above 60 * in order to not collide with libc names. 61 * In theory it isn't necessary, but I saw weird interactions at link time. 62 * Let's play safe */ 63 64 48 65 /* Rewind the password-file stream. */ 49 extern void setpwent 66 extern void setpwent(void); 50 67 51 68 /* Close the password-file stream. */ 52 extern void endpwent 69 extern void endpwent(void); 53 70 54 71 /* Read an entry from the password-file stream, opening it if necessary. */ 55 extern struct passwd *getpwent 72 extern struct passwd *getpwent(void); 56 73 57 74 /* Read an entry from STREAM. */ 58 extern struct passwd *fgetpwent 75 extern struct passwd *fgetpwent(FILE *__stream); 59 76 60 77 /* Write the given entry onto the given stream. */ 61 extern int putpwent 78 extern int putpwent(__const struct passwd *__restrict __p, 62 79 FILE *__restrict __f); 63 80 64 81 /* Search for an entry with a matching user ID. */ 65 extern struct passwd *getpwuid 82 extern struct passwd *getpwuid(uid_t __uid); 66 83 67 84 /* Search for an entry with a matching username. */ 68 extern struct passwd *getpwnam 85 extern struct passwd *getpwnam(__const char *__name); 69 86 70 87 /* Reentrant versions of some of the functions above. … … 76 93 POSIX people would choose. */ 77 94 78 extern int getpwent_r 95 extern int getpwent_r(struct passwd *__restrict __resultbuf, 79 96 char *__restrict __buffer, size_t __buflen, 80 97 struct passwd **__restrict __result); 81 98 82 extern int getpwuid_r 99 extern int getpwuid_r(uid_t __uid, 83 100 struct passwd *__restrict __resultbuf, 84 101 char *__restrict __buffer, size_t __buflen, 85 102 struct passwd **__restrict __result); 86 103 87 extern int getpwnam_r 104 extern int getpwnam_r(__const char *__restrict __name, 88 105 struct passwd *__restrict __resultbuf, 89 106 char *__restrict __buffer, size_t __buflen, 90 107 struct passwd **__restrict __result); 91 108 92 93 109 /* Read an entry from STREAM. This function is not standardized and 94 110 probably never will. */ 95 extern int fgetpwent_r 111 extern int fgetpwent_r(FILE *__restrict __stream, 96 112 struct passwd *__restrict __resultbuf, 97 113 char *__restrict __buffer, size_t __buflen, … … 101 117 in the given buffer. This knows the format that the caller 102 118 will expect, but this need not be the format of the password file. */ 103 extern int getpw 119 extern int getpw(uid_t __uid, char *__buffer); 104 120 105 121 #endif /* pwd.h */
Note:
See TracChangeset
for help on using the changeset viewer.