1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

r7352: the internal heimdal build change. This changes quite a few things:

- if you want kerberos now, you need to unpack a lorikeet heimdal
   tree in source/heimdal/. If source/heimdal/ does not exist at
   configure time then all kerberos features are disabled. You cannot
   use an external kerberos library for now. That may change later.

 - moved lib/replace/ config stuff to lib/replace/ and create a
   lib/replace/replace.h. That allows the heimdal build to use our
   portability layer, and prevenets duplicate definitions of functions
   like strlcat()

 - if you do enable heimdal, then you will need to do 'make
   HEIMDAL_EXTERNAL' before you build Samba. That should be fixed once
   I explain the problem to jelmer (the problem is the inability to
   set a depend without also dragging in the object list of the
   dependency. We need this for building the heimdal asn1 compiler and
   et compiler.

 - disabled all of the m4 checks for external kerberos libraries. I
   left them in place in auth/kerberos/, but disabled it in
   configure.in

some of the heimdal_build/ code is still very rough, for example I
don't correctly detect the correct awk, flex, bison replacements for
heimdal_build/build_external.sh. I expect to fix that stuff up over
the next few days.
(This used to be commit d4648249b2c7fc8b5e7c0fc8d8f92ae043b5691f)
This commit is contained in:
Andrew Tridgell 2005-06-07 07:22:25 +00:00 committed by Gerald (Jerry) Carter
parent 6eae7eb3c4
commit bce8cda061
19 changed files with 297 additions and 156 deletions

View File

@ -1,7 +1,7 @@
SMB_MODULE_DEFAULT(gensec_krb5, NOT)
SMB_MODULE_DEFAULT(gensec_gssapi, NOT)
if test x"$SMB_EXT_LIB_ENABLE_KRB5" = x"YES"; then
if test x"$HAVE_KRB5" = x"YES"; then
# krb5 is now disabled at runtime, not build time
SMB_MODULE_DEFAULT(gensec_krb5, STATIC)
SMB_MODULE_DEFAULT(gensec_gssapi, STATIC)

View File

@ -14,8 +14,7 @@ REQUIRED_SUBSYSTEMS = \
SUBSYSTEM = GENSEC
INIT_FUNCTION = gensec_krb5_init
INIT_OBJ_FILES = auth/gensec/gensec_krb5.o
REQUIRED_SUBSYSTEMS = NDR_KRB5PAC KERBEROS EXT_LIB_KRB5 AUTH
REQUIRED_SUBSYSTEMS = NDR_KRB5PAC KERBEROS KERBEROS_LIB AUTH
# End MODULE gensec_krb5
################################################
@ -25,7 +24,7 @@ REQUIRED_SUBSYSTEMS = NDR_KRB5PAC KERBEROS EXT_LIB_KRB5 AUTH
SUBSYSTEM = GENSEC
INIT_FUNCTION = gensec_gssapi_init
INIT_OBJ_FILES = auth/gensec/gensec_gssapi.o
REQUIRED_SUBSYSTEMS = EXT_LIB_KRB5 AUTH
REQUIRED_SUBSYSTEMS = KERBEROS_LIB AUTH
# End MODULE gensec_gssapi
################################################

View File

@ -1,3 +1,5 @@
# NOTE! this whole m4 file is disabled in configure.in for now
#################################################
# KRB5 support
KRB5_CFLAGS=""

View File

@ -1,4 +1,5 @@
# master list of build config files for Samba4
heimdal_build/config.mk
dsdb/config.mk
gtk/config.mk
smbd/config.mk
@ -45,4 +46,4 @@ libcli/security/config.mk
lib/com/config.mk
scripting/config.mk
kdc/config.mk
#heimdal/config.mk
lib/replace/config.mk

View File

@ -9,7 +9,7 @@ AC_CONFIG_HEADER(include/config.h)
sinclude(build/m4/env.m4)
sinclude(build/m4/rewrite.m4)
sinclude(heimdal_build/config.m4)
sinclude(lib/popt/config.m4)
sinclude(lib/iconv.m4)
sinclude(lib/socket/config.m4)
@ -20,7 +20,10 @@ sinclude(lib/ldb/sqlite3.m4)
sinclude(lib/ldb/config.m4)
sinclude(lib/events/config.m4)
sinclude(lib/cmdline/config.m4)
sinclude(auth/kerberos/config.m4)
dnl disabled until we support external heimdal again
dnl sinclude(auth/kerberos/config.m4)
sinclude(auth/gensec/config.m4)
sinclude(libcli/config.m4)
sinclude(smbd/process_model.m4)

View File

@ -5,10 +5,13 @@
TOP=`pwd`
ASN1_COMPILE=$TOP/bin/asn1_compile
ET_COMPILE=compile_et
ET_COMPILE=$TOP/bin/compile_et
# we need to substitute these correctly based on configure output
FLEX=flex
BISON=bison
AWK=gawk
CC=gcc
build_asn1() {
f=$1
@ -16,7 +19,7 @@ build_asn1() {
dir=`dirname $f`
file=`basename $f`
echo Compiling $f
echo Building $f
cd $dir && $ASN1_COMPILE $file $name || exit 1
for f in *.x; do
base=`basename $f .x`
@ -29,7 +32,7 @@ build_et() {
f=$1
dir=`dirname $f`
file=`basename $f`
echo Compiling $f
echo Building $f
cd $dir && $ET_COMPILE $file || exit 1
cd $TOP || exit 1
}
@ -39,7 +42,7 @@ build_lex() {
dir=`dirname $f`
file=`basename $f`
base=`basename $f .l`
echo Compiling $f
echo Building $f
cd $dir && $FLEX $file
sed '/^#/ s|$base.yy\.c|$base.c|' $base.yy.c > $base.c
cd $TOP || exit 1
@ -50,24 +53,52 @@ build_bison() {
dir=`dirname $f`
file=`basename $f`
base=`basename $f .y`
echo Compiling $f
echo Building $f
cd $dir && $BISON -y -d $file
sed -e "/^#/!b" -e "s|y\.tab\.h|$base.h|" y.tab.h > $base.h
sed '/^#/ s|y\.tab\.c|$base.c|' y.tab.c > $base.c
cd $TOP || exit 1
}
build_awk() {
f=$1
dir=`dirname $f`
file=`basename $f`
base=`basename $f .h.in`
echo Building $f
cd $dir && $AWK -f $base.awk $base.h.in > gen.c
$CC -I$TOP/heimdal_build -I$TOP -Iheimdal/lib/roken -DHAVE_CONFIG_H -o gen gen.c || exit 1
./gen > $base.h || exit 1
rm -f gen gen.c
cd $TOP || exit 1
}
build_cp() {
f=$1
dir=`dirname $f`
file=`basename $f`
base=`basename $f in`
echo Building $f
echo cp $base"in" $base
cd $dir && cp $base"in" $base
cd $TOP || exit 1
}
build_cp heimdal/lib/roken/vis.hin
build_lex heimdal/lib/asn1/lex.l
build_lex heimdal/lib/com_err/lex.l
build_bison heimdal/lib/com_err/parse.y
build_bison heimdal/lib/asn1/parse.y
build_awk heimdal/lib/roken/roken.h.in
make bin/asn1_compile || exit 1
build_asn1 heimdal/lib/hdb/hdb.asn1 hdb_asn1
build_asn1 heimdal/lib/gssapi/spnego.asn1 spnego_asn1
build_asn1 heimdal/lib/asn1/k5.asn1 krb5_asn1
make bin/compile_et || exit 1
build_et heimdal/lib/hdb/hdb_err.et
build_et heimdal/lib/krb5/krb5_err.et
build_et heimdal/lib/krb5/heim_err.et
build_et heimdal/lib/krb5/k524_err.et
build_et heimdal/lib/asn1/asn1_err.et
build_lex heimdal/lib/asn1/lex.l
build_bison heimdal/lib/asn1/parse.y

View File

@ -6,6 +6,8 @@
/* bring in the samba4 config.h */
#include "include/config.h"
#ifdef HAVE_KRB5
#define RCSID(msg) \
static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg }
@ -22,17 +24,52 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg }
/* path to sysconf - should we force this to samba LIBDIR ? */
#define SYSCONFDIR "/etc"
#define KRB5
/* Maximum values on all known systems */
#define MaxHostNameLen (64+4)
#define MaxPathLen (1024+4)
#define HAVE_H_ERRNO
#define HAVE_LONG_LONG 1
#define VERSIONLIST {"Lorikeet-Heimdal, Modified for Samba4 0.7rc1"}
/* even if we do have dlopen, we don't want heimdal using it */
#undef HAVE_DLOPEN
#define VERSION "Samba"
#define ROKEN_LIB_FUNCTION
/* these should be done with configure tests */
#define HAVE_H_ERRNO
#define HAVE_INET_ATON
#define HAVE_LONG_LONG
#define HAVE_GETHOSTNAME
#define HAVE_SOCKLEN_T
#define HAVE_GETNAMEINFO
#define HAVE_STRUCT_WINSIZE
#define HAVE_STRUCT_SOCKADDR_STORAGE
#define HAVE_STRUCT_ADDRINFO
#define HAVE_GAI_STRERROR
/* setup correct defines for capabilities of our version of heimdal */
#define KRB5
#define HAVE_KRB5_SET_REAL_TIME
#define HAVE_KRB5_LOG_CONTROL
#define HAVE_KRB5_INITLOG
#define HAVE_KRB5_ADDLOG_FUNC
#define HAVE_KRB5_FREELOG
#define HAVE_KRB5_SET_WARN_DEST
#define HAVE_KRB5_LOG_FACILITY
#define HAVE_KRB5_AUTH_CON_SETKEY
#define HAVE_ADDR_TYPE_IN_KRB5_ADDRESS
#define HAVE_KRB5_GET_PW_SALT
#define HAVE_KRB5_STRING_TO_KEY_SALT
#define HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES
#define HAVE_KRB5_SESSION_IN_CREDS
#define HAVE_KRB5_KEYBLOCK_KEYVALUE
#define HAVE_KRB5_C_ENCTYPE_COMPARE
#define HAVE_KRB5_KT_FREE_ENTRY
#define HAVE_KRB5_PRINCIPAL_GET_COMP_STRING
#include <sys/types.h>
#include "lib/replace/replace.h"
#endif

View File

@ -4,3 +4,18 @@ AC_CHECK_HEADERS(sys/utsname.h termcap.h term.h timezone.h time.h ttyname.h)
AC_CHECK_FUNCS(setitimer uname umask unsetenv socket sendmsg putenv atexit)
# these are disabled unless heimdal is found below
SMB_MODULE_DEFAULT(KERBEROS_LIB, NOT)
SMB_BINARY_ENABLE(asn1_compile, NO)
SMB_BINARY_ENABLE(compile_et, NO)
# to enable kerberos, unpack a heimdal source tree in the heimdal directory
# of the samba source tree
if test -d heimdal; then
AC_DEFINE(HAVE_KRB5,1,[Whether kerberos is available])
CFLAGS="${CFLAGS} -Iheimdal_build -Iheimdal/lib/krb5 -Iheimdal/lib/gssapi -Iheimdal/lib/asn1 -Iheimdal/lib/com_err -Iheimdal/lib/hdb"
HAVE_KRB5=YES
SMB_MODULE_DEFAULT(KERBEROS_LIB, STATIC)
SMB_BINARY_ENABLE(asn1_compile, YES)
SMB_BINARY_ENABLE(compile_et, YES)
fi

View File

@ -311,15 +311,13 @@ ADD_OBJ_FILES = \
heimdal/lib/asn1/hash.o \
heimdal/lib/asn1/lex.o \
heimdal/lib/asn1/parse.o \
heimdal/lib/roken/strlcat.o \
heimdal/lib/roken/strlcpy.o \
heimdal/lib/roken/emalloc.o \
heimdal/lib/roken/getarg.o \
heimdal/lib/roken/print_version.o \
heimdal/lib/roken/setprogname.o \
heimdal/lib/asn1/symbol.o
TARGET_CFLAGS = -Iheimdal_build -Iheimdal/lib/krb5 -Iheimdal/kdc -Iheimdal/lib/asn1 -Iheimdal/lib/des -Iheimdal/lib/com_err -Iheimdal/include
REQUIRED_SUBSYSTEMS = HEIMDAL_ROKEN
TARGET_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
NOPROTO = YES
# End SUBSYSTEM ASN1_COMPILER
#######################
@ -327,12 +325,37 @@ NOPROTO = YES
#######################
# Start BINARY asn1_compile
[BINARY::asn1_compile]
REQUIRED_SUBSYSTEMS = ASN1_COMPILER
TARGET_CFLAGS = -Iheimdal/lib/krb5 -Iheimdal/kdc -Iheimdal/lib/asn1 -Iheimdal/lib/des -Iheimdal/lib/com_err -Iheimdal_build -Iheimdal/include
REQUIRED_SUBSYSTEMS = ASN1_COMPILER LIBREPLACE
# End BINARY asn1_compile
#######################
#######################
# Start SUBSYSTEM COMPILE_ET
[SUBSYSTEM::COMPILE_ET]
ADD_OBJ_FILES = \
heimdal/lib/com_err/lex.o \
heimdal/lib/com_err/parse.o \
heimdal/lib/com_err/compile_et.o \
heimdal/lib/roken/getarg.o \
heimdal/lib/roken/get_window_size.o \
heimdal/lib/roken/getprogname.o \
heimdal/lib/roken/strupr.o \
heimdal/lib/roken/print_version.o \
heimdal/lib/roken/setprogname.o
TARGET_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
NOPROTO = YES
# End SUBSYSTEM COMPILE_ET
#######################
#######################
# Start BINARY compile_et
[BINARY::compile_et]
REQUIRED_SUBSYSTEMS = COMPILE_ET LIBREPLACE
# End BINARY compile_et
#######################
#######################
# Start TARGET HEIMDAL_EXTERNAL
[TARGET::HEIMDAL_EXTERNAL]
@ -346,7 +369,7 @@ REQUIRED_SUBSYSTEMS = ASN1_COMPILER
# Start SUBSYSTEM HEIMDAL
[SUBSYSTEM::HEIMDAL]
NOPROTO = YES
TARGET_CFLAGS = -Iheimdal_build -Iheimdal/lib/krb5 -Iheimdal/lib/hdb -Iheimdal/lib/gssapi -Iheimdal/kdc -Iheimdal/lib/asn1 -Iheimdal/lib/des -Iheimdal/lib/com_err -Iheimdal/include
TARGET_CFLAGS = -Iheimdal_build -Iheimdal/kdc -Iheimdal/lib/des -Iheimdal/lib/roken -Iheimdal/include
REQUIRED_SUBSYSTEMS = \
HEIMDAL_KDC HEIMDAL_HDB HEIMDAL_GSSAPI HEIMDAL_KRB5 \
HEIMDAL_ASN1 HEIMDAL_DES HEIMDAL_ROKEN HEIMDAL_COM_ERR
@ -357,6 +380,6 @@ REQUIRED_SUBSYSTEMS = \
# Start SUBSYSTEM KERBEROS_LIB
[SUBSYSTEM::KERBEROS_LIB]
#REQUIRED_SUBSYSTEMS = EXT_LIB_KRB5
REQUIRED_SUBSYSTEMS = HEIMDAL
REQUIRED_SUBSYSTEMS = HEIMDAL LIBREPLACE
# End SUBSYSTEM KERBEROS_LIB
#######################

View File

@ -0,0 +1,17 @@
/* krb5-types.h -- this file was generated for i686-pc-linux-gnu by
$Id: bits.c,v 1.23 2005/01/05 15:22:02 lha Exp $ */
#ifndef __krb5_types_h__
#define __krb5_types_h__
#include <inttypes.h>
#include <sys/types.h>
#include <sys/bitypes.h>
#include <sys/socket.h>
typedef socklen_t krb5_socklen_t;
#include <unistd.h>
typedef ssize_t krb5_ssize_t;
#endif /* __krb5_types_h__ */

View File

@ -87,12 +87,6 @@
* Define VOLATILE if needed.
*/
#if defined(HAVE_VOLATILE)
#define VOLATILE volatile
#else
#define VOLATILE
#endif
#define False (0)
#define True (1)
#define Auto (2)
@ -143,14 +137,13 @@ extern int errno;
#include "lib/com/com.h"
#include "credentials.h"
#include "lib/replace/replace.h"
#define malloc_p(type) (type *)malloc(sizeof(type))
#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count)
#ifndef HAVE_COMPARISON_FN_T
typedef int (*comparison_fn_t)(const void *, const void *);
#endif
/***** automatically generated prototypes *****/
#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
#include "proto.h"
@ -161,86 +154,12 @@ typedef int (*comparison_fn_t)(const void *, const void *);
#include "safe_string.h"
#ifdef __COMPAR_FN_T
#define QSORT_CAST (__compar_fn_t)
#endif
#ifndef QSORT_CAST
#define QSORT_CAST (int (*)(const void *, const void *))
#endif
#ifndef HAVE_PIPE
#define SYNC_DNS 1
#endif
#ifndef HAVE_STRDUP
char *strdup(const char *s);
#endif
#ifndef HAVE_MEMMOVE
void *memmove(void *dest,const void *src,int size);
#endif
#ifndef HAVE_MKTIME
time_t mktime(struct tm *t);
#endif
#ifndef HAVE_STRLCPY
size_t strlcpy(char *d, const char *s, size_t bufsize);
#endif
#ifndef HAVE_STRLCAT
size_t strlcat(char *d, const char *s, size_t bufsize);
#endif
#ifndef HAVE_STRNDUP
char *strndup(const char *s, size_t n);
#endif
#ifndef HAVE_STRNLEN
size_t strnlen(const char *s, size_t n);
#endif
#ifndef HAVE_STRTOUL
unsigned long strtoul(const char *nptr, char **endptr, int base);
#endif
#ifndef HAVE_SETENV
int setenv(const char *name, const char *value, int overwrite);
#endif
#ifndef HAVE_VASPRINTF_DECL
int vasprintf(char **ptr, const char *format, va_list ap);
#endif
#if !defined(HAVE_BZERO) && defined(HAVE_MEMSET)
#define bzero(a,b) memset((a),'\0',(b))
#endif
extern int DEBUGLEVEL;
/* add varargs prototypes with printf checking */
#ifndef HAVE_SNPRINTF_DECL
int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
#endif
#ifndef HAVE_ASPRINTF_DECL
int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
#endif
/* we used to use these fns, but now we have good replacements
for snprintf and vsnprintf */
#define slprintf snprintf
#ifdef HAVE_VA_COPY
#define VA_COPY(dest, src) va_copy(dest, src)
#elif defined(HAVE___VA_COPY)
#define VA_COPY(dest, src) __va_copy(dest, src)
#else
#define VA_COPY(dest, src) (dest) = (src)
#endif
#if defined(VALGRIND)
#define strlen(x) valgrind_strlen(x)
#endif
@ -275,10 +194,6 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
#endif
#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
#ifndef UINT16_MAX
#define UINT16_MAX 65535
#endif
/*
type safe varient of smb_xmalloc()
*/

View File

@ -20,30 +20,10 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "heimdal_build/config.h"
#ifdef HAVE_KRB5_H
#include <krb5.h>
#else
#undef HAVE_KRB5
#endif
#if defined(HAVE_GSSAPI_H)
# include <gssapi.h>
# ifdef HAVE_GSSAPI_KRB5_H
# include <gssapi_krb5.h>
# endif
#elif defined(HAVE_GSSAPI_GSSAPI_H)
# include <gssapi/gssapi.h>
# if defined(HAVE_GSSAPI_GSSAPI_KRB5_H)
# include <gssapi/gssapi_krb5.h>
# endif
#elif defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
# include <gssapi/gssapi_generic.h>
# if defined(HAVE_GSSAPI_GSSAPI_KRB5_H)
# include <gssapi/gssapi_krb5.h>
# endif
#endif
#ifdef HAVE_COM_ERR_H
#include <com_err.h>
#ifdef HAVE_KRB5
#include "heimdal/lib/krb5/krb5.h"
#include "heimdal/lib/gssapi/gssapi.h"
#include "heimdal/lib/com_err/com_err.h"
#endif

View File

@ -1,5 +1,5 @@
SMB_MODULE_DEFAULT(server_service_kdc, NOT)
if test t$SMB_EXT_LIB_ENABLE_KDC = tYES; then
if test t$HAVE_KRB5 = tYES; then
SMB_MODULE_DEFAULT(server_service_kdc, STATIC)
fi

View File

@ -7,6 +7,6 @@ INIT_OBJ_FILES = \
kdc/kdc.o \
kdc/hdb-ldb.o
REQUIRED_SUBSYSTEMS = \
LIBLDB EXT_LIB_KRB5 EXT_LIB_KDC
LIBLDB KERBEROS_LIB
# End SUBSYSTEM KDC
#######################

View File

@ -23,7 +23,7 @@
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
#include <kdc.h>
#include "heimdal/kdc/kdc.h"
krb5_error_code hdb_ldb_create(krb5_context context, struct HDB **db, const char *arg);

View File

@ -1,14 +1,5 @@
# LIB BASIC subsystem
##############################
# Start SUBSYSTEM LIBREPLACE
[SUBSYSTEM::LIBREPLACE]
INIT_OBJ_FILES = lib/replace/replace.o
ADD_OBJ_FILES = \
lib/replace/snprintf.o
# End SUBSYSTEM LIBREPLACE
##############################
##############################
# Start SUBSYSTEM LIBNETIF
[SUBSYSTEM::LIBNETIF]

View File

@ -0,0 +1,9 @@
##############################
# Start SUBSYSTEM LIBREPLACE
[SUBSYSTEM::LIBREPLACE]
INIT_OBJ_FILES = lib/replace/replace.o
ADD_OBJ_FILES = \
lib/replace/snprintf.o
# End SUBSYSTEM LIBREPLACE
##############################

View File

@ -0,0 +1,114 @@
/*
Unix SMB/CIFS implementation.
macros to go along with the lib/replace/ portability layer code
Copyright (C) Andrew Tridgell 2005
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _replace_h
#define _replace_h
#ifdef __COMPAR_FN_T
#define QSORT_CAST (__compar_fn_t)
#endif
#ifndef QSORT_CAST
#define QSORT_CAST (int (*)(const void *, const void *))
#endif
#ifndef HAVE_STRDUP
char *strdup(const char *s);
#endif
#ifndef HAVE_MEMMOVE
void *memmove(void *dest,const void *src,int size);
#endif
#ifndef HAVE_MKTIME
time_t mktime(struct tm *t);
#endif
#ifndef HAVE_STRLCPY
size_t strlcpy(char *d, const char *s, size_t bufsize);
#endif
#ifndef HAVE_STRLCAT
size_t strlcat(char *d, const char *s, size_t bufsize);
#endif
#ifndef HAVE_STRNDUP
char *strndup(const char *s, size_t n);
#endif
#ifndef HAVE_STRNLEN
size_t strnlen(const char *s, size_t n);
#endif
#ifndef HAVE_STRTOUL
unsigned long strtoul(const char *nptr, char **endptr, int base);
#endif
#ifndef HAVE_SETENV
int setenv(const char *name, const char *value, int overwrite);
#endif
#ifndef HAVE_VASPRINTF_DECL
int vasprintf(char **ptr, const char *format, va_list ap);
#endif
#if !defined(HAVE_BZERO) && defined(HAVE_MEMSET)
#define bzero(a,b) memset((a),'\0',(b))
#endif
/* add varargs prototypes with printf checking */
#ifndef HAVE_SNPRINTF_DECL
int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
#endif
#ifndef HAVE_ASPRINTF_DECL
int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
#endif
/* we used to use these fns, but now we have good replacements
for snprintf and vsnprintf */
#define slprintf snprintf
#ifdef HAVE_VA_COPY
#define VA_COPY(dest, src) va_copy(dest, src)
#elif defined(HAVE___VA_COPY)
#define VA_COPY(dest, src) __va_copy(dest, src)
#else
#define VA_COPY(dest, src) (dest) = (src)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX 65535
#endif
#if defined(HAVE_VOLATILE)
#define VOLATILE volatile
#else
#define VOLATILE
#endif
#ifndef HAVE_COMPARISON_FN_T
typedef int (*comparison_fn_t)(const void *, const void *);
#endif
#endif

View File

@ -91,6 +91,10 @@ NTSTATUS server_service_startup(struct event_context *event_ctx,
NTSTATUS status;
status = server_service_init(server_services[i], event_ctx, model_ops);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Failed to start service '%s' - %s\n",
server_services[i], nt_errstr(status)));
}
NT_STATUS_NOT_OK_RETURN(status);
}