mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Fixes from David Lee for utmp handling.
Jeremy.
(This used to be commit 70cecfefc8
)
This commit is contained in:
parent
bbce6b44eb
commit
d199eebcf7
@ -117,6 +117,17 @@
|
||||
#undef USE_SETUIDX
|
||||
#undef HAVE_LIBDL
|
||||
#undef SYSCONF_SC_NGROUPS_MAX
|
||||
#undef HAVE_UT_UT_NAME
|
||||
#undef HAVE_UT_UT_USER
|
||||
#undef HAVE_UT_UT_ID
|
||||
#undef HAVE_UT_UT_HOST
|
||||
#undef HAVE_UT_UT_TIME
|
||||
#undef HAVE_UT_UT_TV
|
||||
#undef HAVE_UT_UT_TYPE
|
||||
#undef HAVE_UT_UT_PID
|
||||
#undef HAVE_UT_UT_EXIT
|
||||
#undef HAVE_UT_UT_ADDR
|
||||
#undef HAVE_UX_UT_SYSLEN
|
||||
#undef PUTUTLINE_RETURNS_UTMP
|
||||
#undef COMPILER_SUPPORTS_LL
|
||||
#undef HAVE_YP_GET_DEFAULT_DOMAIN
|
||||
|
1471
source3/configure
vendored
1471
source3/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -206,8 +206,11 @@ AC_CHECK_HEADERS(stropts.h poll.h readline.h history.h readline/readline.h)
|
||||
AC_CHECK_HEADERS(readline/history.h sys/capability.h syscall.h sys/syscall.h)
|
||||
AC_CHECK_HEADERS(sys/acl.h sys/cdefs.h glob.h)
|
||||
|
||||
# For experimental utmp support
|
||||
AC_CHECK_HEADERS(utmp.h utmpx.h)
|
||||
# For experimental utmp support (lastlog on some BSD-like systems)
|
||||
AC_CHECK_HEADERS(utmp.h utmpx.h lastlog.h)
|
||||
|
||||
# For quotas on Veritas VxFS filesystems
|
||||
AC_CHECK_HEADERS(sys/fs/vx_quota.h)
|
||||
|
||||
AC_CHECK_SIZEOF(int,cross)
|
||||
AC_CHECK_SIZEOF(long,cross)
|
||||
@ -703,8 +706,117 @@ if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UTIMBUF)
|
||||
fi
|
||||
|
||||
dnl utmp and utmpx come in many flavours
|
||||
dnl We need to check for many of them
|
||||
dnl But we don't need to do each and every one, because our code uses
|
||||
dnl mostly just the utmp (not utmpx) fields.
|
||||
|
||||
AC_CHECK_FUNCS(pututline pututxline updwtmp updwtmpx getutmpx)
|
||||
|
||||
AC_CACHE_CHECK([for ut_name in utmp],samba_cv_HAVE_UT_UT_NAME,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp ut; ut.ut_name[0] = 'a';],
|
||||
samba_cv_HAVE_UT_UT_NAME=yes,samba_cv_HAVE_UT_UT_NAME=no,samba_cv_HAVE_UT_UT_NAME=cross)])
|
||||
if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UT_UT_NAME)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for ut_user in utmp],samba_cv_HAVE_UT_UT_USER,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp ut; ut.ut_user[0] = 'a';],
|
||||
samba_cv_HAVE_UT_UT_USER=yes,samba_cv_HAVE_UT_UT_USER=no,samba_cv_HAVE_UT_UT_USER=cross)])
|
||||
if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UT_UT_USER)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for ut_id in utmp],samba_cv_HAVE_UT_UT_ID,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp ut; ut.ut_id[0] = 'a';],
|
||||
samba_cv_HAVE_UT_UT_ID=yes,samba_cv_HAVE_UT_UT_ID=no,samba_cv_HAVE_UT_UT_ID=cross)])
|
||||
if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UT_UT_ID)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for ut_host in utmp],samba_cv_HAVE_UT_UT_HOST,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp ut; ut.ut_host[0] = 'a';],
|
||||
samba_cv_HAVE_UT_UT_HOST=yes,samba_cv_HAVE_UT_UT_HOST=no,samba_cv_HAVE_UT_UT_HOST=cross)])
|
||||
if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UT_UT_HOST)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for ut_time in utmp],samba_cv_HAVE_UT_UT_TIME,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp ut; time_t t; ut.ut_time = t;],
|
||||
samba_cv_HAVE_UT_UT_TIME=yes,samba_cv_HAVE_UT_UT_TIME=no,samba_cv_HAVE_UT_UT_TIME=cross)])
|
||||
if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UT_UT_TIME)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for ut_tv in utmp],samba_cv_HAVE_UT_UT_TV,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp ut; struct timeval tv; ut.ut_tv = tv;],
|
||||
samba_cv_HAVE_UT_UT_TV=yes,samba_cv_HAVE_UT_UT_TV=no,samba_cv_HAVE_UT_UT_TV=cross)])
|
||||
if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UT_UT_TV)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for ut_type in utmp],samba_cv_HAVE_UT_UT_TYPE,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp ut; ut.ut_type = 0;],
|
||||
samba_cv_HAVE_UT_UT_TYPE=yes,samba_cv_HAVE_UT_UT_TYPE=no,samba_cv_HAVE_UT_UT_TYPE=cross)])
|
||||
if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UT_UT_TYPE)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for ut_pid in utmp],samba_cv_HAVE_UT_UT_PID,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp ut; ut.ut_pid = 0;],
|
||||
samba_cv_HAVE_UT_UT_PID=yes,samba_cv_HAVE_UT_UT_PID=no,samba_cv_HAVE_UT_UT_PID=cross)])
|
||||
if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UT_UT_PID)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for ut_exit in utmp],samba_cv_HAVE_UT_UT_EXIT,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp ut; ut.ut_exit.e_exit = 0;],
|
||||
samba_cv_HAVE_UT_UT_EXIT=yes,samba_cv_HAVE_UT_UT_EXIT=no,samba_cv_HAVE_UT_UT_EXIT=cross)])
|
||||
if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UT_UT_EXIT)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for ut_addr in utmp],samba_cv_HAVE_UT_UT_ADDR,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp ut; ut.ut_addr = 0;],
|
||||
samba_cv_HAVE_UT_UT_ADDR=yes,samba_cv_HAVE_UT_UT_ADDR=no,samba_cv_HAVE_UT_UT_ADDR=cross)])
|
||||
if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
|
||||
AC_DEFINE(HAVE_UT_UT_ADDR)
|
||||
fi
|
||||
|
||||
if test x$ac_cv_func_pututline = xyes ; then
|
||||
AC_CACHE_CHECK([whether pututline returns pointer],samba_cv_PUTUTLINE_RETURNS_UTMP,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmp.h>],
|
||||
[struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);],
|
||||
samba_cv_PUTUTLINE_RETURNS_UTMP=yes,samba_cv_PUTUTLINE_RETURNS_UTMP=no)])
|
||||
if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
|
||||
AC_DEFINE(PUTUTLINE_RETURNS_UTMP)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for ut_syslen in utmpx],samba_cv_HAVE_UX_UT_SYSLEN,[
|
||||
AC_TRY_COMPILE([#include <utmpx.h>],
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <utmpx.h>],
|
||||
[struct utmpx ux; ux.ut_syslen = 0;],
|
||||
samba_cv_HAVE_UX_UT_SYSLEN=yes,samba_cv_HAVE_UX_UT_SYSLEN=no,samba_cv_HAVE_UX_UT_SYSLEN=cross)])
|
||||
if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
|
||||
|
@ -180,7 +180,18 @@
|
||||
#undef USE_SETUIDX
|
||||
#undef HAVE_LIBDL
|
||||
#undef SYSCONF_SC_NGROUPS_MAX
|
||||
#undef HAVE_UT_UT_NAME
|
||||
#undef HAVE_UT_UT_USER
|
||||
#undef HAVE_UT_UT_ID
|
||||
#undef HAVE_UT_UT_HOST
|
||||
#undef HAVE_UT_UT_TIME
|
||||
#undef HAVE_UT_UT_TV
|
||||
#undef HAVE_UT_UT_TYPE
|
||||
#undef HAVE_UT_UT_PID
|
||||
#undef HAVE_UT_UT_EXIT
|
||||
#undef HAVE_UT_UT_ADDR
|
||||
#undef HAVE_UX_UT_SYSLEN
|
||||
#undef PUTUTLINE_RETURNS_UTMP
|
||||
#undef COMPILER_SUPPORTS_LL
|
||||
#undef HAVE_YP_GET_DEFAULT_DOMAIN
|
||||
|
||||
@ -508,6 +519,9 @@
|
||||
/* Define if you have the getspnam function. */
|
||||
#undef HAVE_GETSPNAM
|
||||
|
||||
/* Define if you have the getutmpx function. */
|
||||
#undef HAVE_GETUTMPX
|
||||
|
||||
/* Define if you have the glob function. */
|
||||
#undef HAVE_GLOB
|
||||
|
||||
@ -559,6 +573,12 @@
|
||||
/* Define if you have the putprpwnam function. */
|
||||
#undef HAVE_PUTPRPWNAM
|
||||
|
||||
/* Define if you have the pututline function. */
|
||||
#undef HAVE_PUTUTLINE
|
||||
|
||||
/* Define if you have the pututxline function. */
|
||||
#undef HAVE_PUTUTXLINE
|
||||
|
||||
/* Define if you have the pwrite function. */
|
||||
#undef HAVE_PWRITE
|
||||
|
||||
@ -658,6 +678,12 @@
|
||||
/* Define if you have the sysconf function. */
|
||||
#undef HAVE_SYSCONF
|
||||
|
||||
/* Define if you have the updwtmp function. */
|
||||
#undef HAVE_UPDWTMP
|
||||
|
||||
/* Define if you have the updwtmpx function. */
|
||||
#undef HAVE_UPDWTMPX
|
||||
|
||||
/* Define if you have the usleep function. */
|
||||
#undef HAVE_USLEEP
|
||||
|
||||
@ -700,6 +726,9 @@
|
||||
/* Define if you have the <history.h> header file. */
|
||||
#undef HAVE_HISTORY_H
|
||||
|
||||
/* Define if you have the <lastlog.h> header file. */
|
||||
#undef HAVE_LASTLOG_H
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
@ -799,6 +828,9 @@
|
||||
/* Define if you have the <sys/fs/s5param.h> header file. */
|
||||
#undef HAVE_SYS_FS_S5PARAM_H
|
||||
|
||||
/* Define if you have the <sys/fs/vx_quota.h> header file. */
|
||||
#undef HAVE_SYS_FS_VX_QUOTA_H
|
||||
|
||||
/* Define if you have the <sys/id.h> header file. */
|
||||
#undef HAVE_SYS_ID_H
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user