diff options
author | Damien Miller <djm@mindrot.org> | 1999-12-09 10:16:54 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-12-09 10:16:54 +1100 |
commit | bf1c9b2012fadab02392126bece5d21e9ddffda6 (patch) | |
tree | 371e5f27669fa28773e2b2bb008a81a03715cf2e /acconfig.h | |
parent | fce1648681a20b99f569d4bfd9335bc4a956b119 (diff) |
- Import of patch from Ben Taylor <bent@clark.net>:
- Improved PAM support
- "uninstall" rule for Makefile
- utmpx support
- Should fix PAM problems on Solaris
Diffstat (limited to 'acconfig.h')
-rw-r--r-- | acconfig.h | 53 |
1 files changed, 40 insertions, 13 deletions
diff --git a/acconfig.h b/acconfig.h index 29ec07821..811c00d47 100644 --- a/acconfig.h +++ b/acconfig.h | |||
@@ -24,6 +24,9 @@ | |||
24 | /* Define is utmp.h has a ut_host field */ | 24 | /* Define is utmp.h has a ut_host field */ |
25 | #undef HAVE_HOST_IN_UTMP | 25 | #undef HAVE_HOST_IN_UTMP |
26 | 26 | ||
27 | /* Define is utmpx.h has a ut_host field */ | ||
28 | #undef HAVE_HOST_IN_UTMPX | ||
29 | |||
27 | /* Define is libutil has login() function */ | 30 | /* Define is libutil has login() function */ |
28 | #undef HAVE_LIBUTIL_LOGIN | 31 | #undef HAVE_LIBUTIL_LOGIN |
29 | 32 | ||
@@ -85,6 +88,10 @@ | |||
85 | # include <utmp.h> /* For _PATH_XXX */ | 88 | # include <utmp.h> /* For _PATH_XXX */ |
86 | #endif | 89 | #endif |
87 | 90 | ||
91 | #ifdef HAVE_UTMPX_H | ||
92 | # include <utmpx.h> /* For _PATH_XXX */ | ||
93 | #endif | ||
94 | |||
88 | #ifdef HAVE_SYS_TIME_H | 95 | #ifdef HAVE_SYS_TIME_H |
89 | # include <sys/time.h> /* For timersub */ | 96 | # include <sys/time.h> /* For timersub */ |
90 | #endif | 97 | #endif |
@@ -96,13 +103,13 @@ | |||
96 | #ifndef SHUT_RDWR | 103 | #ifndef SHUT_RDWR |
97 | enum | 104 | enum |
98 | { | 105 | { |
99 | SHUT_RD = 0, /* No more receptions. */ | 106 | SHUT_RD = 0, /* No more receptions. */ |
100 | #define SHUT_RD SHUT_RD | 107 | SHUT_WR, /* No more transmissions. */ |
101 | SHUT_WR, /* No more transmissions. */ | 108 | SHUT_RDWR /* No more receptions or transmissions. */ |
102 | #define SHUT_WR SHUT_WR | ||
103 | SHUT_RDWR /* No more receptions or transmissions. */ | ||
104 | #define SHUT_RDWR SHUT_RDWR | ||
105 | }; | 109 | }; |
110 | # define SHUT_RD SHUT_RD | ||
111 | # define SHUT_WR SHUT_WR | ||
112 | # define SHUT_RDWR SHUT_RDWR | ||
106 | #endif | 113 | #endif |
107 | 114 | ||
108 | /* If sys/types.h does not supply intXX_t, supply them ourselves */ | 115 | /* If sys/types.h does not supply intXX_t, supply them ourselves */ |
@@ -164,25 +171,44 @@ enum | |||
164 | # define quad_t int64_t | 171 | # define quad_t int64_t |
165 | #endif | 172 | #endif |
166 | 173 | ||
174 | /* If _PATH_LASTLOG is not defined by system headers, set it to the */ | ||
175 | /* lastlog file detected by autoconf */ | ||
167 | #ifndef _PATH_LASTLOG | 176 | #ifndef _PATH_LASTLOG |
168 | # ifdef LASTLOG_LOCATION | 177 | # ifdef LASTLOG_LOCATION |
169 | # define _PATH_LASTLOG LASTLOG_LOCATION | 178 | # define _PATH_LASTLOG LASTLOG_LOCATION |
170 | # endif | 179 | # endif |
171 | #endif | 180 | #endif |
172 | 181 | ||
182 | /* Use utmpx if supported */ | ||
183 | #ifdef HAVE_UTMPX_H | ||
184 | # define UTMP_STR utmpx | ||
185 | #else | ||
186 | # ifdef HAVE_UTMP_H | ||
187 | # define UTMP_STR utmp | ||
188 | # endif | ||
189 | #endif | ||
190 | |||
173 | #ifndef _PATH_UTMP | 191 | #ifndef _PATH_UTMP |
174 | # ifdef UTMP_FILE | 192 | # ifdef UTMPX_FILE |
175 | # define _PATH_UTMP UTMP_FILE | 193 | # define _PATH_UTMP UTMPX_FILE |
176 | # else | 194 | # else |
177 | # define _PATH_UTMP "/var/adm/utmp" | 195 | # ifdef UTMP_FILE |
196 | # define _PATH_UTMP UTMP_FILE | ||
197 | # else | ||
198 | # define _PATH_UTMP "/var/adm/utmp" | ||
199 | # endif | ||
178 | # endif | 200 | # endif |
179 | #endif | 201 | #endif |
180 | 202 | ||
181 | #ifndef _PATH_WTMP | 203 | #ifndef _PATH_WTMP |
182 | # ifdef WTMP_FILE | 204 | # ifdef WTMPX_FILE |
183 | # define _PATH_WTMP WTMP_FILE | 205 | # define _PATH_WTMP WTMPX_FILE |
184 | # else | 206 | # else |
185 | # define _PATH_WTMP "/var/adm/wtmp" | 207 | # ifdef WTMP_FILE |
208 | # define _PATH_WTMP WTMP_FILE | ||
209 | # else | ||
210 | # define _PATH_WTMP "/var/adm/wtmp" | ||
211 | # endif | ||
186 | # endif | 212 | # endif |
187 | #endif | 213 | #endif |
188 | 214 | ||
@@ -219,9 +245,9 @@ enum | |||
219 | (result)->tv_usec += 1000000; \ | 245 | (result)->tv_usec += 1000000; \ |
220 | } \ | 246 | } \ |
221 | } while (0) | 247 | } while (0) |
222 | |||
223 | #endif | 248 | #endif |
224 | 249 | ||
250 | /* In older versions of libpam, pam_strerror takes a single argument */ | ||
225 | #ifdef HAVE_OLD_PAM | 251 | #ifdef HAVE_OLD_PAM |
226 | # define PAM_STRERROR(a,b) pam_strerror((b)) | 252 | # define PAM_STRERROR(a,b) pam_strerror((b)) |
227 | #else | 253 | #else |
@@ -231,3 +257,4 @@ enum | |||
231 | #ifndef __P | 257 | #ifndef __P |
232 | # define __P(x) x | 258 | # define __P(x) x |
233 | #endif | 259 | #endif |
260 | |||