mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
Try and fix the autoconf build on Solaris/Nexenta/etc.
Their AC_TRY_RUN doesn't include any current CPPFLAGS. Make the set[res]uid checks independent of this. Needs a small change to the waf build in order to code with the change. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 30 00:32:36 CEST 2012 on sn-devel-104
This commit is contained in:
parent
d91bf0d428
commit
f81fd1ccc3
@ -64,12 +64,43 @@ int samba_setgid(gid_t gid);
|
||||
int samba_setuidx(int flags, uid_t uid);
|
||||
int samba_setgidx(int flags, gid_t gid);
|
||||
int samba_setgroups(size_t setlen, const gid_t *gidset);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "../lib/util/setid.h"
|
||||
|
||||
#else
|
||||
|
||||
/* Inside autoconf test. */
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_SYS_PRIV_H
|
||||
#include <sys/priv.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_ID_H
|
||||
#include <sys/id.h>
|
||||
#endif
|
||||
|
||||
/* autoconf tests don't include setid.h */
|
||||
int samba_setresuid(uid_t ruid, uid_t euid, uid_t suid);
|
||||
int samba_setresgid(gid_t rgid, gid_t egid, gid_t sgid);
|
||||
int samba_setreuid(uid_t ruid, uid_t euid);
|
||||
int samba_setregid(gid_t rgid, gid_t egid);
|
||||
int samba_seteuid(uid_t euid);
|
||||
int samba_setegid(gid_t egid);
|
||||
int samba_setuid(uid_t uid);
|
||||
int samba_setgid(gid_t gid);
|
||||
int samba_setuidx(int flags, uid_t uid);
|
||||
int samba_setgidx(int flags, gid_t gid);
|
||||
int samba_setgroups(size_t setlen, const gid_t *gidset);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(USE_LINUX_THREAD_CREDENTIALS)
|
||||
#if defined(HAVE_SYSCALL_H)
|
||||
#include <syscall.h>
|
||||
|
@ -2773,7 +2773,7 @@ AC_CACHE_CHECK([for Linux thread-specific credentials],samba_cv_USE_LINUX_THREAD
|
||||
AC_TRY_RUN([
|
||||
#define AUTOCONF_TEST 1
|
||||
#define USE_LINUX_THREAD_CREDENTIALS 1
|
||||
#include "confdefs.h"
|
||||
#include "${srcdir-.}/../lib/util/setid.c"
|
||||
#include "${srcdir-.}/lib/util_sec.c"],
|
||||
samba_cv_USE_LINUX_THREAD_CREDENTIALS=yes,samba_cv_USE_LINUX_THREAD_CREDENTIALS=no,samba_cv_USE_LINUX_THREAD_CREDENTIALS=cross)])
|
||||
if test x"$samba_cv_USE_LINUX_THREAD_CREDENTIALS" = x"yes"; then
|
||||
@ -2789,6 +2789,7 @@ AC_TRY_RUN([
|
||||
#define AUTOCONF_TEST 1
|
||||
#define USE_SETREUID 1
|
||||
#include "confdefs.h"
|
||||
#include "${srcdir-.}/../lib/util/setid.c"
|
||||
#include "${srcdir-.}/lib/util_sec.c"],
|
||||
samba_cv_USE_SETREUID=yes,samba_cv_USE_SETREUID=no,samba_cv_USE_SETREUID=cross)])
|
||||
if test x"$samba_cv_USE_SETREUID" = x"yes"; then
|
||||
@ -2804,6 +2805,7 @@ AC_TRY_RUN([
|
||||
#define AUTOCONF_TEST 1
|
||||
#define USE_SETRESUID 1
|
||||
#include "confdefs.h"
|
||||
#include "${srcdir-.}/../lib/util/setid.c"
|
||||
#include "${srcdir-.}/lib/util_sec.c"],
|
||||
samba_cv_USE_SETRESUID=yes,samba_cv_USE_SETRESUID=no,samba_cv_USE_SETRESUID=cross)])
|
||||
if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
|
||||
@ -2817,6 +2819,7 @@ AC_TRY_RUN([
|
||||
#define AUTOCONF_TEST 1
|
||||
#define USE_SETEUID 1
|
||||
#include "confdefs.h"
|
||||
#include "${srcdir-.}/../lib/util/setid.c"
|
||||
#include "${srcdir-.}/lib/util_sec.c"],
|
||||
samba_cv_USE_SETEUID=yes,samba_cv_USE_SETEUID=no,samba_cv_USE_SETEUID=cross)])
|
||||
if test x"$samba_cv_USE_SETEUID" = x"yes"; then
|
||||
@ -2830,6 +2833,7 @@ AC_TRY_RUN([
|
||||
#define AUTOCONF_TEST 1
|
||||
#define USE_SETUIDX 1
|
||||
#include "confdefs.h"
|
||||
#include "${srcdir-.}/../lib/util/setid.c"
|
||||
#include "${srcdir-.}/lib/util_sec.c"],
|
||||
samba_cv_USE_SETUIDX=yes,samba_cv_USE_SETUIDX=no,samba_cv_USE_SETUIDX=cross)])
|
||||
if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
|
||||
|
@ -40,9 +40,6 @@
|
||||
#include <sys/id.h>
|
||||
#endif
|
||||
|
||||
/* In autoconf/test mode include the definitions of samba_setXXX. */
|
||||
#include "../lib/util/setid.c"
|
||||
|
||||
#define DEBUG(x, y) printf y
|
||||
#define smb_panic(x) exit(1)
|
||||
#define bool int
|
||||
|
@ -733,6 +733,7 @@ int i; i = PAM_RADIO_TYPE;
|
||||
seteuid = conf.CHECK_CODE('''
|
||||
#define AUTOCONF_TEST 1
|
||||
#define USE_LINUX_THREAD_CREDENTIALS 1
|
||||
#include "../lib/util/setid.c"
|
||||
#include "./lib/util_sec.c"
|
||||
''',
|
||||
'USE_LINUX_THREAD_CREDENTIALS',
|
||||
@ -743,6 +744,7 @@ int i; i = PAM_RADIO_TYPE;
|
||||
seteuid = conf.CHECK_CODE('''
|
||||
#define AUTOCONF_TEST 1
|
||||
#define USE_SETREUID 1
|
||||
#include "../lib/util/setid.c"
|
||||
#include "./lib/util_sec.c"
|
||||
''',
|
||||
'USE_SETREUID',
|
||||
@ -753,6 +755,7 @@ int i; i = PAM_RADIO_TYPE;
|
||||
seteuid = conf.CHECK_CODE('''
|
||||
#define AUTOCONF_TEST 1
|
||||
#define USE_SETRESUID 1
|
||||
#include "../lib/util/setid.c"
|
||||
#include "./lib/util_sec.c"
|
||||
''',
|
||||
'USE_SETRESUID',
|
||||
@ -763,6 +766,7 @@ int i; i = PAM_RADIO_TYPE;
|
||||
seteuid = conf.CHECK_CODE('''
|
||||
#define AUTOCONF_TEST 1
|
||||
#define USE_SETEUID 1
|
||||
#include "../lib/util/setid.c"
|
||||
#include "./lib/util_sec.c"
|
||||
''',
|
||||
'USE_SETEUID',
|
||||
@ -773,6 +777,7 @@ int i; i = PAM_RADIO_TYPE;
|
||||
seteuid = conf.CHECK_CODE('''
|
||||
#define AUTOCONF_TEST 1
|
||||
#define USE_SETUIDX 1
|
||||
#include "../lib/util/setid.c"
|
||||
#include "./lib/util_sec.c"
|
||||
''',
|
||||
'USE_SETUIDX',
|
||||
|
Loading…
x
Reference in New Issue
Block a user