… | |
… | |
15 | revoke \ |
15 | revoke \ |
16 | _getpty \ |
16 | _getpty \ |
17 | getpt \ |
17 | getpt \ |
18 | posix_openpt \ |
18 | posix_openpt \ |
19 | isastream \ |
19 | isastream \ |
|
|
20 | setuid \ |
|
|
21 | seteuid \ |
|
|
22 | setreuid \ |
|
|
23 | setresuid \ |
20 | ) |
24 | ) |
21 | |
25 | |
22 | have_clone=no |
26 | have_clone=no |
23 | |
27 | |
24 | AC_MSG_CHECKING(for /dev/ptym/clone) |
28 | AC_MSG_CHECKING(for /dev/ptym/clone) |
… | |
… | |
74 | fi |
78 | fi |
75 | ]) |
79 | ]) |
76 | |
80 | |
77 | AC_DEFUN([UTMP_CHECK], |
81 | AC_DEFUN([UTMP_CHECK], |
78 | [ |
82 | [ |
|
|
83 | support_utmp=yes |
|
|
84 | support_wtmp=yes |
|
|
85 | support_lastlog=yes |
|
|
86 | |
79 | AC_ARG_ENABLE(utmp, |
87 | AC_ARG_ENABLE(utmp, |
80 | [ --enable-utmp enable utmp (utmpx) support], |
88 | [AS_HELP_STRING([--enable-utmp],[enable utmp (utmpx) support])], |
81 | [if test x$enableval = xyes -o x$enableval = xno; then |
89 | [if test x$enableval = xyes -o x$enableval = xno; then |
82 | support_utmp=$enableval |
90 | support_utmp=$enableval |
83 | fi]) |
91 | fi]) |
84 | |
92 | |
85 | AC_ARG_ENABLE(wtmp, |
93 | AC_ARG_ENABLE(wtmp, |
86 | [ --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp)], |
94 | [AS_HELP_STRING([--enable-wtmp],[enable wtmp (wtmpx) support (requires --enable-utmp)])], |
87 | [if test x$enableval = xyes -o x$enableval = xno; then |
95 | [if test x$enableval = xyes -o x$enableval = xno; then |
88 | support_wtmp=$enableval |
96 | support_wtmp=$enableval |
89 | fi]) |
97 | fi]) |
90 | |
98 | |
91 | AC_ARG_ENABLE(lastlog, |
99 | AC_ARG_ENABLE(lastlog, |
92 | [ --enable-lastlog enable lastlog support (requires --enable-utmp)], |
100 | [AS_HELP_STRING([--enable-lastlog],[enable lastlog support (requires --enable-utmp)])], |
93 | [if test x$enableval = xyes -o x$enableval = xno; then |
101 | [if test x$enableval = xyes -o x$enableval = xno; then |
94 | support_lastlog=$enableval |
102 | support_lastlog=$enableval |
95 | fi]) |
103 | fi]) |
96 | |
104 | |
97 | if test x$support_utmp = xyes; then |
105 | if test x$support_utmp = xyes; then |
… | |
… | |
103 | if test x$support_lastlog = xyes; then |
111 | if test x$support_lastlog = xyes; then |
104 | AC_DEFINE(LASTLOG_SUPPORT, 1, Define if you want to have lastlog support when utmp/utmpx is enabled) |
112 | AC_DEFINE(LASTLOG_SUPPORT, 1, Define if you want to have lastlog support when utmp/utmpx is enabled) |
105 | fi |
113 | fi |
106 | |
114 | |
107 | AC_CHECK_FUNCS( \ |
115 | AC_CHECK_FUNCS( \ |
108 | ttyslot \ |
|
|
109 | updwtmp \ |
116 | updwtmp \ |
110 | updwtmpx \ |
117 | updwtmpx \ |
|
|
118 | updlastlogx \ |
111 | ) |
119 | ) |
112 | |
120 | |
113 | AC_CHECK_HEADERS( \ |
121 | AC_CHECK_HEADERS( \ |
114 | utmp.h \ |
122 | utmp.h \ |
115 | utmpx.h \ |
123 | utmpx.h \ |
… | |
… | |
204 | dnl# -------------------------------------------------------------------------- |
212 | dnl# -------------------------------------------------------------------------- |
205 | |
213 | |
206 | dnl# find utmp |
214 | dnl# find utmp |
207 | AC_CACHE_CHECK(where utmp is located, path_utmp, |
215 | AC_CACHE_CHECK(where utmp is located, path_utmp, |
208 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
216 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
217 | #include <stdlib.h> |
209 | #include <sys/types.h> |
218 | #include <sys/types.h> |
210 | #include <utmp.h> |
219 | #include <utmp.h> |
211 | #include <errno.h> |
220 | #include <errno.h> |
212 | main() |
221 | main() |
213 | { |
222 | { |
… | |
… | |
240 | |
249 | |
241 | dnl# find utmpx - if a utmp file exists at the same location and is more than |
250 | dnl# find utmpx - if a utmp file exists at the same location and is more than |
242 | dnl# a day newer, then dump the utmpx. People leave lots of junk around. |
251 | dnl# a day newer, then dump the utmpx. People leave lots of junk around. |
243 | AC_CACHE_CHECK(where utmpx is located, path_utmpx, |
252 | AC_CACHE_CHECK(where utmpx is located, path_utmpx, |
244 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
253 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
254 | #include <stdlib.h> |
245 | #include <sys/types.h> |
255 | #include <sys/types.h> |
246 | #include <utmpx.h> |
256 | #include <utmpx.h> |
247 | #include <errno.h> |
257 | #include <errno.h> |
248 | #include <sys/stat.h> |
258 | #include <sys/stat.h> |
249 | #ifdef HAVE_STRING_H |
259 | #ifdef HAVE_STRING_H |
… | |
… | |
285 | dnl# -------------------------------------------------------------------------- |
295 | dnl# -------------------------------------------------------------------------- |
286 | |
296 | |
287 | dnl# find wtmp |
297 | dnl# find wtmp |
288 | AC_CACHE_CHECK(where wtmp is located, path_wtmp, |
298 | AC_CACHE_CHECK(where wtmp is located, path_wtmp, |
289 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
299 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
300 | #include <stdlib.h> |
290 | #include <sys/types.h> |
301 | #include <sys/types.h> |
291 | #ifdef HAVE_UTMP_H |
302 | #ifdef HAVE_UTMP_H |
292 | #include <utmp.h> |
303 | #include <utmp.h> |
293 | #endif |
304 | #endif |
294 | #include <errno.h> |
305 | #include <errno.h> |
295 | main() |
306 | main() |
296 | { |
307 | { |
297 | char **w, *wtmplist[] = { |
308 | char **w, *wtmplist[] = { |
298 | "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL }; |
309 | "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL }; |
299 | FILE *a, *f=fopen("conftestval", "w"); |
310 | FILE *a, *f=fopen("conftestval", "w"); |
300 | if (!f) exit(1); |
311 | if (!f) exit(1); |
301 | #ifdef WTMP_FILE |
312 | #ifdef WTMP_FILE |
302 | fprintf(f, "%s\n", WTMP_FILE); |
313 | fprintf(f, "%s\n", WTMP_FILE); |
303 | exit(0); |
314 | exit(0); |
… | |
… | |
321 | dnl# -------------------------------------------------------------------------- |
332 | dnl# -------------------------------------------------------------------------- |
322 | |
333 | |
323 | dnl# find wtmpx |
334 | dnl# find wtmpx |
324 | AC_CACHE_CHECK(where wtmpx is located, path_wtmpx, |
335 | AC_CACHE_CHECK(where wtmpx is located, path_wtmpx, |
325 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
336 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
337 | #include <stdlib.h> |
326 | #ifdef HAVE_UTMPX_H |
338 | #ifdef HAVE_UTMPX_H |
327 | #include <utmpx.h> |
339 | #include <utmpx.h> |
328 | #endif |
340 | #endif |
329 | #include <errno.h> |
341 | #include <errno.h> |
330 | main() |
342 | main() |
331 | { |
343 | { |
332 | char **w, *wtmplist[] = { |
344 | char **w, *wtmplist[] = { |
333 | "/var/log/wtmpx", "/var/adm/wtmpx", NULL }; |
345 | "/var/log/wtmpx", "/var/adm/wtmpx", NULL }; |
334 | FILE *a, *f=fopen("conftestval", "w"); |
346 | FILE *a, *f=fopen("conftestval", "w"); |
335 | if (!f) exit(1); |
347 | if (!f) exit(1); |
336 | #ifdef WTMPX_FILE |
348 | #ifdef WTMPX_FILE |
337 | fprintf(f, "%s\n", WTMPX_FILE); |
349 | fprintf(f, "%s\n", WTMPX_FILE); |
338 | exit(0); |
350 | exit(0); |
… | |
… | |
356 | dnl# -------------------------------------------------------------------------- |
368 | dnl# -------------------------------------------------------------------------- |
357 | |
369 | |
358 | dnl# find lastlog |
370 | dnl# find lastlog |
359 | AC_CACHE_CHECK(where lastlog is located, path_lastlog, |
371 | AC_CACHE_CHECK(where lastlog is located, path_lastlog, |
360 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
372 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
373 | #include <stdlib.h> |
361 | #include <sys/types.h> |
374 | #include <sys/types.h> |
362 | #ifdef HAVE_UTMPX_H |
375 | #ifdef HAVE_UTMPX_H |
363 | #include <utmpx.h> |
376 | #include <utmpx.h> |
364 | #elif defined(HAVE_UTMP_H) |
377 | #elif defined(HAVE_UTMP_H) |
365 | #include <utmp.h> |
378 | #include <utmp.h> |
… | |
… | |
390 | exit(0); |
403 | exit(0); |
391 | }]])],[path_lastlog=`cat conftestval`],[path_lastlog=],[dnl |
404 | }]])],[path_lastlog=`cat conftestval`],[path_lastlog=],[dnl |
392 | AC_MSG_WARN(Define LASTLOG_FILE in config.h manually)])]) |
405 | AC_MSG_WARN(Define LASTLOG_FILE in config.h manually)])]) |
393 | if test x$path_lastlog != x; then |
406 | if test x$path_lastlog != x; then |
394 | AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$path_lastlog", Define location of lastlog) |
407 | AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$path_lastlog", Define location of lastlog) |
395 | if test -d "$path_lastlog"; then |
|
|
396 | AC_DEFINE(LASTLOG_IS_DIR, 1, Define if lastlog is provided via a directory) |
|
|
397 | fi |
|
|
398 | fi |
408 | fi |
399 | dnl# -------------------------------------------------------------------------- |
409 | dnl# -------------------------------------------------------------------------- |
400 | |
410 | |
401 | dnl# find lastlogx |
411 | dnl# find lastlogx |
402 | AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, |
412 | AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, |
403 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
413 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
414 | #include <stdlib.h> |
404 | #ifdef HAVE_UTMPX_H |
415 | #ifdef HAVE_UTMPX_H |
405 | #include <utmpx.h> |
416 | #include <utmpx.h> |
406 | #endif |
417 | #endif |
407 | #include <errno.h> |
418 | #include <errno.h> |
408 | main() |
419 | main() |
… | |
… | |
428 | }]])],[path_lastlogx=`cat conftestval`],[path_lastlogx=],[dnl |
439 | }]])],[path_lastlogx=`cat conftestval`],[path_lastlogx=],[dnl |
429 | AC_MSG_WARN(Define LASTLOGX_FILE in config.h manually)])]) |
440 | AC_MSG_WARN(Define LASTLOGX_FILE in config.h manually)])]) |
430 | if test x$path_lastlogx != x; then |
441 | if test x$path_lastlogx != x; then |
431 | AC_DEFINE_UNQUOTED(LASTLOGX_FILE, "$path_lastlogx", Define location of lastlogx) |
442 | AC_DEFINE_UNQUOTED(LASTLOGX_FILE, "$path_lastlogx", Define location of lastlogx) |
432 | fi |
443 | fi |
433 | |
|
|
434 | if test x$support_utmp != xyes; then |
|
|
435 | echo " utmp support: disabled" |
|
|
436 | echo |
|
|
437 | else |
|
|
438 | echo " utmp support: enabled |
|
|
439 | utmp file: $path_utmp |
|
|
440 | utmpx file: $path_utmpx |
|
|
441 | wtmp file: $path_wtmp |
|
|
442 | wtmpx file: $path_wtmpx |
|
|
443 | lastlog file: $path_lastlog |
|
|
444 | lastlogx file: $path_lastlogx" |
|
|
445 | fi |
|
|
446 | ]) |
444 | ]) |
447 | |
445 | |
448 | AC_DEFUN([SCM_RIGHTS_CHECK], |
446 | AC_DEFUN([SCM_RIGHTS_CHECK], |
449 | [ |
447 | [ |
450 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, can_pass_fds, |
448 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, can_pass_fds, |
451 | [AC_TRY_LINK([ |
449 | [AC_TRY_LINK([ |
452 | #include <cstddef> // broken bsds (is that redundant) need this |
450 | #include <cstddef> // broken bsds (is that redundant?) need this |
453 | #include <sys/types.h> |
451 | #include <sys/types.h> |
454 | #include <sys/socket.h> |
452 | #include <sys/socket.h> |
455 | #include <sys/uio.h> |
453 | #include <sys/uio.h> |
456 | ],[ |
454 | ],[ |
457 | { |
455 | { |