… | |
… | |
7 | pty.h \ |
7 | pty.h \ |
8 | util.h \ |
8 | util.h \ |
9 | libutil.h \ |
9 | libutil.h \ |
10 | sys/ioctl.h \ |
10 | sys/ioctl.h \ |
11 | sys/stropts.h \ |
11 | sys/stropts.h \ |
|
|
12 | stropts.h \ |
12 | ) |
13 | ) |
13 | |
14 | |
14 | AC_CHECK_FUNCS( \ |
15 | AC_CHECK_FUNCS( \ |
15 | revoke \ |
16 | revoke \ |
16 | _getpty \ |
17 | _getpty \ |
… | |
… | |
63 | ;; |
64 | ;; |
64 | esac |
65 | esac |
65 | |
66 | |
66 | if test x$ac_cv_func_getpt = xyes -o x$ac_cv_func_posix_openpt = xyes -o x$have_clone = xyes; then |
67 | if test x$ac_cv_func_getpt = xyes -o x$ac_cv_func_posix_openpt = xyes -o x$have_clone = xyes; then |
67 | AC_MSG_CHECKING(for UNIX98 ptys) |
68 | AC_MSG_CHECKING(for UNIX98 ptys) |
68 | AC_TRY_LINK([#include <stdlib.h>], |
69 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]], |
69 | [grantpt(0);unlockpt(0);ptsname(0);], |
70 | [[grantpt(0);unlockpt(0);ptsname(0);]])], |
70 | [unix98_pty=yes |
71 | [unix98_pty=yes |
71 | AC_DEFINE(UNIX98_PTY, 1, "") |
72 | AC_DEFINE(UNIX98_PTY, 1, "") |
72 | AC_MSG_RESULT(yes)], |
73 | AC_MSG_RESULT(yes)], |
73 | [AC_MSG_RESULT(no)]) |
74 | [AC_MSG_RESULT(no)]) |
74 | fi |
75 | fi |
… | |
… | |
83 | support_utmp=yes |
84 | support_utmp=yes |
84 | support_wtmp=yes |
85 | support_wtmp=yes |
85 | support_lastlog=yes |
86 | support_lastlog=yes |
86 | |
87 | |
87 | AC_ARG_ENABLE(utmp, |
88 | AC_ARG_ENABLE(utmp, |
88 | [ --enable-utmp enable utmp (utmpx) support], |
89 | [AS_HELP_STRING([--enable-utmp],[enable utmp (utmpx) support])], |
89 | [if test x$enableval = xyes -o x$enableval = xno; then |
90 | [if test x$enableval = xyes -o x$enableval = xno; then |
90 | support_utmp=$enableval |
91 | support_utmp=$enableval |
91 | fi]) |
92 | fi]) |
92 | |
93 | |
93 | AC_ARG_ENABLE(wtmp, |
94 | AC_ARG_ENABLE(wtmp, |
94 | [ --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp)], |
95 | [AS_HELP_STRING([--enable-wtmp],[enable wtmp (wtmpx) support (requires --enable-utmp)])], |
95 | [if test x$enableval = xyes -o x$enableval = xno; then |
96 | [if test x$enableval = xyes -o x$enableval = xno; then |
96 | support_wtmp=$enableval |
97 | support_wtmp=$enableval |
97 | fi]) |
98 | fi]) |
98 | |
99 | |
99 | AC_ARG_ENABLE(lastlog, |
100 | AC_ARG_ENABLE(lastlog, |
100 | [ --enable-lastlog enable lastlog support (requires --enable-utmp)], |
101 | [AS_HELP_STRING([--enable-lastlog],[enable lastlog support (requires --enable-utmp)])], |
101 | [if test x$enableval = xyes -o x$enableval = xno; then |
102 | [if test x$enableval = xyes -o x$enableval = xno; then |
102 | support_lastlog=$enableval |
103 | support_lastlog=$enableval |
103 | fi]) |
104 | fi]) |
104 | |
105 | |
105 | if test x$support_utmp = xyes; then |
106 | if test x$support_utmp = xyes; then |
… | |
… | |
111 | if test x$support_lastlog = xyes; then |
112 | 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 | AC_DEFINE(LASTLOG_SUPPORT, 1, Define if you want to have lastlog support when utmp/utmpx is enabled) |
113 | fi |
114 | fi |
114 | |
115 | |
115 | AC_CHECK_FUNCS( \ |
116 | AC_CHECK_FUNCS( \ |
116 | ttyslot \ |
|
|
117 | updwtmp \ |
117 | updwtmp \ |
118 | updwtmpx \ |
118 | updwtmpx \ |
|
|
119 | updlastlogx \ |
119 | ) |
120 | ) |
120 | |
121 | |
121 | AC_CHECK_HEADERS( \ |
122 | AC_CHECK_HEADERS(lastlog.h) |
122 | utmp.h \ |
|
|
123 | utmpx.h \ |
|
|
124 | lastlog.h \ |
|
|
125 | ) |
|
|
126 | |
123 | |
127 | dnl# -------------------------------------------------------------------------- |
124 | dnl# -------------------------------------------------------------------------- |
128 | dnl# DO ALL UTMP AND WTMP CHECKING |
125 | dnl# DO ALL UTMP AND WTMP CHECKING |
129 | dnl# -------------------------------------------------------------------------- |
126 | dnl# -------------------------------------------------------------------------- |
130 | dnl# check for host field in utmp structure |
127 | dnl# check for host field in utmp structure |
131 | |
128 | |
132 | dnl# -------------------------------------------- |
129 | dnl# -------------------------------------------- |
133 | AC_CHECK_HEADER(utmp.h, |
130 | AC_CHECK_HEADERS(utmp.h, |
134 | [AC_CACHE_CHECK([for struct utmp], struct_utmp, |
131 | [AC_CACHE_CHECK([for struct utmp], struct_utmp, |
135 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
132 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
136 | #include <utmp.h>]], [[struct utmp ut;]])],[struct_utmp=yes],[struct_utmp=no])]) |
133 | #include <utmp.h>]], [[struct utmp ut;]])],[struct_utmp=yes],[struct_utmp=no])]) |
137 | if test x$struct_utmp = xyes; then |
134 | if test x$struct_utmp = xyes; then |
138 | AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
135 | AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
… | |
… | |
150 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
147 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
151 | #include <utmp.h>]], [[struct utmp ut; ut.ut_pid;]])],[struct_utmp_pid=yes],[struct_utmp_pid=no])]) |
148 | #include <utmp.h>]], [[struct utmp ut; ut.ut_pid;]])],[struct_utmp_pid=yes],[struct_utmp_pid=no])]) |
152 | if test x$struct_utmp_pid = xyes; then |
149 | if test x$struct_utmp_pid = xyes; then |
153 | AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) |
150 | AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) |
154 | fi |
151 | fi |
155 | ) dnl# AC_CHECK_HEADER(utmp.h |
152 | ) dnl# AC_CHECK_HEADERS(utmp.h |
156 | |
153 | |
157 | dnl# -------------------------------------------- |
154 | dnl# -------------------------------------------- |
158 | |
155 | |
159 | AC_CHECK_HEADER(utmpx.h, |
156 | AC_CHECK_HEADERS(utmpx.h, |
160 | [AC_CACHE_CHECK([for struct utmpx], struct_utmpx, |
157 | [AC_CACHE_CHECK([for struct utmpx], struct_utmpx, |
161 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
158 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
162 | #include <utmpx.h>]], [[struct utmpx ut;]])],[struct_utmpx=yes],[struct_utmpx=no])]) |
159 | #include <utmpx.h>]], [[struct utmpx ut;]])],[struct_utmpx=yes],[struct_utmpx=no])]) |
163 | if test x$struct_utmpx = xyes; then |
160 | if test x$struct_utmpx = xyes; then |
164 | AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) |
161 | AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) |
… | |
… | |
171 | if test x$struct_utmpx_host = xyes; then |
168 | if test x$struct_utmpx_host = xyes; then |
172 | AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) |
169 | AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) |
173 | fi |
170 | fi |
174 | |
171 | |
175 | AC_CACHE_CHECK(for session in utmpx struct, struct_utmpx_session, |
172 | AC_CACHE_CHECK(for session in utmpx struct, struct_utmpx_session, |
176 | [AC_TRY_COMPILE([#include <sys/types.h> |
173 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
177 | #include <utmpx.h>], |
174 | #include <utmpx.h>]], [[struct utmpx utx; utx.ut_session;]])],[struct_utmpx_session=yes],[struct_utmpx_session=no])]) |
178 | [struct utmpx utx; utx.ut_session;], |
|
|
179 | struct_utmpx_session=yes, struct_utmpx_session=no)]) |
|
|
180 | if test x$struct_utmpx_session = xyes; then |
175 | if test x$struct_utmpx_session = xyes; then |
181 | AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) |
176 | AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) |
182 | fi |
177 | fi |
183 | ) dnl# AC_CHECK_HEADER(utmpx.h |
178 | ) dnl# AC_CHECK_HEADERS(utmpx.h |
184 | |
179 | |
185 | dnl# -------------------------------------------------------------------------- |
180 | dnl# -------------------------------------------------------------------------- |
186 | dnl# check for struct lastlog |
181 | dnl# check for struct lastlog |
187 | AC_CACHE_CHECK(for struct lastlog, struct_lastlog, |
182 | AC_CACHE_CHECK(for struct lastlog, struct_lastlog, |
188 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
183 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
… | |
… | |
212 | dnl# -------------------------------------------------------------------------- |
207 | dnl# -------------------------------------------------------------------------- |
213 | |
208 | |
214 | dnl# find utmp |
209 | dnl# find utmp |
215 | AC_CACHE_CHECK(where utmp is located, path_utmp, |
210 | AC_CACHE_CHECK(where utmp is located, path_utmp, |
216 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
211 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
212 | #include <stdlib.h> |
217 | #include <sys/types.h> |
213 | #include <sys/types.h> |
218 | #include <utmp.h> |
214 | #include <utmp.h> |
219 | #include <errno.h> |
215 | #include <errno.h> |
220 | main() |
216 | main() |
221 | { |
217 | { |
… | |
… | |
248 | |
244 | |
249 | dnl# find utmpx - if a utmp file exists at the same location and is more than |
245 | dnl# find utmpx - if a utmp file exists at the same location and is more than |
250 | dnl# a day newer, then dump the utmpx. People leave lots of junk around. |
246 | dnl# a day newer, then dump the utmpx. People leave lots of junk around. |
251 | AC_CACHE_CHECK(where utmpx is located, path_utmpx, |
247 | AC_CACHE_CHECK(where utmpx is located, path_utmpx, |
252 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
248 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
249 | #include <stdlib.h> |
253 | #include <sys/types.h> |
250 | #include <sys/types.h> |
254 | #include <utmpx.h> |
251 | #include <utmpx.h> |
255 | #include <errno.h> |
252 | #include <errno.h> |
256 | #include <sys/stat.h> |
253 | #include <sys/stat.h> |
257 | #ifdef HAVE_STRING_H |
254 | #ifdef HAVE_STRING_H |
… | |
… | |
293 | dnl# -------------------------------------------------------------------------- |
290 | dnl# -------------------------------------------------------------------------- |
294 | |
291 | |
295 | dnl# find wtmp |
292 | dnl# find wtmp |
296 | AC_CACHE_CHECK(where wtmp is located, path_wtmp, |
293 | AC_CACHE_CHECK(where wtmp is located, path_wtmp, |
297 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
294 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
295 | #include <stdlib.h> |
298 | #include <sys/types.h> |
296 | #include <sys/types.h> |
299 | #ifdef HAVE_UTMP_H |
297 | #ifdef HAVE_UTMP_H |
300 | #include <utmp.h> |
298 | #include <utmp.h> |
301 | #endif |
299 | #endif |
302 | #include <errno.h> |
300 | #include <errno.h> |
303 | main() |
301 | main() |
304 | { |
302 | { |
305 | char **w, *wtmplist[] = { |
303 | char **w, *wtmplist[] = { |
306 | "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL }; |
304 | "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL }; |
307 | FILE *a, *f=fopen("conftestval", "w"); |
305 | FILE *a, *f=fopen("conftestval", "w"); |
308 | if (!f) exit(1); |
306 | if (!f) exit(1); |
309 | #ifdef WTMP_FILE |
307 | #ifdef WTMP_FILE |
310 | fprintf(f, "%s\n", WTMP_FILE); |
308 | fprintf(f, "%s\n", WTMP_FILE); |
311 | exit(0); |
309 | exit(0); |
… | |
… | |
329 | dnl# -------------------------------------------------------------------------- |
327 | dnl# -------------------------------------------------------------------------- |
330 | |
328 | |
331 | dnl# find wtmpx |
329 | dnl# find wtmpx |
332 | AC_CACHE_CHECK(where wtmpx is located, path_wtmpx, |
330 | AC_CACHE_CHECK(where wtmpx is located, path_wtmpx, |
333 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
331 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
332 | #include <stdlib.h> |
334 | #ifdef HAVE_UTMPX_H |
333 | #ifdef HAVE_UTMPX_H |
335 | #include <utmpx.h> |
334 | #include <utmpx.h> |
336 | #endif |
335 | #endif |
337 | #include <errno.h> |
336 | #include <errno.h> |
338 | main() |
337 | main() |
339 | { |
338 | { |
340 | char **w, *wtmplist[] = { |
339 | char **w, *wtmplist[] = { |
341 | "/var/log/wtmpx", "/var/adm/wtmpx", NULL }; |
340 | "/var/log/wtmpx", "/var/adm/wtmpx", NULL }; |
342 | FILE *a, *f=fopen("conftestval", "w"); |
341 | FILE *a, *f=fopen("conftestval", "w"); |
343 | if (!f) exit(1); |
342 | if (!f) exit(1); |
344 | #ifdef WTMPX_FILE |
343 | #ifdef WTMPX_FILE |
345 | fprintf(f, "%s\n", WTMPX_FILE); |
344 | fprintf(f, "%s\n", WTMPX_FILE); |
346 | exit(0); |
345 | exit(0); |
… | |
… | |
364 | dnl# -------------------------------------------------------------------------- |
363 | dnl# -------------------------------------------------------------------------- |
365 | |
364 | |
366 | dnl# find lastlog |
365 | dnl# find lastlog |
367 | AC_CACHE_CHECK(where lastlog is located, path_lastlog, |
366 | AC_CACHE_CHECK(where lastlog is located, path_lastlog, |
368 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
367 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
368 | #include <stdlib.h> |
369 | #include <sys/types.h> |
369 | #include <sys/types.h> |
370 | #ifdef HAVE_UTMPX_H |
370 | #ifdef HAVE_UTMPX_H |
371 | #include <utmpx.h> |
371 | #include <utmpx.h> |
372 | #elif defined(HAVE_UTMP_H) |
372 | #elif defined(HAVE_UTMP_H) |
373 | #include <utmp.h> |
373 | #include <utmp.h> |
… | |
… | |
398 | exit(0); |
398 | exit(0); |
399 | }]])],[path_lastlog=`cat conftestval`],[path_lastlog=],[dnl |
399 | }]])],[path_lastlog=`cat conftestval`],[path_lastlog=],[dnl |
400 | AC_MSG_WARN(Define LASTLOG_FILE in config.h manually)])]) |
400 | AC_MSG_WARN(Define LASTLOG_FILE in config.h manually)])]) |
401 | if test x$path_lastlog != x; then |
401 | if test x$path_lastlog != x; then |
402 | AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$path_lastlog", Define location of lastlog) |
402 | AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$path_lastlog", Define location of lastlog) |
403 | if test -d "$path_lastlog"; then |
|
|
404 | AC_DEFINE(LASTLOG_IS_DIR, 1, Define if lastlog is provided via a directory) |
|
|
405 | fi |
|
|
406 | fi |
403 | fi |
407 | dnl# -------------------------------------------------------------------------- |
404 | dnl# -------------------------------------------------------------------------- |
408 | |
405 | |
409 | dnl# find lastlogx |
406 | dnl# find lastlogx |
410 | AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, |
407 | AC_CACHE_CHECK(where lastlogx is located, path_lastlogx, |
411 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
408 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
409 | #include <stdlib.h> |
412 | #ifdef HAVE_UTMPX_H |
410 | #ifdef HAVE_UTMPX_H |
413 | #include <utmpx.h> |
411 | #include <utmpx.h> |
414 | #endif |
412 | #endif |
415 | #include <errno.h> |
413 | #include <errno.h> |
416 | main() |
414 | main() |
… | |
… | |
436 | }]])],[path_lastlogx=`cat conftestval`],[path_lastlogx=],[dnl |
434 | }]])],[path_lastlogx=`cat conftestval`],[path_lastlogx=],[dnl |
437 | AC_MSG_WARN(Define LASTLOGX_FILE in config.h manually)])]) |
435 | AC_MSG_WARN(Define LASTLOGX_FILE in config.h manually)])]) |
438 | if test x$path_lastlogx != x; then |
436 | if test x$path_lastlogx != x; then |
439 | AC_DEFINE_UNQUOTED(LASTLOGX_FILE, "$path_lastlogx", Define location of lastlogx) |
437 | AC_DEFINE_UNQUOTED(LASTLOGX_FILE, "$path_lastlogx", Define location of lastlogx) |
440 | fi |
438 | fi |
441 | |
|
|
442 | if test x$support_utmp != xyes; then |
|
|
443 | echo " utmp support: disabled" |
|
|
444 | echo |
|
|
445 | else |
|
|
446 | echo " utmp support: enabled |
|
|
447 | utmp file: $path_utmp |
|
|
448 | utmpx file: $path_utmpx |
|
|
449 | wtmp file: $path_wtmp |
|
|
450 | wtmpx file: $path_wtmpx |
|
|
451 | lastlog file: $path_lastlog |
|
|
452 | lastlogx file: $path_lastlogx" |
|
|
453 | fi |
|
|
454 | ]) |
439 | ]) |
455 | |
440 | |
456 | AC_DEFUN([SCM_RIGHTS_CHECK], |
441 | AC_DEFUN([SCM_RIGHTS_CHECK], |
457 | [ |
442 | [ |
458 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, can_pass_fds, |
443 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, can_pass_fds, |
459 | [AC_TRY_LINK([ |
444 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
460 | #include <cstddef> // broken bsds (is that redundant?) need this |
445 | #include <cstddef> // broken bsds (is that redundant?) need this |
461 | #include <sys/types.h> |
446 | #include <sys/types.h> |
462 | #include <sys/socket.h> |
447 | #include <sys/socket.h> |
463 | #include <sys/uio.h> |
448 | #include <sys/uio.h> |
464 | ],[ |
449 | ]], [[ |
465 | { |
450 | { |
466 | msghdr msg; |
451 | msghdr msg; |
467 | iovec iov; |
452 | iovec iov; |
468 | char buf [100]; |
453 | char buf [100]; |
469 | char data = 0; |
454 | char data = 0; |
… | |
… | |
483 | |
468 | |
484 | *(int *)CMSG_DATA (cmsg) = 5; |
469 | *(int *)CMSG_DATA (cmsg) = 5; |
485 | |
470 | |
486 | return sendmsg (3, &msg, 0); |
471 | return sendmsg (3, &msg, 0); |
487 | } |
472 | } |
488 | ],[can_pass_fds=yes],[can_pass_fds=no])]) |
473 | ]])],[can_pass_fds=yes],[can_pass_fds=no])]) |
489 | if test x$can_pass_fds = xyes; then |
474 | if test x$can_pass_fds = xyes; then |
490 | AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) |
475 | AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) |
491 | else |
476 | else |
492 | AC_MSG_ERROR([libptytty requires unix-compliant filehandle passing ability]) |
477 | AC_MSG_ERROR([libptytty requires unix-compliant filehandle passing ability]) |
493 | fi |
478 | fi |
494 | ]) |
479 | ]) |
495 | |
480 | |
496 | AC_DEFUN([TTY_GROUP_CHECK], |
481 | AC_DEFUN([TTY_GROUP_CHECK], |
497 | [ |
482 | [ |
498 | AC_CACHE_CHECK([for tty group], tty_group, |
483 | AC_CACHE_CHECK([for tty group], tty_group, |
499 | [AC_TRY_RUN([ |
484 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
500 | #include <sys/types.h> |
485 | #include <sys/types.h> |
501 | #include <sys/stat.h> |
486 | #include <sys/stat.h> |
502 | #include <unistd.h> |
487 | #include <unistd.h> |
503 | #include <grp.h> |
488 | #include <grp.h> |
504 | |
489 | |
… | |
… | |
514 | && (stat(tty, &st)) == 0 |
499 | && (stat(tty, &st)) == 0 |
515 | && st.st_gid == gr->gr_gid) |
500 | && st.st_gid == gr->gr_gid) |
516 | return 0; |
501 | return 0; |
517 | else |
502 | else |
518 | return 1; |
503 | return 1; |
519 | }], |
|
|
520 | [tty_group=yes],[tty_group=no],[tty_group=no])]) |
504 | }]])],[tty_group=yes],[tty_group=no],[tty_group=no])]) |
521 | if test x$tty_group = xyes; then |
505 | if test x$tty_group = xyes; then |
522 | AC_DEFINE(TTY_GID_SUPPORT, 1, "") |
506 | AC_DEFINE(TTY_GID_SUPPORT, 1, "") |
523 | fi]) |
507 | fi]) |
524 | |
508 | |