#
# TODO:
# - finish fallback code
-# - finish proto code
# - support for init functions
# - separate config file for lib/replace/
+# - Subsystem() ?
import cPickle, string, os
CPPDEFINES={'_SAMBA_BUILD_': None},
)
+hostenv.Help(opts.GenerateHelpText(hostenv))
+
# We don't care about NFS builds...
hostenv.SetOption('max_drift', 1)
AC_CHECK_TYPE(ino_t,unsigned)
AC_CHECK_TYPE(loff_t,off_t)
AC_CHECK_TYPE(offset_t,loff_t)
-AC_CHECK_TYPES(ssize_t)
AC_CHECK_TYPES(intptr_t)
AC_CHECK_TYPES(long long)
#include "system/dir.h"
#include "system/filesys.h"
#include "dlinklist.h"
+#include "credentials.h"
+#include "system/readline.h"
#ifndef REGISTER
#define REGISTER 0
#include "includes.h"
#include "gtk/common/gtk-smb.h"
+#include "include/credentials.h"
static void gtk_get_credentials(struct cli_credentials *credentials)
{
#define HAVE_STRNDUP
#endif
+#ifndef HAVE_SSIZE_T
+#define HAVE_SSIZE_T
+#endif
+
#endif
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+struct ccache_container;
+
/* In order of priority */
enum credentials_obtained {
CRED_UNINITIALISED = 0, /* We don't even have a guess yet */
#include <varargs.h>
#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-
/* we support ADS if we want it and have krb5 and ldap libs */
#if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP)
#define HAVE_ADS
#include "ntvfs/ntvfs.h"
#include "cli_context.h"
#include "lib/com/com.h"
-#include "credentials.h"
-
-
#define malloc_p(type) (type *)malloc(sizeof(type))
#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
#endif
#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
-#ifndef HAVE_SSIZE_T
-#define ssize_t int
-#endif
-
#ifndef UINT16_MAX
#define UINT16_MAX 65535
#endif
#define smb_xmalloc_p(type) (type *)smb_xmalloc(sizeof(type))
#endif /* _INCLUDES_H */
-
/* the default netbios keepalive timeout */
#define DEFAULT_KEEPALIVE 300
-/* the directory to sit in when idle */
-/* #define IDLE_DIR "/" */
-
/* Timout (in seconds) to wait for an oplock break
message to return from the client. */
DEBUG(0,("PANIC: assert failed at %s(%d)\n", __FILE__, __LINE__)); \
smb_panic("assert failed"); }} while (0)
-/* REWRITE TODO: remove these smb_xxx macros */
-#define smb_buf(buf) (((char *)(buf)) + MIN_SMB_SIZE + CVAL(buf,HDR_WCT+4)*2)
-
#define smb_len(buf) (PVAL(buf,3)|(PVAL(buf,2)<<8)|(PVAL(buf,1)<<16))
#define _smb_setlen(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0x10000)>>16; \
(buf)[2] = ((len)&0xFF00)>>8; (buf)[3] = (len)&0xFF;} while (0)
struct param_context;
struct param_section;
struct param;
+
+enum credentials_obtained;
+struct cli_credentials;
+struct ccache_container;
--- /dev/null
+/*
+ Unix SMB/CIFS implementation.
+
+ readline wrappers
+
+ 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.
+*/
+
+#ifdef HAVE_LIBREADLINE
+# ifdef HAVE_READLINE_READLINE_H
+# include <readline/readline.h>
+# ifdef HAVE_READLINE_HISTORY_H
+# include <readline/history.h>
+# endif
+# else
+# ifdef HAVE_READLINE_H
+# include <readline.h>
+# ifdef HAVE_HISTORY_H
+# include <history.h>
+# endif
+# else
+# undef HAVE_LIBREADLINE
+# endif
+# endif
+#endif
+
+#ifdef HAVE_NEW_LIBREADLINE
+# define RL_COMPLETION_CAST (rl_completion_func_t *)
+#else
+/* This type is missing from libreadline<4.0 (approximately) */
+# define RL_COMPLETION_CAST
+#endif /* HAVE_NEW_LIBREADLINE */
proto_files = basic_files
-basic = hostenv.StaticLibrary('basic', [dynconfig,charset,talloc,basic_files])
+basic = hostenv.StaticLibrary('basic', [dynconfig,charset,talloc,basic_files,charset])
Export('basic')
hostenv.StaticLibrary('tdr', ['tdr/tdr.c'])
#include "system/filesys.h"
#include "system/passwd.h"
#include "lib/cmdline/popt_common.h"
+#include "credentials.h"
/* Handle command line options:
* -d,--debuglevel
#include "pstring.h"
#include <unistd.h>
-
-#ifdef HAVE_LIBREADLINE
-# ifdef HAVE_READLINE_READLINE_H
-# include <readline/readline.h>
-# ifdef HAVE_READLINE_HISTORY_H
-# include <readline/history.h>
-# endif
-# else
-# ifdef HAVE_READLINE_H
-# include <readline.h>
-# ifdef HAVE_HISTORY_H
-# include <history.h>
-# endif
-# else
-# undef HAVE_LIBREADLINE
-# endif
-# endif
-#endif
-
-#ifdef HAVE_NEW_LIBREADLINE
-# define RL_COMPLETION_CAST (rl_completion_func_t *)
-#else
-/* This type is missing from libreadline<4.0 (approximately) */
-# define RL_COMPLETION_CAST
-#endif /* HAVE_NEW_LIBREADLINE */
+#include "system/readline.h"
/****************************************************************************
Display the prompt and wait for input. Call callback() regularly
#include "librpc/gen_ndr/ndr_samr.h" /* for struct samrPassword */
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
+#include "include/credentials.h"
/**
'u_int32_t': 'unsigned long',
'int64_t': 'long long',
'uint64_t': 'unsigned long long',
+ 'ssize_t': 'int'
}
type_headers = """
AC_CHECK_TYPE(u_int32_t, unsigned long)
AC_CHECK_TYPE(u_int16_t, unsigned short)
AC_CHECK_TYPE(u_int8_t, unsigned char)
+AC_CHECK_TYPE(ssize_t, int)
AC_CACHE_CHECK([for broken inet_ntoa],samba_cv_REPLACE_INET_NTOA,[
AC_TRY_RUN([
#ifndef _WIN32_REPLACE_H
#define _WIN32_REPLACE_H
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
/* Map BSD Socket errorcodes to the WSA errorcodes (if possible) */
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#include "system/filesys.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "lib/tdb/include/tdbutil.h"
+#include "credentials.h"
/**
* Unpack SID into a pointer
#include "libcli/smb_composite/smb_composite.h"
#include "smb_server/smb_server.h"
#include "smbd/service_stream.h"
+#include "credentials.h"
/* this is stored in ntvfs_private */
struct cvfs_private {
#include "includes.h"
#include "rpc_server/dcerpc_server.h"
+#include "credentials.h"
struct dcesrv_remote_private {
struct dcerpc_pipe *c_pipe;
#include "libcli/raw/libcliraw.h"
#include "libcli/composite/composite.h"
#include "clilist.h"
+#include "credentials.h"
#if 0
#include "scripting/ejs/smbcalls.h"
#include "lib/appweb/ejs/ejs.h"
#include "lib/cmdline/popt_common.h"
+#include "credentials.h"
/*
helper function to get the local objects credentials ptr
#include "libcli/raw/libcliraw.h"
#include "system/time.h"
#include "libcli/composite/composite.h"
+#include "credentials.h"
#include "libcli/smb_composite/smb_composite.h"
static BOOL try_failed_login(struct smbcli_state *cli)
#include "request.h"
#include "libcli/raw/libcliraw.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "credentials.h"
#define NSERVERS 2
#define NINSTANCES 2
#include "system/filesys.h"
#include "system/time.h"
#include "pstring.h"
+#include "credentials.h"
static int numops = 1000;
static BOOL showall;
#include "clilist.h"
#include "libcli/raw/libcliraw.h"
#include "system/time.h"
+#include "credentials.h"
#include "pstring.h"
static struct cli_credentials *credentials;
#include "auth/auth.h"
#include "lib/crypto/crypto.h"
#include "lib/cmdline/popt_common.h"
+#include "credentials.h"
#define TEST_MACHINE_NAME "samlogontest"
#define TEST_USER_NAME "samlogontestuser"
#include "dlinklist.h"
#include "lib/crypto/crypto.h"
#include "system/time.h"
+#include "credentials.h"
#define TEST_MACHINE_NAME "samsynctest"
#define TEST_WKSTA_MACHINE_NAME "samsynctest2"
#include "librpc/gen_ndr/ndr_samr.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
#include "lib/cmdline/popt_common.h"
+#include "credentials.h"
#define TEST_MACHINE_NAME "schanneltest"
#include "lib/cmdline/popt_common.h"
#include "auth/auth.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "credentials.h"
#define SQUID_BUFFER_SIZE 2010