… | |
… | |
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 | |
|
|
87 | AC_ARG_ENABLE(utmp, |
|
|
88 | [ --enable-utmp enable utmp (utmpx) support], |
|
|
89 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
90 | support_utmp=$enableval |
|
|
91 | fi]) |
|
|
92 | |
|
|
93 | AC_ARG_ENABLE(wtmp, |
|
|
94 | [ --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp)], |
|
|
95 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
96 | support_wtmp=$enableval |
|
|
97 | fi]) |
|
|
98 | |
|
|
99 | AC_ARG_ENABLE(lastlog, |
|
|
100 | [ --enable-lastlog enable lastlog support (requires --enable-utmp)], |
|
|
101 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
102 | support_lastlog=$enableval |
|
|
103 | fi]) |
|
|
104 | |
|
|
105 | if test x$support_utmp = xyes; then |
|
|
106 | AC_DEFINE(UTMP_SUPPORT, 1, Define if you want to have utmp/utmpx support) |
|
|
107 | fi |
|
|
108 | if test x$support_wtmp = xyes; then |
|
|
109 | AC_DEFINE(WTMP_SUPPORT, 1, Define if you want to have wtmp support when utmp/utmpx is enabled) |
|
|
110 | fi |
|
|
111 | if test x$support_lastlog = xyes; then |
|
|
112 | AC_DEFINE(LASTLOG_SUPPORT, 1, Define if you want to have lastlog support when utmp/utmpx is enabled) |
|
|
113 | fi |
|
|
114 | |
79 | AC_CHECK_FUNCS( \ |
115 | AC_CHECK_FUNCS( \ |
80 | ttyslot \ |
116 | ttyslot \ |
81 | updwtmp \ |
117 | updwtmp \ |
82 | updwtmpx \ |
118 | updwtmpx \ |
83 | ) |
119 | ) |
… | |
… | |
406 | |
442 | |
407 | AC_DEFUN([SCM_RIGHTS_CHECK], |
443 | AC_DEFUN([SCM_RIGHTS_CHECK], |
408 | [ |
444 | [ |
409 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, can_pass_fds, |
445 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, can_pass_fds, |
410 | [AC_TRY_LINK([ |
446 | [AC_TRY_LINK([ |
411 | #include <cstddef> // broken bsds (is that redundant) need this |
447 | #include <cstddef> // broken bsds (is that redundant?) need this |
412 | #include <sys/types.h> |
448 | #include <sys/types.h> |
413 | #include <sys/socket.h> |
449 | #include <sys/socket.h> |
414 | #include <sys/uio.h> |
450 | #include <sys/uio.h> |
415 | ],[ |
451 | ],[ |
416 | { |
452 | { |
… | |
… | |
441 | AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) |
477 | AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) |
442 | else |
478 | else |
443 | AC_MSG_ERROR([libptytty requires unix-compliant filehandle passing ability]) |
479 | AC_MSG_ERROR([libptytty requires unix-compliant filehandle passing ability]) |
444 | fi |
480 | fi |
445 | ]) |
481 | ]) |
|
|
482 | |
|
|
483 | AC_DEFUN([TTY_GROUP_CHECK], |
|
|
484 | [ |
|
|
485 | AC_CACHE_CHECK([for tty group], tty_group, |
|
|
486 | [AC_TRY_RUN([ |
|
|
487 | #include <sys/types.h> |
|
|
488 | #include <sys/stat.h> |
|
|
489 | #include <unistd.h> |
|
|
490 | #include <grp.h> |
|
|
491 | |
|
|
492 | main() |
|
|
493 | { |
|
|
494 | struct stat st; |
|
|
495 | struct group *gr; |
|
|
496 | char *tty; |
|
|
497 | gr = getgrnam("tty"); |
|
|
498 | tty = ttyname(0); |
|
|
499 | if (gr != 0 |
|
|
500 | && tty != 0 |
|
|
501 | && (stat(tty, &st)) == 0 |
|
|
502 | && st.st_gid == gr->gr_gid) |
|
|
503 | return 0; |
|
|
504 | else |
|
|
505 | return 1; |
|
|
506 | }], |
|
|
507 | [tty_group=yes],[tty_group=no],[tty_group=no])]) |
|
|
508 | if test x$tty_group = xyes; then |
|
|
509 | AC_DEFINE(TTY_GID_SUPPORT, 1, "") |
|
|
510 | fi]) |
|
|
511 | |