]>
Commit | Line | Data |
---|---|---|
63f126a2 JB |
1 | --- busybox-1.3.1/libpwdgrp/pwd_grp.c.orig 2006-12-27 05:56:32.000000000 +0100 |
2 | +++ busybox-1.3.1/libpwdgrp/pwd_grp.c 2006-12-30 13:31:36.481505160 +0100 | |
3 | @@ -103,6 +103,7 @@ | |
4 | return rv; | |
5 | } | |
6 | ||
7 | +#if ENABLE_FEATURE_SHADOWPASSWDS | |
8 | int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf, | |
9 | char *__restrict buffer, size_t buflen, | |
10 | struct spwd **__restrict result) | |
11 | @@ -117,6 +118,7 @@ | |
12 | ||
13 | return rv; | |
14 | } | |
15 | +#endif | |
16 | ||
17 | /**********************************************************************/ | |
18 | /* For the various fget??ent funcs, return NULL on failure and a | |
19 | @@ -144,6 +146,7 @@ | |
20 | return result; | |
21 | } | |
22 | ||
23 | +#if ENABLE_FEATURE_SHADOWPASSWDS | |
24 | extern int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf, | |
25 | char *__restrict buffer, size_t buflen, | |
26 | struct spwd **__restrict result); | |
27 | @@ -184,6 +187,7 @@ | |
28 | DONE: | |
29 | return rv; | |
30 | } | |
31 | +#endif | |
32 | ||
33 | /**********************************************************************/ | |
34 | ||
35 | @@ -207,6 +211,7 @@ | |
36 | #define DO_GETXXKEY_R_PATHNAME _PATH_GROUP | |
37 | #include "pwd_grp_internal.c" | |
38 | ||
39 | +#if ENABLE_FEATURE_SHADOWPASSWDS | |
40 | #define GETXXKEY_R_FUNC getspnam_R | |
41 | #define GETXXKEY_R_PARSER __parsespent | |
42 | #define GETXXKEY_R_ENTTYPE struct spwd | |
43 | @@ -214,6 +219,7 @@ | |
44 | #define DO_GETXXKEY_R_KEYTYPE const char *__restrict | |
45 | #define DO_GETXXKEY_R_PATHNAME _PATH_SHADOW | |
46 | #include "pwd_grp_internal.c" | |
47 | +#endif | |
48 | ||
49 | #define GETXXKEY_R_FUNC getpwuid_R | |
50 | #define GETXXKEY_R_PARSER __parsepwent | |
51 | @@ -257,6 +263,7 @@ | |
52 | * to have been created as a reentrant version of the non-standard | |
53 | * functions getspuid. Why getspuid was added, I do not know. */ | |
54 | ||
55 | +#if ENABLE_FEATURE_SHADOWPASSWDS | |
56 | int getspuid_r(uid_t uid, struct spwd *__restrict resultbuf, | |
57 | char *__restrict buffer, size_t buflen, | |
58 | struct spwd **__restrict result) | |
59 | @@ -286,6 +293,7 @@ | |
60 | getspuid_r(uid, &resultbuf, buffer, sizeof(buffer), &result); | |
61 | return result; | |
62 | } | |
63 | +#endif | |
64 | ||
65 | struct passwd *getpwnam(const char *name) | |
66 | { | |
67 | @@ -307,6 +315,7 @@ | |
68 | return result; | |
69 | } | |
70 | ||
71 | +#if ENABLE_FEATURE_SHADOWPASSWDS | |
72 | struct spwd *getspnam(const char *name) | |
73 | { | |
74 | static char buffer[PWD_BUFFER_SIZE]; | |
75 | @@ -316,6 +325,7 @@ | |
76 | getspnam_r(name, &resultbuf, buffer, sizeof(buffer), &result); | |
77 | return result; | |
78 | } | |
79 | +#endif | |
80 | ||
81 | int getpw(uid_t uid, char *buf) | |
82 | { | |
83 | @@ -464,6 +474,7 @@ | |
84 | UNLOCK; | |
85 | } | |
86 | ||
87 | +#if ENABLE_FEATURE_SHADOWPASSWDS | |
88 | int getspent_r(struct spwd *resultbuf, char *buffer, | |
89 | size_t buflen, struct spwd **result) | |
90 | { | |
91 | @@ -488,6 +499,7 @@ | |
92 | UNLOCK; | |
93 | return rv; | |
94 | } | |
95 | +#endif | |
96 | ||
97 | struct passwd *getpwent(void) | |
98 | { | |
99 | @@ -509,6 +521,7 @@ | |
100 | return result; | |
101 | } | |
102 | ||
103 | +#if ENABLE_FEATURE_SHADOWPASSWDS | |
104 | struct spwd *getspent(void) | |
105 | { | |
106 | static char line_buff[PWD_BUFFER_SIZE]; | |
107 | @@ -528,6 +541,7 @@ | |
108 | sgetspent_r(string, &spwd, line_buff, sizeof(line_buff), &result); | |
109 | return result; | |
110 | } | |
111 | +#endif | |
112 | ||
113 | int initgroups(const char *user, gid_t gid) | |
114 | { | |
115 | @@ -643,6 +657,7 @@ | |
116 | return rv; | |
117 | } | |
118 | ||
119 | +#if ENABLE_FEATURE_SHADOWPASSWDS | |
120 | static const unsigned char _sp_off[] = { | |
121 | offsetof(struct spwd, sp_lstchg), /* 2 - not a char ptr */ | |
122 | offsetof(struct spwd, sp_min), /* 3 - not a char ptr */ | |
123 | @@ -688,6 +703,7 @@ | |
124 | DO_UNLOCK: | |
125 | return rv; | |
126 | } | |
127 | +#endif | |
128 | ||
129 | /**********************************************************************/ | |
130 | /* Internal uClibc functions. */ | |
131 | @@ -846,6 +862,7 @@ | |
132 | ||
133 | /**********************************************************************/ | |
134 | ||
135 | +#if ENABLE_FEATURE_SHADOWPASSWDS | |
136 | static const unsigned char sp_off[] = { | |
137 | offsetof(struct spwd, sp_namp), /* 0 */ | |
138 | offsetof(struct spwd, sp_pwdp), /* 1 */ | |
139 | @@ -900,6 +917,7 @@ | |
140 | ||
141 | return EINVAL; | |
142 | } | |
143 | +#endif | |
144 | ||
145 | /**********************************************************************/ | |
146 |