diff options
author | Jeremy Allison <jra@samba.org> | 2012-06-29 13:46:23 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-06-30 00:32:36 +0200 |
commit | f81fd1ccc3228bf06455ad4c3265b71ca17ae407 (patch) | |
tree | d09aed8da40fb158d599f5fffc6b7765734f91ca /lib/util | |
parent | d91bf0d42863c996df5bf3c0d57e329d7a58a6af (diff) | |
download | samba-f81fd1ccc3228bf06455ad4c3265b71ca17ae407.tar.gz samba-f81fd1ccc3228bf06455ad4c3265b71ca17ae407.tar.bz2 samba-f81fd1ccc3228bf06455ad4c3265b71ca17ae407.zip |
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
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/setid.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/lib/util/setid.c b/lib/util/setid.c index 66c06397ee..885b8bf186 100644 --- a/lib/util/setid.c +++ b/lib/util/setid.c @@ -64,11 +64,42 @@ 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 + +#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 -#include "../lib/util/setid.h" +/* 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) |