diff --git a/autogen.sh b/autogen.sh index 071533ce6..6d4ed0335 100755 --- a/autogen.sh +++ b/autogen.sh @@ -29,7 +29,7 @@ fi cd "$srcdir" # The autoconf cache (version after 2.52) is not reliable yet. -rm -rf autom4te.cache src/vfs/smbfs/helpers/autom4te.cache +rm -rf autom4te.cache if test ! -d config; then mkdir config @@ -71,17 +71,6 @@ fi $AUTOMAKE -a test -f Makefile.in || \ { echo "automake failed to generate Makefile.in" >&2; exit 1; } - -cd src/vfs/smbfs/helpers -date -u >include/stamp-h.in - -$AUTOHEADER -test -f include/config.h.in || \ - { echo "autoheader failed to generate src/vfs/smbfs/helpers/include/config.h.in" >&2; exit 1; } - -$AUTOCONF -test -f configure || \ - { echo "autoconf failed to generate src/vfs/smbfs/helpers/configure" >&2; exit 1; } ) || exit 1 $srcdir/maint/utils/version.sh "$srcdir" diff --git a/configure.ac b/configure.ac index 6591c53ca..8eb0a6a5a 100644 --- a/configure.ac +++ b/configure.ac @@ -572,8 +572,6 @@ src/vfs/local/Makefile src/vfs/sfs/Makefile -src/vfs/smbfs/Makefile - src/vfs/tar/Makefile src/vfs/undelfs/Makefile diff --git a/m4.include/mc-vfs.m4 b/m4.include/mc-vfs.m4 index d9d2d4944..9c15cddde 100644 --- a/m4.include/mc-vfs.m4 +++ b/m4.include/mc-vfs.m4 @@ -17,7 +17,6 @@ m4_include([m4.include/vfs/mc-vfs-fish.m4]) m4_include([m4.include/vfs/mc-vfs-undelfs.m4]) m4_include([m4.include/vfs/mc-vfs-tarfs.m4]) m4_include([m4.include/vfs/mc-vfs-cpiofs.m4]) -m4_include([m4.include/vfs/mc-vfs-samba.m4]) dnl MC_VFS_CHECKS dnl Check for various functions needed by libvfs. @@ -77,7 +76,6 @@ AC_DEFUN([AC_MC_VFS_CHECKS], AC_MC_VFS_FTP AC_MC_VFS_SFTP AC_MC_VFS_FISH - AC_MC_VFS_SMB AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"]) diff --git a/m4.include/vfs/mc-vfs-samba.m4 b/m4.include/vfs/mc-vfs-samba.m4 deleted file mode 100644 index 1c7960aac..000000000 --- a/m4.include/vfs/mc-vfs-samba.m4 +++ /dev/null @@ -1,61 +0,0 @@ -dnl Samba support -AC_DEFUN([AC_MC_VFS_SMB], -[ - AC_ARG_ENABLE([vfs-smb], - AS_HELP_STRING([--enable-vfs-smb], [Support for SMB filesystem @<:@no@:>@]), - [ - if test "x$enableval" = "xno"; then - enable_vfs_smb=no - else - enable_vfs_smb=yes - fi - ], - [enable_vfs_smb=no]) - - if test "$enable_vfs" = "yes" -a x"$enable_vfs_smb" != x"no"; then - enable_vfs_smb="yes" - AC_MC_VFS_ADDNAME([smb]) - AC_DEFINE([ENABLE_VFS_SMB], [1], [Define to enable VFS over SMB]) - fi - - if test "$enable_vfs_smb" = "yes"; then - AC_CONFIG_SUBDIRS([src/vfs/smbfs/helpers]) - - AM_CONDITIONAL([ENABLE_VFS_SMB], [test "1" = "1"]) - - # set configuration directory location - smbconfigdir="/etc" - AC_ARG_WITH(smb-configdir, - [ --with-smb-configdir=DIR Where to put configuration files], - [ case "$withval" in - yes|no) - # Just in case anybody does it - AC_MSG_WARN([--with-smb-configdir called without argument - will use default]) - ;; - *) - smbconfigdir="$withval" - ;; - esac]) - - AC_SUBST(smbconfigdir) - - # set codepage directory location - AC_ARG_WITH(smb-codepagedir, - [ --with-smb-codepagedir=DIR Where to put codepage files], - [ case "$withval" in - yes|no) - # Just in case anybody does it - AC_MSG_WARN([--with-smb-codepagedir called without argument - will use default]) - ;; - *) - smbcodepagedir="$withval" - ;; - esac]) - - # export variable for child process (configure of samba) - export SMBCONFIGDIR="$smbconfigdir" - export SMBCODEPAGEDIR="$smbcodepagedir" - else - AM_CONDITIONAL([ENABLE_VFS_SMB], [test "1" = "2"]) - fi -]) diff --git a/src/Makefile.am b/src/Makefile.am index 13edbab0d..e389e87bb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -47,11 +47,6 @@ mc_LDADD = \ libinternal.la \ $(top_builddir)/lib/libmc.la -if ENABLE_VFS_SMB -# this is a hack for linking with own samba library in simple way -mc_LDADD += vfs/smbfs/helpers/libsamba.a -endif - SRC_mc_conssaver = \ cons.handler.c consaver/cons.saver.h diff --git a/src/args.c b/src/args.c index a8c0522ee..fda0230ea 100644 --- a/src/args.c +++ b/src/args.c @@ -34,10 +34,6 @@ #include "lib/vfs/vfs.h" #include "lib/util.h" /* x_basename() */ -#ifdef ENABLE_VFS_SMB -#include "src/vfs/smbfs/smbfs.h" /* smbfs_set_debugf() */ -#endif - #include "src/textconf.h" #include "src/args.h" @@ -163,14 +159,6 @@ static const GOptionEntry argument_main_table[] = { "" }, #endif /* ENABLE_VFS_FTP */ -#ifdef ENABLE_VFS_SMB - { - "debuglevel", 'D', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT, - &mc_args__debug_level, - N_("Set debug level"), - "" - }, -#endif /* ENABLE_VFS_SMB */ /* single file operations */ { @@ -709,11 +697,6 @@ mc_setup_by_args (int argc, char **argv, GError ** error) mc_global.tty.use_subshell = FALSE; #endif /* ENABLE_SUBSHELL */ -#ifdef ENABLE_VFS_SMB - if (mc_args__debug_level != 0) - smbfs_set_debug (mc_args__debug_level); -#endif /* ENABLE_VFS_SMB */ - if (mc_args__netfs_logfile != NULL) { vfs_path_t *vpath; @@ -722,11 +705,6 @@ mc_setup_by_args (int argc, char **argv, GError ** error) mc_setctl (vpath, VFS_SETCTL_LOGFILE, (void *) mc_args__netfs_logfile); vfs_path_free (vpath); #endif /* ENABLE_VFS_FTP */ -#ifdef ENABLE_VFS_SMB - vpath = vfs_path_from_str ("smb://"); - mc_setctl (vpath, VFS_SETCTL_LOGFILE, (void *) mc_args__netfs_logfile); - vfs_path_free (vpath); -#endif /* ENABLE_VFS_SMB */ (void) vpath; } diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c index bd15ae9c5..2e1f17b39 100644 --- a/src/filemanager/boxes.c +++ b/src/filemanager/boxes.c @@ -52,9 +52,6 @@ #ifdef ENABLE_VFS_FTP #include "src/vfs/ftpfs/ftpfs.h" #endif /* ENABLE_VFS_FTP */ -#ifdef ENABLE_VFS_SMB -#include "src/vfs/smbfs/smbfs.h" -#endif /* ENABLE_VFS_SMB */ #include "lib/util.h" /* Q_() */ #include "lib/widget.h" @@ -1162,66 +1159,3 @@ jobs_cmd (void) #endif /* ENABLE_BACKGROUND */ /* --------------------------------------------------------------------------------------------- */ - -#ifdef ENABLE_VFS_SMB -struct smb_authinfo * -vfs_smb_get_authinfo (const char *host, const char *share, const char *domain, const char *user) -{ - char *label; - struct smb_authinfo *return_value = NULL; - - if (domain == NULL) - domain = ""; - if (user == NULL) - user = ""; - - label = g_strdup_printf (_("Password for \\\\%s\\%s"), host, share); - - { - char *ret_domain, *ret_user, *ret_password; - - quick_widget_t quick_widgets[] = { - /* *INDENT-OFF* */ - QUICK_LABEL (label, NULL), - QUICK_SEPARATOR (TRUE), - QUICK_START_COLUMNS, - QUICK_LABEL (N_("Domain:"), NULL), - QUICK_SEPARATOR (FALSE), - QUICK_LABEL (N_("Username:"), NULL), - QUICK_SEPARATOR (FALSE), - QUICK_LABEL (N_("Password:"), NULL), - QUICK_NEXT_COLUMN, - QUICK_INPUT (domain, "auth_domain", &ret_domain, NULL, FALSE, FALSE, INPUT_COMPLETE_HOSTNAMES), - QUICK_SEPARATOR (FALSE), - QUICK_INPUT (user, "auth_name", &ret_user, NULL, FALSE, FALSE, INPUT_COMPLETE_USERNAMES), - QUICK_SEPARATOR (FALSE), - QUICK_INPUT ("", "auth_password", &ret_password, NULL, TRUE, FALSE, INPUT_COMPLETE_NONE), - QUICK_STOP_COLUMNS, - QUICK_BUTTONS_OK_CANCEL, - QUICK_END - /* *INDENT-ON* */ - }; - - quick_dialog_t qdlg = { - -1, -1, 40, - N_("SMB authentication"), "[Smb Authinfo]", - quick_widgets, NULL, NULL - }; - - if (quick_dialog (&qdlg) != B_CANCEL) - { - return_value = vfs_smb_authinfo_new (host, share, ret_domain, ret_user, ret_password); - - g_free (ret_domain); - g_free (ret_user); - g_free (ret_password); - } - } - - g_free (label); - - return return_value; -} -#endif /* ENABLE_VFS_SMB */ - -/* --------------------------------------------------------------------------------------------- */ diff --git a/src/textconf.c b/src/textconf.c index 6c41d664b..fae5d9775 100644 --- a/src/textconf.c +++ b/src/textconf.c @@ -70,9 +70,6 @@ static const char *const vfs_supported[] = { #ifdef ENABLE_VFS_FISH "fish", #endif -#ifdef ENABLE_VFS_SMB - "smbfs", -#endif /* ENABLE_VFS_SMB */ NULL }; #endif /* ENABLE_VFS */ diff --git a/src/vfs/Makefile.am b/src/vfs/Makefile.am index a0a1c930f..1441953bb 100644 --- a/src/vfs/Makefile.am +++ b/src/vfs/Makefile.am @@ -36,11 +36,6 @@ SUBDIRS += sfs libmc_vfs_la_LIBADD += sfs/libvfs-sfs.la endif -if ENABLE_VFS_SMB -SUBDIRS += smbfs -libmc_vfs_la_LIBADD += smbfs/libvfs-smbfs.la -endif - if ENABLE_VFS_TAR SUBDIRS += tar libmc_vfs_la_LIBADD += tar/libvfs-tar.la diff --git a/src/vfs/plugins_init.c b/src/vfs/plugins_init.c index e77b7d7f3..ad84d4d70 100644 --- a/src/vfs/plugins_init.c +++ b/src/vfs/plugins_init.c @@ -62,10 +62,6 @@ #include "sfs/sfs.h" #endif -#ifdef ENABLE_VFS_SMB -#include "smbfs/smbfs.h" -#endif - #ifdef ENABLE_VFS_TAR #include "tar/tar.h" #endif @@ -122,9 +118,6 @@ vfs_plugins_init (void) #ifdef ENABLE_VFS_FISH init_fish (); #endif /* ENABLE_VFS_FISH */ -#ifdef ENABLE_VFS_SMB - init_smbfs (); -#endif /* ENABLE_VFS_SMB */ } diff --git a/src/vfs/smbfs/Makefile.am b/src/vfs/smbfs/Makefile.am deleted file mode 100644 index 1b4b224b8..000000000 --- a/src/vfs/smbfs/Makefile.am +++ /dev/null @@ -1,86 +0,0 @@ -DIST_SUBDIRS = - -SUBDIRS = helpers - -AM_CPPFLAGS = \ - -DCONFIGDIR=\""@smbconfigdir@"\" \ - $(GLIB_CFLAGS) \ - -I$(top_srcdir) - -noinst_LTLIBRARIES = libvfs-smbfs.la - -libvfs_smbfs_la_SOURCES = \ - smbfs.c smbfs.h - -SAMBA_DIST = \ - Makefile.in \ - aclocal.m4 \ - configure.ac \ - configure \ - internals.doc \ - parsing.doc \ - include/byteorder.h \ - include/charset.h \ - include/client.h \ - include/config.h.in \ - include/includes.h \ - include/kanji.h \ - include/local.h \ - include/nameserv.h \ - include/nterr.h \ - include/proto.h \ - include/smb.h \ - include/stamp-h.in \ - include/trans2.h \ - include/version.h \ - lib/charcnv.c \ - lib/charset.c \ - lib/debug.c \ - lib/interface.c \ - lib/kanji.c \ - lib/md4.c \ - lib/netmask.c \ - lib/slprintf.c \ - lib/system.c \ - lib/time.c \ - lib/username.c \ - lib/util.c \ - lib/util_file.c \ - lib/util_sock.c \ - lib/util_str.c \ - libsmb/clientgen.c \ - libsmb/namequery.c \ - libsmb/nmblib.c \ - libsmb/nterr.c \ - libsmb/pwd_cache.c \ - libsmb/smbdes.c \ - libsmb/smbencrypt.c \ - libsmb/smberr.c \ - param/loadparm.c \ - param/params.c - -dist-hook: - $(mkinstalldirs) $(distdir)/helpers - $(mkinstalldirs) $(distdir)/helpers/include - $(mkinstalldirs) $(distdir)/helpers/lib - $(mkinstalldirs) $(distdir)/helpers/libsmb - $(mkinstalldirs) $(distdir)/helpers/param - for I in $(SAMBA_DIST); do \ - cp -p $(srcdir)/helpers/$$I $(distdir)/helpers/$$I || exit 1; \ - done - -mostlyclean-local: - if test -f helpers/Makefile; then \ - (cd helpers && $(MAKE) mostlyclean) \ - else :; fi - -clean-local: - if test -f helpers/Makefile; then \ - (cd helpers && $(MAKE) clean) \ - else :; fi - -distclean-local: - if test -f helpers/Makefile; then \ - (cd helpers && $(MAKE) distclean) \ - else :; fi - diff --git a/src/vfs/smbfs/helpers/Makefile.in b/src/vfs/smbfs/helpers/Makefile.in deleted file mode 100644 index 4ab950334..000000000 --- a/src/vfs/smbfs/helpers/Makefile.in +++ /dev/null @@ -1,171 +0,0 @@ -########################################################################### -# Makefile.in for Samba - rewritten for autoconf support -# Copyright Andrew Tridgell 1992-1998 -########################################################################### - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -mandir=@mandir@ - -CC=@CC@ -CFLAGS=@CFLAGS@ -CPPFLAGS=@CPPFLAGS@ -LDFLAGS=@LDFLAGS@ -AWK=@AWK@ -AR=@AR@ - -INSTALLCMD=@INSTALL@ - -VPATH=@srcdir@ -srcdir=@srcdir@ -builddir=@builddir@ -SHELL=@SHELL@ - -BASEDIR= @prefix@ -LIBDIR = @libdir@ -VARDIR = @localstatedir@ - -# The permissions to give the executables -INSTALLPERMS = 0755 - -# set these to where to find various files -# These can be overridden by command line switches (see smbd(8)) -# or in smb.conf (see smb.conf(5)) -CONFIGFILE = @configdir@/smb.conf -LMHOSTSFILE = @configdir@/lmhosts -DRIVERFILE = $(LIBDIR)/printers.def - -# The directory where code page definition files go -CODEPAGEDIR = @codepagedir@ - -FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include $(CPPFLAGS) -FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" -FLAGS3 = -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" -FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -FLAGS = $(ISA) $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) -DHAVE_INCLUDES_H - -###################################################################### -# object file lists -###################################################################### - -SAMBAFILES= \ - param/loadparm.o \ - param/params.o \ - lib/time.o \ - lib/slprintf.o \ - lib/util.o \ - lib/debug.o \ - lib/system.o \ - lib/util_str.o \ - lib/kanji.o \ - lib/charcnv.o \ - lib/charset.o \ - lib/username.o \ - lib/util_file.o \ - lib/util_sock.o \ - lib/md4.o \ - lib/interface.o \ - lib/netmask.o \ - libsmb/clientgen.o \ - libsmb/pwd_cache.o \ - libsmb/smbencrypt.o \ - libsmb/smbdes.o \ - libsmb/nmblib.o \ - libsmb/namequery.o\ - libsmb/nterr.o \ - libsmb/smberr.o - -###################################################################### -# now the rules... -###################################################################### - -all : CHECK libsamba.a - -.SUFFIXES: -.SUFFIXES: .c .o - -CHECK: - @echo "Using FLAGS = $(FLAGS)" - -MAKEDIR = || exec false; \ - if test -d "$$dir"; then :; else \ - echo mkdir "$$dir"; \ - mkdir -p "$$dir" >/dev/null 2>&1 || \ - test -d "$$dir" || \ - mkdir "$$dir" || \ - exec false; fi || exec false - -libsamba.a: $(SAMBAFILES) - $(AR) cr libsamba.a $(SAMBAFILES) - -.c.o: - @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ - dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi - @echo Compiling $*.c - @$(CC) -I. -I$(srcdir) $(FLAGS) -c $< \ - -o $@ -@BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@ - -etags: - etags `find . -name "*.[ch]"` - -ctags: - ctags `find . -name "*.[ch]"` - -mostlyclean: - rm -f core */*~ *~ */*.o config.log - -clean: mostlyclean - rm -f *.a - -distclean: clean - rm -f config.log - rm -f include/config.h include/stamp-h Makefile - rm -f config.status config.cache so_locations - -# this target is really just for my use. It only works on a limited -# range of machines and is used to produce a list of potentially -# dead (ie. unused) functions in the code. (tridge) -finddead: - nm */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt - nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt - comm -13 nmused.txt nmfns.txt - -# Rules for maintainers (--enable-maintainer-mode) -AUTOCONF=@AUTOCONF@ -AUTOHEADER=@AUTOHEADER@ - -# when configure.ac is updated, reconfigure -$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/aclocal.m4 - cd $(srcdir) && $(AUTOCONF) - -config.status: $(srcdir)/configure - $(SHELL) ./config.status --recheck - -Makefile: $(srcdir)/Makefile.in config.status \ - include/stamp-h # just to ensure that config.h is up-to-date - CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -# note that nothing depends on config.h, so will probably be rebuilt -# only when explicitly requested, unless dependency tracking is enabled -include/config.h: include/stamp-h - @: - -include/stamp-h: $(srcdir)/include/config.h.in config.status - CONFIG_FILES= CONFIG_HEADERS=include/config.h $(SHELL) ./config.status - @echo > include/stamp-h - -$(srcdir)/include/config.h.in: $(srcdir)/include/stamp-h.in - @: - -$(srcdir)/include/stamp-h.in: @MAINT@ $(srcdir)/configure.ac - cd $(srcdir) && $(AUTOHEADER) - @date -u > $@ - -# Added for compatibility with Automake-generated makefiles -distdir: -dvi: -check: -install: -installcheck: -uninstall: diff --git a/src/vfs/smbfs/helpers/aclocal.m4 b/src/vfs/smbfs/helpers/aclocal.m4 deleted file mode 100644 index 8a8e74968..000000000 --- a/src/vfs/smbfs/helpers/aclocal.m4 +++ /dev/null @@ -1,61 +0,0 @@ -dnl AC_VALIDATE_CACHE_SYSTEM_TYPE[(cmd)] -dnl if the cache file is inconsistent with the current host, -dnl target and build system types, execute CMD or print a default -dnl error message. -AC_DEFUN([AC_VALIDATE_CACHE_SYSTEM_TYPE], [ - AC_REQUIRE([AC_CANONICAL_SYSTEM]) - AC_MSG_CHECKING([config.cache system type]) - if { test x"${ac_cv_host_system_type+set}" = x"set" && - test x"$ac_cv_host_system_type" != x"$host"; } || - { test x"${ac_cv_build_system_type+set}" = x"set" && - test x"$ac_cv_build_system_type" != x"$build"; } || - { test x"${ac_cv_target_system_type+set}" = x"set" && - test x"$ac_cv_target_system_type" != x"$target"; }; then - AC_MSG_RESULT([different]) - ifelse($#, 1, [$1], - [AC_MSG_ERROR([you must remove config.cache and restart configure])]) - else - AC_MSG_RESULT([same]) - fi - ac_cv_host_system_type="$host" - ac_cv_build_system_type="$build" - ac_cv_target_system_type="$target" -]) - -dnl based on Automake's maintainer mode -AC_DEFUN([SAMBA_MAINTAINER_MODE],[ - AC_ARG_ENABLE(maintainer-mode, - [ --enable-maintainer-mode enable some make rules for maintainers], - maint_mode=$enableval, maint_mode=no) - if test x"$maint_mode" = x"yes"; then MAINT=; else MAINT='#'; fi - AC_SUBST(MAINT) - AC_PATH_PROG(AUTOCONF, autoconf, autoconf) - AC_SUBST(AUTOCONF) - AC_PATH_PROG(AUTOHEADER, autoheader, autoheader) - AC_SUBST(AUTOHEADER) -]) - - -dnl AC_PROG_CC_FLAG(flag) -AC_DEFUN([AC_PROG_CC_FLAG], -[AC_CACHE_CHECK([whether ${CC-cc} accepts -$1], ac_cv_prog_cc_$1, -[echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -$1 -c conftest.c 2>&1`"; then - ac_cv_prog_cc_$1=yes -else - ac_cv_prog_cc_$1=no -fi -rm -f conftest* -])]) - -dnl check for a function in a library, but don't -dnl keep adding the same library to the LIBS variable. -dnl AC_LIBTESTFUNC(lib,func) -AC_DEFUN([AC_LIBTESTFUNC], -[case "$LIBS" in - *-l$1*) AC_CHECK_FUNCS($2) ;; - *) AC_CHECK_LIB($1, $2) - AC_CHECK_FUNCS($2) - ;; - esac -]) diff --git a/src/vfs/smbfs/helpers/configure.ac b/src/vfs/smbfs/helpers/configure.ac deleted file mode 100644 index 060e372d0..000000000 --- a/src/vfs/smbfs/helpers/configure.ac +++ /dev/null @@ -1,573 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(include/includes.h) -AC_PREREQ(2.52) -AC_CONFIG_HEADER(include/config.h) -AC_CONFIG_AUX_DIR(../../../../config) -# we want to be compatibe with older versions of Samba -AC_PREFIX_DEFAULT(/usr/local/samba) -AC_SYS_LARGEFILE - -dnl Unique-to-Samba variables we'll be playing with. -AC_SUBST(SHELL) -AC_SUBST(MPROGS) -AC_SUBST(LDSHFLAGS) -AC_SUBST(HOST_OS) -AC_SUBST(WRAP) -AC_SUBST(WRAP32) - -# compile with optimization and without debugging by default -CFLAGS=${CFLAGS-"-O"} - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_AWK -AC_CHECK_TOOL(AR, ar, ar) - -dnl Check if C compiler understands -c and -o at the same time -AC_PROG_CC_C_O -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then - BROKEN_CC= -else - BROKEN_CC=# -fi -AC_SUBST(BROKEN_CC) - -AC_CANONICAL_HOST -AC_VALIDATE_CACHE_SYSTEM_TYPE -SAMBA_MAINTAINER_MODE - -AC_INLINE -AC_HEADER_DIRENT -AC_HEADER_TIME -AC_CHECK_HEADERS(arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h) -AC_CHECK_HEADERS(unistd.h utime.h sys/id.h limits.h memory.h net/if.h) -AC_CHECK_HEADERS(compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h) -AC_CHECK_HEADERS(sys/param.h ctype.h sys/resource.h sys/ioctl.h sys/mode.h) -AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h string.h strings.h sys/socket.h) -AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h) -AC_CHECK_HEADERS(sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h) -AC_CHECK_HEADERS(netinet/tcp.h netinet/in_systm.h netinet/in_ip.h) -AC_CHECK_HEADERS(sys/security.h security/pam_appl.h) -AC_CHECK_HEADERS(stropts.h poll.h syscall.h sys/syscall.h) -AC_CHECK_HEADERS(sys/acl.h sys/cdefs.h) - -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(off_t) -AC_CHECK_SIZEOF(ino_t) - -AC_C_CONST -AC_C_INLINE -AC_C_BIGENDIAN -AC_C_CHAR_UNSIGNED - -AC_TYPE_SIGNAL -AC_TYPE_UID_T -AC_TYPE_MODE_T -AC_TYPE_OFF_T -AC_TYPE_SIZE_T -AC_TYPE_PID_T -AC_CHECK_TYPE(ino_t,unsigned) -AC_CHECK_TYPE(loff_t,off_t) -AC_CHECK_TYPE(offset_t,off_t) -AC_CHECK_TYPE(ssize_t, int) - -# we need libdl for PAM and the new VFS code -AC_CHECK_LIB(dl,main) - -# stupid glibc has the functions but no declaration. grrrr. -AC_CACHE_CHECK([for crypt declaration],samba_cv_have_crypt_decl,[ - AC_TRY_COMPILE([#include ],[int i = (int)crypt], - samba_cv_have_crypt_decl=yes,samba_cv_have_crypt_decl=no)]) -if test x"$samba_cv_have_crypt_decl" = x"yes"; then - AC_DEFINE(HAVE_CRYPT_DECL, 1, [Define if crypt() is declared]) -fi - -AC_FUNC_MEMCMP - -############################################### -# test for where we get crypt() from -AC_CHECK_FUNCS(crypt) -if test x"$ac_cv_func_crypt" = x"no"; then - AC_CHECK_LIB(crypt, crypt, [LIBS="$LIBS -lcrypt"; - AC_DEFINE(HAVE_CRYPT)]) -fi - - -# The following test taken from the cvs sources -# If we can't find connect, try looking in -lsocket, -lnsl, and -linet. -# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has -# libsocket.so which has a bad implementation of gethostbyname (it -# only looks in /etc/hosts), so we only look for -lsocket if we need -# it. -AC_CHECK_FUNCS(connect) -if test x"$ac_cv_func_connect" = x"no"; then - case "$LIBS" in - *-lnsl*) ;; - *) AC_CHECK_LIB(nsl_s, printf) ;; - esac - case "$LIBS" in - *-lnsl*) ;; - *) AC_CHECK_LIB(nsl, printf) ;; - esac - case "$LIBS" in - *-lsocket*) ;; - *) AC_CHECK_LIB(socket, connect) ;; - esac - case "$LIBS" in - *-linet*) ;; - *) AC_CHECK_LIB(inet, connect) ;; - esac - dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value - dnl has been cached. - if test x"$ac_cv_lib_socket_connect" = x"yes" || - test x"$ac_cv_lib_inet_connect" = x"yes"; then - # ac_cv_func_connect=yes - # don't! it would cause AC_CHECK_FUNC to succeed next time configure is run - AC_DEFINE(HAVE_CONNECT) - fi -fi - -AC_CHECK_FUNCS(waitpid getcwd strtoul chown chmod) -AC_CHECK_FUNCS(fstat utime utimes getrlimit fsync memset) -AC_CHECK_FUNCS(memmove vsnprintf snprintf setsid pipe crypt16 getauthuid) -AC_CHECK_FUNCS(sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent) -AC_CHECK_FUNCS(initgroups select rdchk getgrnam pathconf) -AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups mktime rename) -AC_CHECK_FUNCS(grantpt dup2 yp_get_default_domain getpwanam) -AC_CHECK_FUNCS(srandom random srand rand setenv usleep strcasecmp) - -AC_CHECK_FUNCS(getdents) -AC_CHECK_FUNCS(llseek) - -# -# If no strcasecmp, check for it in some known places -# It is in -lresolv on ReliantUNIX and UnixWare -# -lresolve *must* follow -lnsl for name resolution to work properly -# - -if test x$ac_cv_func_strcasecmp = xno ; then - AC_CHECK_LIB(resolv,strcasecmp,[LIBS="$LIBS -lresolv"] - AC_DEFINE(HAVE_STRCASECMP)) -fi - -# -# Check for the functions putprpwnam, set_auth_parameters, -# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity -# Needed for OSF1 and HPUX. -# - -AC_LIBTESTFUNC(security, putprpwnam) -AC_LIBTESTFUNC(sec, putprpwnam) - -AC_LIBTESTFUNC(security, set_auth_parameters) -AC_LIBTESTFUNC(sec, set_auth_parameters) - -AC_LIBTESTFUNC(security, getspnam) -AC_LIBTESTFUNC(sec, getspnam) - -AC_LIBTESTFUNC(security, bigcrypt) -AC_LIBTESTFUNC(sec, bigcrypt) - -AC_LIBTESTFUNC(security, getprpwnam) -AC_LIBTESTFUNC(sec, getprpwnam) - -# this bit needs to be modified for each OS that is suported by -# smbwrapper. You need to specify how to created a shared library and -# how to compile C code to produce PIC object files - -# these are the defaults, good for lots of systems -HOST_OS="$host_os" -LDSHFLAGS="-shared" - -# and these are for particular systems -case "$host_os" in - *linux*) AC_DEFINE(LINUX, 1, [Define on Linux]);; - *solaris*) AC_DEFINE(SUNOS5, 1, [Define on SunOS 5 (Solaris)]) - LDSHFLAGS="-G" - ;; - *sunos*) AC_DEFINE(SUNOS4, 1, [Define on SunOS 4]) - LDSHFLAGS="" - ;; - *bsd*) LDSHFLAGS="-shared -Bshareable" - ;; - *irix*) AC_DEFINE(IRIX, 1, [Define on IRIX]) - case "$host_os" in - *irix6*) AC_DEFINE(IRIX6, 1, [Define on IRIX 6]) - ;; - esac - ATTEMPT_WRAP32_BUILD=yes - ;; - *aix*) AC_DEFINE(AIX, 1, [Define on AIX]);; - *hpux*) AC_DEFINE(HPUX, 1, [Define on HP-UX]);; - *qnx*) AC_DEFINE(QNX, 1, [Define on QNX]);; - *osf*) AC_DEFINE(OSF1, 1, [Define on OSF1]);; - *sco*) AC_DEFINE(SCO, 1, [Define on SCO]);; - *next2*) AC_DEFINE(NEXT2, 1, [Define on NeXT 2]);; - *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man]);; - *sysv4*) - case "$host" in - *-univel-*) if [ test "$GCC" != yes ]; then - AC_DEFINE(HAVE_MEMSET) - fi - LDSHFLAGS="-G" - ;; - esac - ;; - *sysv5*) - if [ test "$GCC" != yes ]; then - AC_DEFINE(HAVE_MEMSET) - fi - LDSHFLAGS="-G" - ;; -esac - -################ - -AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[ -AC_TRY_RUN([ -#include -#include -main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], -samba_cv_have_longlong=yes,samba_cv_have_longlong=no,samba_cv_have_longlong=cross)]) -if test x"$samba_cv_have_longlong" = x"yes"; then - AC_DEFINE(HAVE_LONGLONG, 1, [Define if long long is usable]) -fi - -AC_CACHE_CHECK([for sin_len in sock],samba_cv_HAVE_SOCK_SIN_LEN,[ -AC_TRY_COMPILE([#include -#include -#include ], -[struct sockaddr_in sock; sock.sin_len = sizeof(sock);], -samba_cv_HAVE_SOCK_SIN_LEN=yes,samba_cv_HAVE_SOCK_SIN_LEN=no)]) -if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then - AC_DEFINE(HAVE_SOCK_SIN_LEN, 1, [Define if struct sockaddr_in has sin_len field]) -fi - -AC_CACHE_CHECK([for __FILE__ macro],samba_cv_HAVE_FILE_MACRO,[ -AC_TRY_COMPILE([#include ], [printf("%s\n", __FILE__);], -samba_cv_HAVE_FILE_MACRO=yes,samba_cv_HAVE_FILE_MACRO=no)]) -if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then - AC_DEFINE(HAVE_FILE_MACRO, 1, [Define if __FILE__ macro is supported]) -fi - -AC_CACHE_CHECK([for __FUNCTION__ macro],samba_cv_HAVE_FUNCTION_MACRO,[ -AC_TRY_COMPILE([#include ], [printf("%s\n", __FUNCTION__);], -samba_cv_HAVE_FUNCTION_MACRO=yes,samba_cv_HAVE_FUNCTION_MACRO=no)]) -if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then - AC_DEFINE(HAVE_FUNCTION_MACRO, 1, [Define if __FUNCTION__ macro is supported]) -fi - -AC_CACHE_CHECK([if gettimeofday takes tz argument],samba_cv_HAVE_GETTIMEOFDAY_TZ,[ -AC_TRY_RUN([ -#include -#include -#include -main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}], - samba_cv_HAVE_GETTIMEOFDAY_TZ=yes,samba_cv_HAVE_GETTIMEOFDAY_TZ=no,samba_cv_HAVE_GETTIMEOFDAY_TZ=cross)]) -if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then - AC_DEFINE(HAVE_GETTIMEOFDAY_TZ, 1, [Define if gettimeofday takes tz argument]) -fi - - -AC_CACHE_CHECK([for broken readdir],samba_cv_HAVE_BROKEN_READDIR,[ -AC_TRY_RUN([ -#include -#include -#include -main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); -if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && -di->d_name[0] == 0) exit(0); exit(1);} ], -samba_cv_HAVE_BROKEN_READDIR=yes,samba_cv_HAVE_BROKEN_READDIR=no,samba_cv_HAVE_BROKEN_READDIR=cross)]) -if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then - AC_DEFINE(HAVE_BROKEN_READDIR, 1, [Define if readdir() is broken]) -fi - -AC_CACHE_CHECK([for kernel oplock type definitions],samba_cv_HAVE_KERNEL_OPLOCKS,[ -AC_TRY_COMPILE([#include -#include ], -[oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;], -samba_cv_HAVE_KERNEL_OPLOCKS=yes,samba_cv_HAVE_KERNEL_OPLOCKS=no)]) -if test x"$samba_cv_HAVE_KERNEL_OPLOCKS" = x"yes"; then - AC_DEFINE(HAVE_KERNEL_OPLOCKS, 1, [Define to use kernel oplock capabilities]) -fi - -# -# Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h -# This is *really* broken but some systems (DEC OSF1) do this.... JRA. -# - -AC_CACHE_CHECK([for int16 typedef included by rpc/rpc.h],samba_cv_HAVE_INT16_FROM_RPC_RPC_H,[ -AC_TRY_COMPILE([#include -#if defined(HAVE_RPC_RPC_H) -#include -#endif], -[int16 testvar;], -samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes,samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no)]) -if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then - AC_DEFINE(HAVE_INT16_FROM_RPC_RPC_H, 1, [Define if rpc/rpc.h defines int16]) -fi - -AC_CACHE_CHECK([for uint16 typedef included by rpc/rpc.h],samba_cv_HAVE_UINT16_FROM_RPC_RPC_H,[ -AC_TRY_COMPILE([#include -#if defined(HAVE_RPC_RPC_H) -#include -#endif], -[uint16 testvar;], -samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes,samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no)]) -if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then - AC_DEFINE(HAVE_UINT16_FROM_RPC_RPC_H, 1, [Define if rpc/rpc.h defines uint16]) -fi - -AC_CACHE_CHECK([for int32 typedef included by rpc/rpc.h],samba_cv_HAVE_INT32_FROM_RPC_RPC_H,[ -AC_TRY_COMPILE([#include -#if defined(HAVE_RPC_RPC_H) -#include -#endif], -[int32 testvar;], -samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes,samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no)]) -if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then - AC_DEFINE(HAVE_INT32_FROM_RPC_RPC_H, 1, [Define if rpc/rpc.h defines int32]) -fi - -AC_CACHE_CHECK([for uint32 typedef included by rpc/rpc.h],samba_cv_HAVE_UINT32_FROM_RPC_RPC_H,[ -AC_TRY_COMPILE([#include -#if defined(HAVE_RPC_RPC_H) -#include -#endif], -[uint32 testvar;], -samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes,samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no)]) -if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then - AC_DEFINE(HAVE_UINT32_FROM_RPC_RPC_H, 1, [Define if rpc/rpc.h defines uint32]) -fi - -dnl -dnl Some systems (SCO) have a problem including -dnl and due to AUTH_ERROR being defined -dnl as a #define in and as part of an enum -dnl in . -dnl - -AC_CACHE_CHECK([for conflicting AUTH_ERROR define in rpc/rpc.h],samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT,[ -AC_TRY_COMPILE([#include -#ifdef HAVE_SYS_SECURITY_H -#include -#include -#endif /* HAVE_SYS_SECURITY_H */ -#if defined(HAVE_RPC_RPC_H) -#include -#endif], -[int testvar;], -samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no,samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes)]) -if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then - AC_DEFINE(HAVE_RPC_AUTH_ERROR_CONFLICT, 1, [Define if rpc/rpc.h defines AUTH_ERROR]) -fi - -netmask=no; -AC_CACHE_CHECK([for netmask ifconf],samba_cv_HAVE_NETMASK_IFCONF,[ -AC_TRY_RUN([ -#define HAVE_NETMASK_IFCONF 1 -#define AUTOCONF 1 -#include "confdefs.h" -#include "${srcdir-.}/lib/netmask.c"], - samba_cv_HAVE_NETMASK_IFCONF=yes,samba_cv_HAVE_NETMASK_IFCONF=no,samba_cv_HAVE_NETMASK_IFCONF=cross)]) -if test x"$samba_cv_HAVE_NETMASK_IFCONF" = x"yes"; then - netmask=yes;AC_DEFINE(HAVE_NETMASK_IFCONF, 1, [Define to use IFCONF style netmask]) -fi - -if test $netmask = no; then -AC_CACHE_CHECK([for netmask ifreq],samba_cv_HAVE_NETMASK_IFREQ,[ -AC_TRY_RUN([ -#define HAVE_NETMASK_IFREQ 1 -#define AUTOCONF 1 -#include "confdefs.h" -#include "${srcdir-.}/lib/netmask.c"], - samba_cv_HAVE_NETMASK_IFREQ=yes,samba_cv_HAVE_NETMASK_IFREQ=no,samba_cv_HAVE_NETMASK_IFREQ=cross)]) -if test x"$samba_cv_HAVE_NETMASK_IFREQ" = x"yes"; then - netmask=yes;AC_DEFINE(HAVE_NETMASK_IFREQ, 1, [Define to use IFREQ style netmask]) -fi -fi - -if test $netmask = no; then -AC_CACHE_CHECK([for netmask AIX],samba_cv_HAVE_NETMASK_AIX,[ -AC_TRY_RUN([ -#define HAVE_NETMASK_AIX 1 -#define AUTOCONF 1 -#include "confdefs.h" -#include "${srcdir-.}/lib/netmask.c"], - samba_cv_HAVE_NETMASK_AIX=yes,samba_cv_HAVE_NETMASK_AIX=no,samba_cv_HAVE_NETMASK_AIX=cross)]) -if test x"$samba_cv_HAVE_NETMASK_AIX" = x"yes"; then - netmask=yes;AC_DEFINE(HAVE_NETMASK_AIX, 1, [Define to use AIX style netmask]) -fi -fi - - -AC_CACHE_CHECK([for broken nisplus include files],samba_cv_BROKEN_NISPLUS_INCLUDE_FILES,[ -AC_TRY_COMPILE([#include -#if defined(HAVE_RPCSVC_NIS_H) -#include -#endif], -[return 0;], -samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no,samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes)]) -if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then - AC_DEFINE(BROKEN_NISPLUS_INCLUDE_FILES, 1, - [Define if sys/acl.h and rpcsvc/nis.h cannot be included together]) -fi - - -################################################# -# check for a LDAP password database -AC_MSG_CHECKING([whether to use LDAP password database]) -AC_ARG_WITH(ldap, -[ --with-ldap Include LDAP support - --without-ldap Don't include LDAP support (default)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_LDAP, 1, [Define to enable LDAP support]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -################################################# -# check for a NISPLUS password database -AC_MSG_CHECKING([whether to use NISPLUS password database]) -AC_ARG_WITH(nisplus, -[ --with-nisplus Include NISPLUS password database support - --without-nisplus Don't include NISPLUS password database support (default)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_NISPLUS, 1, [Define to enable NIS+ support]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -################################################# -# check for a NISPLUS_HOME support -AC_MSG_CHECKING([whether to use NISPLUS_HOME]) -AC_ARG_WITH(nisplus-home, -[ --with-nisplus-home Include NISPLUS_HOME support - --without-nisplus-home Don't include NISPLUS_HOME support (default)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_NISPLUS_HOME, 1, [Define to support NISPLUS_HOME variable]) - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -################################################# -# check for the secure socket layer -AC_MSG_CHECKING([whether to use SSL]) -AC_ARG_WITH(ssl, -[ --with-ssl Include SSL support - --without-ssl Don't include SSL support (default) - --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl)], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_SSL, 1, [Define to enable SSL support]) - withval="/usr/local/ssl" # default - - if test "${with_sslinc+set}" = set; then - - withval="$with_sslinc" - case "$withval" in - yes|no) - AC_MSG_WARN([--with-sslinc called without argument - will use default]) - CFLAGS="-I/usr/local/ssl/include $CFLAGS" - LIBS="-lssl -lcrypto $LIBS" - LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS" - ;; - * ) - CFLAGS="-I${withval}/include $CFLAGS" - LIBS="-lssl -l crypto $LIBS" - LDFLAGS="-L${withval}/lib $LDFLAGS" - ;; - esac - - else - - CFLAGS="-I/usr/local/ssl/include $CFLAGS" - LIBS="-lssl -lcrypto $LIBS" - LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS" - - fi - - if test ! -d ${withval}; then - AC_MSG_ERROR([called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config]) - fi - - CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS" # Damn, SSLeay defines its own - - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - -#################################################### -# get variables from parent process (main configure) -# set configuration directory location -if test -n "$SMBCONFIGDIR"; then - configdir="$SMBCONFIGDIR" -else - configdir="\$(LIBDIR)" -fi -# set codepage directory location -if test -n "$SMBCODEPAGEDIR"; then - codepagedir="$SMBCODEPAGEDIR" -elif test -n "$SMBCONFIGDIR"; then - codepagedir="$SMBCONFIGDIR/codepages" -else - codepagedir="\$(LIBDIR)/codepages" -fi -#################################################### - -AC_MSG_CHECKING([configure summary]) -AC_TRY_RUN([ -#include -#include -#include - -main() -{ -#if !(defined(HAVE_NETMASK_IFCONF) || defined(HAVE_NETMASK_IFREQ) || defined(HAVE_NETMASK_AIX)) - printf("WARNING: No automated netmask determination - use an interfaces line\n"); -#endif - -#if !((defined(HAVE_RANDOM) || defined(HAVE_RAND)) && (defined(HAVE_SRANDOM) || defined(HAVE_SRAND))) - printf("ERROR: No random or srandom routine!\n"); - exit(1); -#endif - - exit(0); -} -], - AC_MSG_RESULT(OK);, - AC_MSG_RESULT(failure) - AC_MSG_ERROR([Aborting config]),:) - -builddir=`pwd` -AC_SUBST(builddir) -AC_SUBST(configdir) -AC_SUBST(codepagedir) - -AC_OUTPUT([include/stamp-h Makefile]) diff --git a/src/vfs/smbfs/helpers/include/byteorder.h b/src/vfs/smbfs/helpers/include/byteorder.h deleted file mode 100644 index fd97ccb82..000000000 --- a/src/vfs/smbfs/helpers/include/byteorder.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - SMB Byte handling - */ - -#ifndef _BYTEORDER_H -#define _BYTEORDER_H - -/* - This file implements macros for machine independent short and - int manipulation - - Here is a description of this file that I emailed to the samba list once: - - > I am confused about the way that byteorder.h works in Samba. I have - > looked at it, and I would have thought that you might make a distinction - > between LE and BE machines, but you only seem to distinguish between 386 - > and all other architectures. - > - > Can you give me a clue? - - sure. - - The distinction between 386 and other architectures is only there as - an optimisation. You can take it out completely and it will make no - difference. The routines (macros) in byteorder.h are totally byteorder - independent. The 386 optimsation just takes advantage of the fact that - the x86 processors don't care about alignment, so we don't have to - align ints on int boundaries etc. If there are other processors out - there that aren't alignment sensitive then you could also define - CAREFUL_ALIGNMENT=0 on those processors as well. - - Ok, now to the macros themselves. I'll take a simple example, say we - want to extract a 2 byte integer from a SMB packet and put it into a - type called uint16 that is in the local machines byte order, and you - want to do it with only the assumption that uint16 is _at_least_ 16 - bits long (this last condition is very important for architectures - that don't have any int types that are 2 bytes long) - - You do this: - - #define CVAL(buf,pos) (((unsigned char *)(buf))[pos]) - #define PVAL(buf,pos) ((unsigned)CVAL(buf,pos)) - #define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8) - - then to extract a uint16 value at offset 25 in a buffer you do this: - - char *buffer = foo_bar(); - uint16 xx = SVAL(buffer,25); - - We are using the byteoder independence of the ANSI C bitshifts to do - the work. A good optimising compiler should turn this into efficient - code, especially if it happens to have the right byteorder :-) - - I know these macros can be made a bit tidier by removing some of the - casts, but you need to look at byteorder.h as a whole to see the - reasoning behind them. byteorder.h defines the following macros: - - SVAL(buf,pos) - extract a 2 byte SMB value - IVAL(buf,pos) - extract a 4 byte SMB value - SVALS(buf,pos) signed version of SVAL() - IVALS(buf,pos) signed version of IVAL() - - SSVAL(buf,pos,val) - put a 2 byte SMB value into a buffer - SIVAL(buf,pos,val) - put a 4 byte SMB value into a buffer - SSVALS(buf,pos,val) - signed version of SSVAL() - SIVALS(buf,pos,val) - signed version of SIVAL() - - RSVAL(buf,pos) - like SVAL() but for NMB byte ordering - RSVALS(buf,pos) - like SVALS() but for NMB byte ordering - RIVAL(buf,pos) - like IVAL() but for NMB byte ordering - RIVALS(buf,pos) - like IVALS() but for NMB byte ordering - RSSVAL(buf,pos,val) - like SSVAL() but for NMB ordering - RSIVAL(buf,pos,val) - like SIVAL() but for NMB ordering - RSIVALS(buf,pos,val) - like SIVALS() but for NMB ordering - - it also defines lots of intermediate macros, just ignore those :-) - - */ - -/* some switch macros that do both store and read to and from SMB buffers */ - -#define RW_PCVAL(read,inbuf,outbuf,len) \ - { if (read) { PCVAL (inbuf,0,outbuf,len); } \ - else { PSCVAL(inbuf,0,outbuf,len); } } - -#define RW_PIVAL(read,big_endian,inbuf,outbuf,len) \ - { if (read) { if (big_endian) { RPIVAL(inbuf,0,outbuf,len); } else { PIVAL(inbuf,0,outbuf,len); } } \ - else { if (big_endian) { RPSIVAL(inbuf,0,outbuf,len); } else { PSIVAL(inbuf,0,outbuf,len); } } } - -#define RW_PSVAL(read,big_endian,inbuf,outbuf,len) \ - { if (read) { if (big_endian) { RPSVAL(inbuf,0,outbuf,len); } else { PSVAL(inbuf,0,outbuf,len); } } \ - else { if (big_endian) { RPSSVAL(inbuf,0,outbuf,len); } else { PSSVAL(inbuf,0,outbuf,len); } } } - -#define RW_CVAL(read, inbuf, outbuf, offset) \ - { if (read) { (outbuf) = CVAL (inbuf,offset); } \ - else { SCVAL(inbuf,offset,outbuf); } } - -#define RW_IVAL(read, big_endian, inbuf, outbuf, offset) \ - { if (read) { (outbuf) = ((big_endian) ? RIVAL(inbuf,offset) : IVAL (inbuf,offset)); } \ - else { if (big_endian) { RSIVAL(inbuf,offset,outbuf); } else { SIVAL(inbuf,offset,outbuf); } } } - -#define RW_SVAL(read, big_endian, inbuf, outbuf, offset) \ - { if (read) { (outbuf) = ((big_endian) ? RSVAL(inbuf,offset) : SVAL (inbuf,offset)); } \ - else { if (big_endian) { RSSVAL(inbuf,offset,outbuf); } else { SSVAL(inbuf,offset,outbuf); } } } - -#undef CAREFUL_ALIGNMENT - -/* we know that the 386 can handle misalignment and has the "right" - byteorder */ -#ifdef __i386__ -#define CAREFUL_ALIGNMENT 0 -#endif - -#ifndef CAREFUL_ALIGNMENT -#define CAREFUL_ALIGNMENT 1 -#endif - -#define CVAL(buf,pos) (((unsigned char *)(buf))[pos]) -#define PVAL(buf,pos) ((unsigned)CVAL(buf,pos)) -#define SCVAL(buf,pos,val) (CVAL(buf,pos) = (val)) - - -#if CAREFUL_ALIGNMENT - -#define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8) -#define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16) -#define SSVALX(buf,pos,val) (CVAL(buf,pos)=(val)&0xFF,CVAL(buf,pos+1)=(val)>>8) -#define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16)) -#define SVALS(buf,pos) ((int16)SVAL(buf,pos)) -#define IVALS(buf,pos) ((int32)IVAL(buf,pos)) -#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16)(val))) -#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32)(val))) -#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val))) -#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val))) - -#else /* CAREFUL_ALIGNMENT */ - -/* this handles things for architectures like the 386 that can handle - alignment errors */ -/* - WARNING: This section is dependent on the length of int16 and int32 - being correct - */ - -/* get single value from an SMB buffer */ -#define SVAL(buf,pos) (*(uint16 *)((char *)(buf) + (pos))) -#define IVAL(buf,pos) (*(uint32 *)((char *)(buf) + (pos))) -#define SVALS(buf,pos) (*(int16 *)((char *)(buf) + (pos))) -#define IVALS(buf,pos) (*(int32 *)((char *)(buf) + (pos))) - -/* store single value in an SMB buffer */ -#define SSVAL(buf,pos,val) SVAL(buf,pos)=((uint16)(val)) -#define SIVAL(buf,pos,val) IVAL(buf,pos)=((uint32)(val)) -#define SSVALS(buf,pos,val) SVALS(buf,pos)=((int16)(val)) -#define SIVALS(buf,pos,val) IVALS(buf,pos)=((int32)(val)) - -#endif /* CAREFUL_ALIGNMENT */ - -/* macros for reading / writing arrays */ - -#define SMBMACRO(macro,buf,pos,val,len,size) \ -{ int l; for (l = 0; l < (len); l++) (val)[l] = macro((buf), (pos) + (size)*l); } - -#define SSMBMACRO(macro,buf,pos,val,len,size) \ -{ int l; for (l = 0; l < (len); l++) macro((buf), (pos) + (size)*l, (val)[l]); } - -/* reads multiple data from an SMB buffer */ -#define PCVAL(buf,pos,val,len) SMBMACRO(CVAL,buf,pos,val,len,1) -#define PSVAL(buf,pos,val,len) SMBMACRO(SVAL,buf,pos,val,len,2) -#define PIVAL(buf,pos,val,len) SMBMACRO(IVAL,buf,pos,val,len,4) -#define PCVALS(buf,pos,val,len) SMBMACRO(CVALS,buf,pos,val,len,1) -#define PSVALS(buf,pos,val,len) SMBMACRO(SVALS,buf,pos,val,len,2) -#define PIVALS(buf,pos,val,len) SMBMACRO(IVALS,buf,pos,val,len,4) - -/* stores multiple data in an SMB buffer */ -#define PSCVAL(buf,pos,val,len) SSMBMACRO(SCVAL,buf,pos,val,len,1) -#define PSSVAL(buf,pos,val,len) SSMBMACRO(SSVAL,buf,pos,val,len,2) -#define PSIVAL(buf,pos,val,len) SSMBMACRO(SIVAL,buf,pos,val,len,4) -#define PSCVALS(buf,pos,val,len) SSMBMACRO(SCVALS,buf,pos,val,len,1) -#define PSSVALS(buf,pos,val,len) SSMBMACRO(SSVALS,buf,pos,val,len,2) -#define PSIVALS(buf,pos,val,len) SSMBMACRO(SIVALS,buf,pos,val,len,4) - - -/* now the reverse routines - these are used in nmb packets (mostly) */ -#define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF)) -#define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16))) - -#define RSVAL(buf,pos) SREV(SVAL(buf,pos)) -#define RSVALS(buf,pos) SREV(SVALS(buf,pos)) -#define RIVAL(buf,pos) IREV(IVAL(buf,pos)) -#define RIVALS(buf,pos) IREV(IVALS(buf,pos)) -#define RSSVAL(buf,pos,val) SSVAL(buf,pos,SREV(val)) -#define RSSVALS(buf,pos,val) SSVALS(buf,pos,SREV(val)) -#define RSIVAL(buf,pos,val) SIVAL(buf,pos,IREV(val)) -#define RSIVALS(buf,pos,val) SIVALS(buf,pos,IREV(val)) - -/* reads multiple data from an SMB buffer (big-endian) */ -#define RPSVAL(buf,pos,val,len) SMBMACRO(RSVAL,buf,pos,val,len,2) -#define RPIVAL(buf,pos,val,len) SMBMACRO(RIVAL,buf,pos,val,len,4) -#define RPSVALS(buf,pos,val,len) SMBMACRO(RSVALS,buf,pos,val,len,2) -#define RPIVALS(buf,pos,val,len) SMBMACRO(RIVALS,buf,pos,val,len,4) - -/* stores multiple data in an SMB buffer (big-endian) */ -#define RPSSVAL(buf,pos,val,len) SSMBMACRO(RSSVAL,buf,pos,val,len,2) -#define RPSIVAL(buf,pos,val,len) SSMBMACRO(RSIVAL,buf,pos,val,len,4) -#define RPSSVALS(buf,pos,val,len) SSMBMACRO(RSSVALS,buf,pos,val,len,2) -#define RPSIVALS(buf,pos,val,len) SSMBMACRO(RSIVALS,buf,pos,val,len,4) - -#endif /* _BYTEORDER_H */ diff --git a/src/vfs/smbfs/helpers/include/charset.h b/src/vfs/smbfs/helpers/include/charset.h deleted file mode 100644 index 910dbcc56..000000000 --- a/src/vfs/smbfs/helpers/include/charset.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - Character set handling - */ - -#ifndef CHARSET_C - -extern char *dos_char_map; -extern char *upper_char_map; -extern char *lower_char_map; - -#ifdef toupper -#undef toupper -#endif - -#ifdef tolower -#undef tolower -#endif - -#ifdef isupper -#undef isupper -#endif - -#ifdef islower -#undef islower -#endif - -#ifdef isdoschar -#undef isdoschar -#endif - -#ifdef isspace -#undef isspace -#endif - -#define toupper(c) (upper_char_map[(c&0xff)] & 0xff) -#define tolower(c) (lower_char_map[(c&0xff)] & 0xff) -#define isupper(c) ((c&0xff) != tolower(c&0xff)) -#define islower(c) ((c&0xff) != toupper(c&0xff)) -#define isdoschar(c) (dos_char_map[(c&0xff)] != 0) -#define isspace(c) ((c)==' ' || (c) == '\t') - -/* this is used to determine if a character is safe to use in - something that may be put on a command line */ -#define issafe(c) (isalnum((c&0xff)) || strchr("-._",c)) -#endif /* !CHARSET_C */ - -/* Dynamic codepage files defines. */ - -/* Version id for dynamically loadable codepage files. */ -#define CODEPAGE_FILE_VERSION_ID 0x1 -/* Version 1 codepage file header size. */ -#define CODEPAGE_HEADER_SIZE 8 -/* Offsets for codepage file header entries. */ -#define CODEPAGE_VERSION_OFFSET 0 -#define CODEPAGE_CLIENT_CODEPAGE_OFFSET 2 -#define CODEPAGE_LENGTH_OFFSET 4 diff --git a/src/vfs/smbfs/helpers/include/client.h b/src/vfs/smbfs/helpers/include/client.h deleted file mode 100644 index 35a708125..000000000 --- a/src/vfs/smbfs/helpers/include/client.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - SMB parameters and setup - */ - -#ifndef _CLIENT_H -#define _CLIENT_H - -/* the client asks for a smaller buffer to save ram and also to get more - overlap on the wire. This size gives us a nice read/write size, which - will be a multiple of the page size on almost any system */ -#define CLI_BUFFER_SIZE (0xFFFF) - -/* - * These definitions depend on smb.h - */ - -typedef struct file_info -{ - SMB_OFF_T size; - uint16 mode; - uid_t uid; - gid_t gid; - /* these times are normally kept in GMT */ - time_t mtime; - time_t atime; - time_t ctime; - pstring name; -} file_info; - -struct print_job_info -{ - uint16 id; - uint16 priority; - size_t size; - fstring user; - fstring name; - time_t t; -}; - -struct pwd_info -{ - BOOL null_pwd; - BOOL cleartext; - BOOL crypted; - - fstring password; - - uchar smb_lm_pwd[16]; - uchar smb_nt_pwd[16]; - - uchar smb_lm_owf[24]; - uchar smb_nt_owf[24]; -}; - -struct cli_state -{ - int port; - int fd; - uint16 cnum; - uint16 pid; - uint16 mid; - uint16 vuid; - int protocol; - int sec_mode; - int rap_error; - int privileges; - - fstring eff_name; - fstring desthost; - fstring user_name; - fstring domain; - - /* - * The following strings are the - * ones returned by the server if - * the protocol > NT1. - */ - fstring server_type; - fstring server_os; - fstring server_domain; - - fstring share; - fstring dev; - struct nmb_name called; - struct nmb_name calling; - fstring full_dest_host_name; - struct in_addr dest_ip; - - struct pwd_info pwd; - unsigned char cryptkey[8]; - uint32 sesskey; - int serverzone; - uint32 servertime; - int readbraw_supported; - int writebraw_supported; - int timeout; /* in milliseconds. */ - int max_xmit; - int max_mux; - char *outbuf; - char *inbuf; - int bufsize; - int initialised; - int win95; - uint32 capabilities; - - /* - * Only used in NT domain calls. - */ - - uint32 nt_error; /* NT RPC error code. */ - uint16 nt_pipe_fnum; /* Pipe handle. */ - unsigned char sess_key[16]; /* Current session key. */ - unsigned char ntlmssp_hash[258]; /* ntlmssp data. */ - uint32 ntlmssp_cli_flgs; /* ntlmssp client flags */ - uint32 ntlmssp_srv_flgs; /* ntlmssp server flags */ - uint32 ntlmssp_seq_num; /* ntlmssp sequence number */ - DOM_CRED clnt_cred; /* Client credential. */ - fstring mach_acct; /* MYNAME$. */ - fstring srv_name_slash; /* \\remote server. */ - fstring clnt_name_slash; /* \\local client. */ - uint16 max_xmit_frag; - uint16 max_recv_frag; -}; - -#endif /* _CLIENT_H */ diff --git a/src/vfs/smbfs/helpers/include/includes.h b/src/vfs/smbfs/helpers/include/includes.h deleted file mode 100644 index 8d481ad1d..000000000 --- a/src/vfs/smbfs/helpers/include/includes.h +++ /dev/null @@ -1,582 +0,0 @@ -#ifndef _INCLUDES_H -#define _INCLUDES_H -/* - Unix SMB/Netbios implementation. - Version 1.9. - Machine customisation and include handling - */ - -#ifndef NO_CONFIG_H /* for some tests */ -#include "config.h" -#endif - -#include "local.h" - -#ifdef AIX -#define DEFAULT_PRINTING PRINT_AIX -#define PRINTCAP_NAME "/etc/qconfig" -#endif - -#ifdef HPUX -#define DEFAULT_PRINTING PRINT_HPUX -#endif - -#ifdef QNX -#define DEFAULT_PRINTING PRINT_QNX -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -#ifdef HAVE_SYS_SYSCALL_H -#include -#elif HAVE_SYSCALL_H -#include -#endif - -#ifdef HAVE_STRING_H -#include -#endif - -#ifdef HAVE_STRINGS_H -#include -#endif - -#ifdef HAVE_MEMORY_H -#include -#endif - -#ifdef MEM_MAN -#include "../mem_man/mem_man.h" -#else -#ifdef HAVE_MALLOC_H -#include -#endif -#endif - -#ifdef HAVE_LIMITS_H -#include -#endif - -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - -#ifdef HAVE_SYS_FILIO_H -#include -#endif - - -#ifdef HAVE_CTYPE_H -#include -#endif -#include -#ifdef HAVE_SYS_ID_H -#include -#endif - -/* AIX 4.1 and previous needs this for setpriv */ -#if defined(HAVE_SETPRIV) && defined(HAVE_SYS_PRIV_H) -#include -#endif - -#include - -#ifdef HAVE_UTIME_H -#include -#endif - -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#ifdef HAVE_SYS_MODE_H -/* apparently AIX needs this for S_ISLNK */ -#ifndef S_ISLNK -#include -#endif -#endif - -#ifdef HAVE_GLOB_H -#include -#endif - -#include - -#ifdef HAVE_STDARG_H -#include -#else -#include -#endif - -#include -#include -#include -#include -#include - -#ifdef HAVE_NETINET_TCP_H -#include -#endif - -/* - * The next two defines are needed to the IPTOS_* options - * on some systems. - */ - -#ifdef HAVE_NETINET_IN_SYSTM_H -#include -#endif - -#ifdef HAVE_NETINET_IN_IP_H -#include -#endif - -/* POSIX terminal handling. */ -#include - -#include - -#ifdef HAVE_SYS_MMAN_H -#include -#endif - -#ifdef HAVE_SYSV_IPC -#include -#include -#include -#endif - -#ifdef HAVE_NET_IF_H -#include -#endif - - -#ifdef HAVE_SYS_MOUNT_H -#include -#endif - -#ifdef HAVE_SYS_VFS_H -#include -#endif - -#ifdef HAVE_SYS_ACL_H -#include -#endif - -#ifdef HAVE_SYS_FS_S5PARAM_H -#include -#endif - -#if defined (HAVE_SYS_FILSYS_H) && !defined (_CRAY) -#include -#endif - -#ifdef HAVE_SYS_STATFS_H -#include -#endif - -#ifdef HAVE_DUSTAT_H -#include -#endif - -#ifdef HAVE_SYS_STATVFS_H -#include -#endif - -#ifdef HAVE_SHADOW_H -#include -#endif - -#ifdef HAVE_GETPWANAM -#include -#include -#include -#endif - -#ifdef HAVE_SYS_SECURITY_H -#include -#include -#define PASSWORD_LENGTH 16 -#endif /* HAVE_SYS_SECURITY_H */ - -#ifdef HAVE_COMPAT_H -#include -#endif - -#ifdef HAVE_STROPTS_H -#include -#endif - -#ifdef HAVE_POLL_H -#include -#endif - -#if defined(HAVE_RPC_RPC_H) -/* - * Check for AUTH_ERROR define conflict with rpc/rpc.h in prot.h. - */ -#if defined(HAVE_SYS_SECURITY_H) && defined(HAVE_RPC_AUTH_ERROR_CONFLICT) -#undef AUTH_ERROR -#endif -#include -#endif - -#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined(HAVE_SETNETGRENT) && defined(HAVE_ENDNETGRENT) && defined(HAVE_GETNETGRENT) -#define HAVE_NETGROUP 1 -#endif - -#if defined (HAVE_NETGROUP) -#if defined(HAVE_RPCSVC_YP_PROT_H) -#include -#endif -#if defined(HAVE_RPCSVC_YPCLNT_H) -#include -#endif -#endif /* HAVE_NETGROUP */ - -#ifndef uchar -#define uchar unsigned char -#endif - -#define schar signed char - -/* - Samba needs type definitions for int16, int32, uint16 and uint32. - - Normally these are signed and unsigned 16 and 32 bit integers, but - they actually only need to be at least 16 and 32 bits - respectively. Thus if your word size is 8 bytes just defining them - as signed and unsigned int will work. - */ - -#ifndef uint8 -#define uint8 unsigned char -#endif - -#if !defined(int16) && !defined(HAVE_INT16_FROM_RPC_RPC_H) -#if (SIZEOF_SHORT == 4) -#define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16; -#else /* SIZEOF_SHORT != 4 */ -#define int16 short -#endif /* SIZEOF_SHORT != 4 */ -#endif - -/* - * Note we duplicate the size tests in the unsigned - * case as int16 may be a typedef from rpc/rpc.h - */ - -#if !defined(uint16) && !defined(HAVE_UINT16_FROM_RPC_RPC_H) -#if (SIZEOF_SHORT == 4) -#define uint16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16; -#else /* SIZEOF_SHORT != 4 */ -#define uint16 unsigned short -#endif /* SIZEOF_SHORT != 4 */ -#endif - -#if !defined(int32) && !defined(HAVE_INT32_FROM_RPC_RPC_H) -#if (SIZEOF_INT == 4) -#define int32 int -#elif (SIZEOF_LONG == 4) -#define int32 long -#elif (SIZEOF_SHORT == 4) -#define int32 short -#endif -#endif - -/* - * Note we duplicate the size tests in the unsigned - * case as int32 may be a typedef from rpc/rpc.h - */ - -#if !defined(uint32) && !defined(HAVE_UINT32_FROM_RPC_RPC_H) -#if (SIZEOF_INT == 4) -#define uint32 unsigned int -#elif (SIZEOF_LONG == 4) -#define uint32 unsigned long -#elif (SIZEOF_SHORT == 4) -#define uint32 unsigned short -#endif -#endif - -/* - * Types for devices, inodes and offsets. - */ - -#ifndef SMB_DEV_T -#define SMB_DEV_T dev_t -#endif - -/* - * Setup the correctly sized inode type. - */ - -#ifndef SMB_INO_T -#define SMB_INO_T ino_t -#endif - -#ifndef LARGE_SMB_INO_T -#if defined(SIZEOF_INO_T) && (SIZEOF_INO_T == 8) -#define LARGE_SMB_INO_T 1 -#endif -#endif - -#ifdef LARGE_SMB_INO_T -#define SINO_T(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) -#else -#define SINO_T(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) -#endif - -#ifndef SMB_OFF_T -#define SMB_OFF_T off_t -#endif - -#define SMB_OFF_T_BITS (sizeof(SMB_OFF_T)*8) - -/* - * Set the define that tells us if we can do 64 bit - * NT SMB calls. - */ - -#ifndef LARGE_SMB_OFF_T -#if defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8) -#define LARGE_SMB_OFF_T 1 -#endif -#endif - -#ifdef LARGE_SMB_OFF_T -#define SOFF_T(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) -#else -#define SOFF_T(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) -#endif - -/* - * Type for stat structure. - */ - -#ifndef SMB_STRUCT_STAT -#define SMB_STRUCT_STAT struct stat -#endif - -/* - * Type for dirent structure. - */ - -#ifndef SMB_STRUCT_DIRENT -#define SMB_STRUCT_DIRENT struct dirent -#endif - -/* - * Defines for 64 bit fcntl locks. - */ - -#ifndef SMB_STRUCT_FLOCK -#define SMB_STRUCT_FLOCK struct flock -#endif - -#ifndef SMB_F_SETLKW -#define SMB_F_SETLKW F_SETLKW -#endif - -#ifndef SMB_F_SETLK -#define SMB_F_SETLK F_SETLK -#endif - -#ifndef SMB_F_GETLK -#define SMB_F_GETLK F_GETLK -#endif - -#if defined(HAVE_LONGLONG) -#define SMB_BIG_UINT unsigned long long -#define SMB_BIG_INT long long -#define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) -#else -#define SMB_BIG_UINT unsigned long -#define SMB_BIG_INT long -#define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) -#endif - -#ifndef MIN -#define MIN(a,b) ((a)<(b)?(a):(b)) -#endif - -#ifndef MAX -#define MAX(a,b) ((a)>(b)?(a):(b)) -#endif - -#ifdef HAVE_BROKEN_GETGROUPS -#define GID_T int -#else -#define GID_T gid_t -#endif - - -#include "version.h" -#include "smb.h" -#include "nameserv.h" - -#include "byteorder.h" - -#include "kanji.h" -#include "charset.h" - -#include "nterr.h" - -#ifndef MAXCODEPAGELINES -#define MAXCODEPAGELINES 256 -#endif - -/***** automatically generated prototypes *****/ -#include "proto.h" - -#ifdef sprintf -#undef sprintf -#endif /* sprintf */ -#define sprintf __ERROR__XX__NEVER_USE_SPRINTF__; - -#define pstrcpy(d,s) safe_strcpy((d),(s),sizeof(pstring)-1) -#define pstrcat(d,s) safe_strcat((d),(s),sizeof(pstring)-1) -#define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1) -#define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1) - -#ifdef __COMPAR_FN_T -#define QSORT_CAST (__compar_fn_t) -#endif - -#ifndef QSORT_CAST -#define QSORT_CAST (int (*)(const void *, const void *)) -#endif - -/* this guess needs to be improved (tridge) */ -#if (defined(STAT_STATVFS) || defined(STAT_STATVFS64)) && !defined(SYSV) -#define SYSV 1 -#endif - -#ifndef DEFAULT_PRINTING -#ifdef SYSV -#define DEFAULT_PRINTING PRINT_SYSV -#define PRINTCAP_NAME "lpstat" -#else -#define DEFAULT_PRINTING PRINT_BSD -#define PRINTCAP_NAME "/etc/printcap" -#endif -#endif - -#ifndef PRINTCAP_NAME -#define PRINTCAP_NAME "/etc/printcap" -#endif - -#ifndef SIGCLD -#define SIGCLD SIGCHLD -#endif - -#if (defined(HAVE_SYSV_IPC) || defined(HAVE_SHARED_MMAP)) -#define FAST_SHARE_MODES 1 -#endif - -#ifndef MAP_FILE -#define MAP_FILE 0 -#endif - -#if (!defined(WITH_NISPLUS) && !defined(WITH_LDAP)) -#define USE_SMBPASS_DB 1 -#endif - -#if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS) -#define OSF1_ENH_SEC 1 -#endif - -#ifndef ALLOW_CHANGE_PASSWORD -#if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID)) -#define ALLOW_CHANGE_PASSWORD 1 -#endif -#endif - -/* what is the longest significant password available on your system? - Knowing this speeds up password searches a lot */ -#ifndef PASSWORD_LENGTH -#define PASSWORD_LENGTH 8 -#endif - -#ifndef HAVE_PIPE -#define SYNC_DNS 1 -#endif - -#ifndef MAXPATHLEN -#define MAXPATHLEN 256 -#endif - -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - -#ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK 0x7f000001 -#endif - -#ifndef INADDR_NONE -#define INADDR_NONE 0xffffffff -#endif - -#ifndef O_ACCMODE -#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) -#endif - -#if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID) -#define ULTRIX_AUTH 1 -#endif - -#ifndef HAVE_INITGROUPS -int initgroups (char *name, gid_t id); -#endif - -#ifndef HAVE_RENAME -int rename (const char *zfrom, const char *zto); -#endif - -#ifndef HAVE_MKTIME -time_t mktime (struct tm *t); -#endif - -#ifndef HAVE_STRTOUL -unsigned long strtoul (const char *nptr, char **endptr, int base); -#endif - -#ifdef REPLACE_GETPASS -#define getpass(prompt) getsmbpass((prompt)) -#endif - -/* - * Some older systems seem not to have MAXHOSTNAMELEN - * defined. - */ -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 254 -#endif - -/* yuck, I'd like a better way of doing this */ -#define DIRP_SIZE (256 + 32) - -#endif /* _INCLUDES_H */ diff --git a/src/vfs/smbfs/helpers/include/kanji.h b/src/vfs/smbfs/helpers/include/kanji.h deleted file mode 100644 index 536f69300..000000000 --- a/src/vfs/smbfs/helpers/include/kanji.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - Kanji Extensions - */ -#ifndef _KANJI_H_ -#define _KANJI_H_ - -/* FOR SHIFT JIS CODE */ -#define is_shift_jis(c) \ - ((0x81 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0x9f) \ - || (0xe0 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xef)) -#define is_shift_jis2(c) \ - (0x40 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfc \ - && ((unsigned char) (c)) != 0x7f) -#define is_kana(c) ((0xa0 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xdf)) - -/* case conversion */ -#define is_sj_upper2(c) \ - ((0x60 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x79)) -#define is_sj_lower2(c) \ - ((0x81 <= (unsigned char) (c)) && ((unsigned char) (c) <= 0x9A)) -#define sjis_alph 0x82 -#define is_sj_alph(c) (sjis_alph == (unsigned char) (c)) -#define is_sj_upper(c1, c2) (is_sj_alph (c1) && is_sj_upper2 (c2)) -#define is_sj_lower(c1, c2) (is_sj_alph (c1) && is_sj_lower2 (c2)) -#define sj_toupper2(c) \ - (is_sj_lower2 (c) ? ((int) ((unsigned char) (c) - 0x81 + 0x60)) : \ - ((int) (unsigned char) (c))) -#define sj_tolower2(c) \ - (is_sj_upper2 (c) ? ((int) ((unsigned char) (c) - 0x60 + 0x81)) : \ - ((int) (unsigned char) (c))) - -#ifdef _KANJI_C_ -/* FOR EUC CODE */ -#define euc_kana (0x8e) -#define is_euc_kana(c) (((unsigned char) (c)) == euc_kana) -#define is_euc(c) (0xa0 < ((unsigned char) (c)) && ((unsigned char) (c)) < 0xff) - -/* FOR JIS CODE */ -/* default jis third shift code, use for output */ -#ifndef JIS_KSO -#define JIS_KSO 'B' -#endif -#ifndef JIS_KSI -#define JIS_KSI 'J' -#endif -/* in: \E$B or \E$@ */ -/* out: \E(J or \E(B or \E(H */ -#define jis_esc (0x1b) -#define jis_so (0x0e) -#define jis_so1 ('$') -#define jis_so2 ('B') -#define jis_si (0x0f) -#define jis_si1 ('(') -#define jis_si2 ('J') -#define is_esc(c) (((unsigned char) (c)) == jis_esc) -#define is_so1(c) (((unsigned char) (c)) == jis_so1) -#define is_so2(c) (((unsigned char) (c)) == jis_so2 || ((unsigned char) (c)) == '@') -#define is_si1(c) (((unsigned char) (c)) == jis_si1) -#define is_si2(c) (((unsigned char) (c)) == jis_si2 || ((unsigned char) (c)) == 'B' \ - || ((unsigned char) (c)) == 'H') -#define is_so(c) (((unsigned char) (c)) == jis_so) -#define is_si(c) (((unsigned char) (c)) == jis_si) -#define junet_kana1 ('(') -#define junet_kana2 ('I') -#define is_juk1(c) (((unsigned char) (c)) == junet_kana1) -#define is_juk2(c) (((unsigned char) (c)) == junet_kana2) - -#define _KJ_ROMAN (0) -#define _KJ_KANJI (1) -#define _KJ_KANA (2) - -/* FOR HEX */ -#define HEXTAG ':' -#define hex2bin(x) \ - ( ((int) '0' <= ((int) (x)) && ((int) (x)) <= (int)'9')? \ - (((int) (x))-(int)'0'): \ - ((int) 'a'<= ((int) (x)) && ((int) (x))<= (int) 'f')? \ - (((int) (x)) - (int)'a'+10): \ - (((int) (x)) - (int)'A'+10) ) -#define bin2hex(x) \ - ( (((int) (x)) >= 10)? (((int) (x))-10 + (int) 'a'): (((int) (x)) + (int) '0') ) - -/* For Hangul (Korean - code page 949). */ -#define is_hangul(c) ((0x81 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfd)) - -/* For traditional Chinese (known as Big5 encoding - code page 950). */ -#define is_big5_c1(c) ((0xa1 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xf9)) - -/* For simplified Chinese (code page - 936). */ -#define is_simpch_c1(c) ((0xa1 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xf7)) - -#else /* not _KANJI_C_ */ - -/* - * The following is needed for AIX systems that have - * their own #defines for strchr, strrchr, strstr - * and strtok. - */ - -#ifdef strchr -#undef strchr -#endif /* strchr */ - -#ifdef strrchr -#undef strrchr -#endif /* strrchr */ - -#ifdef strstr -#undef strstr -#endif /* strstr */ - -#ifdef strtok -#undef strtok -#endif /* strtok */ - -/* Ensure we use our definitions in all other files than kanji.c. */ - -/* Function pointers we will replace. */ -extern char *(*multibyte_strchr) (const char *s, int c); -extern char *(*multibyte_strrchr) (const char *s, int c); -extern char *(*multibyte_strstr) (const char *s1, const char *s2); -extern char *(*multibyte_strtok) (char *s1, const char *s2); -extern char *(*_dos_to_unix) (char *str, BOOL overwrite); -extern char *(*_unix_to_dos) (char *str, BOOL overwrite); -extern BOOL (*is_multibyte_char) (char c); -extern int (*_skip_multibyte_char) (char c); - -#define strchr(s1, c) ((*multibyte_strchr)((s1), (c))) -#define strrchr(s1, c) ((*multibyte_strrchr)((s1), (c))) -#define strstr(s1, s2) ((*multibyte_strstr)((s1), (s2))) -#define strtok(s1, s2) ((*multibyte_strtok)((s1), (s2))) -#define dos_to_unix(x,y) ((*_dos_to_unix)((x), (y))) -#define unix_to_dos(x,y) ((*_unix_to_dos)((x), (y))) -#define skip_multibyte_char(c) ((*_skip_multibyte_char)((c))) - -#endif /* _KANJI_C_ */ - -#define UNKNOWN_CODE (-1) -#define SJIS_CODE (0) -#define EUC_CODE (1) -#define JIS7_CODE (2) -#define JIS8_CODE (3) -#define JUNET_CODE (4) -#define HEX_CODE (5) -#define CAP_CODE (6) -#define DOSV_CODE SJIS_CODE - -#endif /* _KANJI_H_ */ diff --git a/src/vfs/smbfs/helpers/include/local.h b/src/vfs/smbfs/helpers/include/local.h deleted file mode 100644 index f55d8c142..000000000 --- a/src/vfs/smbfs/helpers/include/local.h +++ /dev/null @@ -1,198 +0,0 @@ -/* Copyright (C) 1995-1998 Samba-Team */ -/* Copyright (C) 1998 John H Terpstra */ - -/* local definitions for file server */ -#ifndef _LOCAL_H -#define _LOCAL_H - -/* The default workgroup - usually overridden in smb.conf */ -#ifndef WORKGROUP -#define WORKGROUP "WORKGROUP" -#endif - -/* This defines the section name in the configuration file that will contain */ -/* global parameters - that is, parameters relating to the whole server, not */ -/* just services. This name is then reserved, and may not be used as a */ -/* a service name. It will default to "global" if not defined here. */ -#define GLOBAL_NAME "global" -#define GLOBAL_NAME2 "globals" - -/* This defines the section name in the configuration file that will - refer to the special "homes" service */ -#define HOMES_NAME "homes" - -/* This defines the section name in the configuration file that will - refer to the special "printers" service */ -#define PRINTERS_NAME "printers" - -/* Yves Gaige requested this set this */ -/* to a maximum of 8 if old smb clients break because of long printer names. */ -#define MAXPRINTERLEN 15 - -/* max number of directories open at once */ -/* note that with the new directory code this no longer requires a - file handle per directory, but large numbers do use more memory */ -#define MAX_OPEN_DIRECTORIES 256 - -/* max number of directory handles */ -/* As this now uses the bitmap code this can be - quite large. */ -#define MAX_DIRECTORY_HANDLES 2048 - -/* define what facility to use for syslog */ -#ifndef SYSLOG_FACILITY -#define SYSLOG_FACILITY LOG_DAEMON -#endif - -/* Default size of shared memory used for share mode locking */ -#ifndef SHMEM_SIZE -#define SHMEM_SIZE (1024*1024) -#endif - -/* - * Default number of maximum open files per smbd. This is - * also limited by the maximum available file descriptors - * per process and can also be set in smb.conf as "max open files" - * in the [global] section. - */ - -#ifndef MAX_OPEN_FILES -#define MAX_OPEN_FILES 10000 -#endif - -/* the max number of simultanous connections to the server by all clients */ -#define MAXSTATUS 100000 - -#define WORDMAX 0xFFFF - -/* the maximum password length before we declare a likely attack */ -#define MAX_PASS_LEN 200 - -/* separators for lists */ -#define LIST_SEP " \t,;:\n\r" - -/* this is where browse lists are kept in the lock dir */ -#define SERVER_LIST "browse.dat" - -/* shall guest entries in printer queues get changed to user entries, - so they can be deleted using the windows print manager? */ -#define LPQ_GUEST_TO_USER - -/* shall filenames with illegal chars in them get mangled in long - filename listings? */ -#define MANGLE_LONG_FILENAMES - -/* define this if you want to stop spoofing with .. and soft links - NOTE: This also slows down the server considerably */ -#define REDUCE_PATHS - -/* the size of the directory cache */ -#define DIRCACHESIZE 20 - -/* what default type of filesystem do we want this to show up as in a - NT file manager window? */ -#define FSTYPE_STRING "NTFS" - -/* the default guest account - normally set in the Makefile or smb.conf */ -#ifndef GUEST_ACCOUNT -#define GUEST_ACCOUNT "nobody" -#endif - -/* do you want smbd to send a 1 byte packet to nmbd to trigger it to start - when smbd starts? */ -#ifndef PRIME_NMBD -#define PRIME_NMBD 1 -#endif - -/* the default pager to use for the client "more" command. Users can - override this with the PAGER environment variable */ -#ifndef PAGER -#define PAGER "more" -#endif - -/* the size of the uid cache used to reduce valid user checks */ -#define UID_CACHE_SIZE 4 - -/* if mmap is enabled, then this is the maximum size of file to use - the mmap code on. We don't want to mmap huge files as virtual - address spaces are limited */ -#define MAX_MMAP_SIZE (100*0x100000) - -/* the following control timings of various actions. Don't change - them unless you know what you are doing. These are all in seconds */ -#define DEFAULT_SMBD_TIMEOUT (60*60*24*7) -#define SMBD_RELOAD_CHECK (180) -#define IDLE_CLOSED_TIMEOUT (60) -#define DPTR_IDLE_TIMEOUT (120) -#define SMBD_SELECT_TIMEOUT (60) -#define SMBD_SELECT_TIMEOUT_WITH_PENDING_LOCKS (10) -#define NMBD_SELECT_LOOP (10) -#define BROWSE_INTERVAL (60) -#define REGISTRATION_INTERVAL (10*60) -#define NMBD_INETD_TIMEOUT (120) -#define NMBD_MAX_TTL (24*60*60) -#define LPQ_LOCK_TIMEOUT (5) - -/* the following are in milliseconds */ -#define LOCK_RETRY_TIMEOUT (100) - -/* do you want to dump core (carefully!) when an internal error is - encountered? Samba will be careful to make the core file only - accessible to root */ -#define DUMP_CORE 1 - -#define SMB_ALIGNMENT 1 - - -/* shall we support browse requests via a FIFO to nmbd? */ -#define ENABLE_FIFO 1 - -/* how long (in miliseconds) to wait for a socket connect to happen */ -#define LONG_CONNECT_TIMEOUT 30000 -#define SHORT_CONNECT_TIMEOUT 5000 - -/* default socket options. Dave Miller thinks we should default to TCP_NODELAY - given the socket IO pattern that Samba uses */ -#ifdef TCP_NODELAY -#define DEFAULT_SOCKET_OPTIONS "TCP_NODELAY" -#else -#define DEFAULT_SOCKET_OPTIONS "" -#endif - -/* 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. */ - -#define OPLOCK_BREAK_TIMEOUT 30 - -/* how many times do we try to resend the oplock break request - useful - for buggy MS clients */ -#define OPLOCK_BREAK_RESENDS 3 - -/* Timout (in seconds) to add to the oplock break timeout - to wait for the smbd to smbd message to return. */ - -#define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2 - -/* the read preciction code has been disabled until some problems with - it are worked out */ -#define USE_READ_PREDICTION 0 - -/* name of directory that netatalk uses to store macintosh resource forks */ -#define APPLEDOUBLE ".AppleDouble/" - -/* - * Default passwd chat script. - */ - -#define DEFAULT_PASSWD_CHAT "*old*password* %o\\n *new*password* %n\\n *new*password* %n\\n *changed*" - -/* Minimum length of allowed password when changing UNIX password. */ -#define MINPASSWDLENGTH 5 - -#endif diff --git a/src/vfs/smbfs/helpers/include/nameserv.h b/src/vfs/smbfs/helpers/include/nameserv.h deleted file mode 100644 index e9147851c..000000000 --- a/src/vfs/smbfs/helpers/include/nameserv.h +++ /dev/null @@ -1,506 +0,0 @@ -#ifndef _NAMESERV_H_ -#define _NAMESERV_H_ -/* - Unix SMB/Netbios implementation. - Version 1.9. - NBT netbios header - version 2 - */ - -#define PERMANENT_TTL 0 - -/* NTAS uses 2, NT uses 1, WfWg uses 0 */ -#define MAINTAIN_LIST 2 -#define ELECTION_VERSION 1 - -#define MAX_DGRAM_SIZE (576) /* tcp/ip datagram limit is 576 bytes */ -#define MIN_DGRAM_SIZE 12 - -/********************************************************* - Types of reply packet. -**********************************************************/ - -enum netbios_reply_type_code -{ NMB_QUERY, NMB_STATUS, NMB_REG, NMB_REG_REFRESH, - NMB_REL, NMB_WAIT_ACK, NMB_MULTIHOMED_REG, - WINS_REG, WINS_QUERY -}; - -/* From rfc1002, 4.2.1.2 */ -/* Question types. */ -#define QUESTION_TYPE_NB_QUERY 0x20 -#define QUESTION_TYPE_NB_STATUS 0x21 - -/* Question class */ -#define QUESTION_CLASS_IN 0x1 - -/* Opcode definitions */ -#define NMB_NAME_QUERY_OPCODE 0x0 -#define NMB_NAME_REG_OPCODE 0x05 /* see rfc1002.txt 4.2.2,3,5,6,7,8 */ -#define NMB_NAME_RELEASE_OPCODE 0x06 /* see rfc1002.txt 4.2.9,10,11 */ -#define NMB_WACK_OPCODE 0x07 /* see rfc1002.txt 4.2.16 */ -/* Ambiguity in rfc1002 about which of these is correct. */ -/* WinNT uses 8 by default but can be made to use 9. */ -#define NMB_NAME_REFRESH_OPCODE_8 0x08 /* see rfc1002.txt 4.2.4 */ -#define NMB_NAME_REFRESH_OPCODE_9 0x09 /* see rfc1002.txt 4.2.4 */ -#define NMB_NAME_MULTIHOMED_REG_OPCODE 0x0F /* Invented by Microsoft. */ - -/* XXXX what about all the other types?? 0x1, 0x2, 0x3, 0x4, 0x8? */ - -/* Resource record types. rfc1002 4.2.1.3 */ -#define RR_TYPE_A 0x1 -#define RR_TYPE_NS 0x2 -#define RR_TYPE_NULL 0xA -#define RR_TYPE_NB 0x20 -#define RR_TYPE_NBSTAT 0x21 - -/* Resource record class. */ -#define RR_CLASS_IN 0x1 - -/* NetBIOS flags */ -#define NB_GROUP 0x80 -#define NB_PERM 0x02 -#define NB_ACTIVE 0x04 -#define NB_CONFL 0x08 -#define NB_DEREG 0x10 -#define NB_BFLAG 0x00 /* Broadcast node type. */ -#define NB_PFLAG 0x20 /* Point-to-point node type. */ -#define NB_MFLAG 0x40 /* Mixed bcast & p-p node type. */ -#define NB_HFLAG 0x60 /* Microsoft 'hybrid' node type. */ -#define NB_NODETYPEMASK 0x60 -/* Mask applied to outgoing NetBIOS flags. */ -#define NB_FLGMSK 0xE0 - -/* NetBIOS flag identifier. */ -#define NAME_GROUP(p) ((p)->data.nb_flags & NB_GROUP) -#define NAME_BFLAG(p) (((p)->data.nb_flags & NB_NODETYPEMASK) == NB_BFLAG) -#define NAME_PFLAG(p) (((p)->data.nb_flags & NB_NODETYPEMASK) == NB_PFLAG) -#define NAME_MFLAG(p) (((p)->data.nb_flags & NB_NODETYPEMASK) == NB_MFLAG) -#define NAME_HFLAG(p) (((p)->data.nb_flags & NB_NODETYPEMASK) == NB_HFLAG) - -/* Samba name state for a name in a namelist. */ -#define NAME_IS_ACTIVE(p) ((p)->data.nb_flags & NB_ACTIVE) -#define NAME_IN_CONFLICT(p) ((p)->data.nb_flags & NB_CONFL) -#define NAME_IS_DEREGISTERING(p) ((p)->data.nb_flags & NB_DEREG) - -/* Error codes for NetBIOS requests. */ -#define FMT_ERR 0x1 /* Packet format error. */ -#define SRV_ERR 0x2 /* Internal server error. */ -#define NAM_ERR 0x3 /* Name does not exist. */ -#define IMP_ERR 0x4 /* Request not implemented. */ -#define RFS_ERR 0x5 /* Request refused. */ -#define ACT_ERR 0x6 /* Active error - name owned by another host. */ -#define CFT_ERR 0x7 /* Name in conflict error. */ - -#define REFRESH_TIME (15*60) -#define NAME_POLL_REFRESH_TIME (5*60) -#define NAME_POLL_INTERVAL 15 - -/* Workgroup state identifiers. */ -#define AM_POTENTIAL_MASTER_BROWSER(work) ((work)->mst_state == MST_POTENTIAL) -#define AM_LOCAL_MASTER_BROWSER(work) ((work)->mst_state == MST_BROWSER) -#define AM_DOMAIN_MASTER_BROWSER(work) ((work)->dom_state == DOMAIN_MST) -#define AM_DOMAIN_MEMBER(work) ((work)->log_state == LOGON_SRV) - -/* Microsoft browser NetBIOS name. */ -#define MSBROWSE "\001\002__MSBROWSE__\002" - -/* Mail slots. */ -#define BROWSE_MAILSLOT "\\MAILSLOT\\BROWSE" -#define NET_LOGON_MAILSLOT "\\MAILSLOT\\NET\\NETLOGON" -#define NT_LOGON_MAILSLOT "\\MAILSLOT\\NET\\NTLOGON" -#define LANMAN_MAILSLOT "\\MAILSLOT\\LANMAN" - -/* Samba definitions for find_name_on_subnet(). */ -#define FIND_ANY_NAME 0 -#define FIND_SELF_NAME 1 - -/* - * The different name types that can be in namelists. - * - * SELF_NAME should only be on the broadcast and unicast subnets. - * LMHOSTS_NAME should only be in the remote_broadcast_subnet. - * REGISTER_NAME, DNS_NAME, DNSFAIL_NAME should only be in the wins_server_subnet. - * WINS_PROXY_NAME should only be on the broadcast subnets. - * PERMANENT_NAME can be on all subnets except remote_broadcast_subnet. - * - */ - -enum name_source -{ LMHOSTS_NAME, REGISTER_NAME, SELF_NAME, DNS_NAME, - DNSFAIL_NAME, PERMANENT_NAME, WINS_PROXY_NAME -}; -enum node_type -{ B_NODE = 0, P_NODE = 1, M_NODE = 2, NBDD_NODE = 3 }; -enum packet_type -{ NMB_PACKET, DGRAM_PACKET }; - -enum master_state -{ - MST_NONE, - MST_POTENTIAL, - MST_BACKUP, - MST_MSB, - MST_BROWSER, - MST_UNBECOMING_MASTER -}; - -enum domain_state -{ - DOMAIN_NONE, - DOMAIN_WAIT, - DOMAIN_MST -}; - -enum logon_state -{ - LOGON_NONE, - LOGON_WAIT, - LOGON_SRV -}; - -struct subnet_record; - -struct nmb_data -{ - uint16 nb_flags; /* Netbios flags. */ - int num_ips; /* Number of ip entries. */ - struct in_addr *ip; /* The ip list for this name. */ - - enum name_source source; /* Where the name came from. */ - - time_t death_time; /* The time the record must be removed (do not remove if 0). */ - time_t refresh_time; /* The time the record should be refreshed. */ -}; - -/* This is used to hold the list of servers in my domain, and is - contained within lists of domains. */ - -struct server_record -{ - struct server_record *next; - struct server_record *prev; - - struct subnet_record *subnet; - - struct server_info_struct serv; - time_t death_time; -}; - -/* A workgroup structure. It contains a list of servers. */ -struct work_record -{ - struct work_record *next; - struct work_record *prev; - - struct subnet_record *subnet; - - struct server_record *serverlist; - - /* Stage of development from non-local-master up to local-master browser. */ - enum master_state mst_state; - - /* Stage of development from non-domain-master to domain-master browser. */ - enum domain_state dom_state; - - /* Stage of development from non-logon-server to logon server. */ - enum logon_state log_state; - - /* Work group info. */ - fstring work_group; - int token; /* Used when communicating with backup browsers. */ - fstring local_master_browser_name; /* Current local master browser. */ - - /* Announce info. */ - time_t lastannounce_time; - int announce_interval; - BOOL needannounce; - - /* Timeout time for this workgroup. 0 means permanent. */ - time_t death_time; - - /* Election info */ - BOOL RunningElection; - BOOL needelection; - int ElectionCount; - uint32 ElectionCriterion; - - /* Domain master browser info. Used for efficient syncs. */ - struct nmb_name dmb_name; - struct in_addr dmb_addr; -}; - -/* typedefs needed to define copy & free functions for userdata. */ -struct userdata_struct; - -typedef struct userdata_struct *(*userdata_copy_fn) (struct userdata_struct *); -typedef void (*userdata_free_fn) (struct userdata_struct *); - -/* Structure to define any userdata passed around. */ - -struct userdata_struct -{ - userdata_copy_fn copy_fn; - userdata_free_fn free_fn; - unsigned int userdata_len; - char data[16]; /* 16 is to ensure alignment/padding on all systems */ -}; - -struct response_record; -struct packet_struct; -struct res_rec; - -/* typedef to define the function called when this response packet comes in. */ -typedef void (*response_function) (struct subnet_record *, struct response_record *, - struct packet_struct *); - -/* typedef to define the function called when this response record times out. */ -typedef void (*timeout_response_function) (struct subnet_record *, struct response_record *); - -/* typedef to define the function called when the request that caused this - response record to be created is successful. */ -typedef void (*success_function) (struct subnet_record *, struct userdata_struct *, ...); - -/* typedef to define the function called when the request that caused this - response record to be created is unsuccessful. */ -typedef void (*fail_function) (struct subnet_record *, struct response_record *, ...); - -/* List of typedefs for success and fail functions of the different query - types. Used to catch any compile time prototype errors. */ - -typedef void (*register_name_success_function) (struct subnet_record *, - struct userdata_struct *, - struct nmb_name *, uint16, int, struct in_addr); -typedef void (*register_name_fail_function) (struct subnet_record *, - struct response_record *, struct nmb_name *); - -typedef void (*release_name_success_function) (struct subnet_record *, - struct userdata_struct *, - struct nmb_name *, struct in_addr); -typedef void (*release_name_fail_function) (struct subnet_record *, - struct response_record *, struct nmb_name *); - -typedef void (*refresh_name_success_function) (struct subnet_record *, - struct userdata_struct *, - struct nmb_name *, uint16, int, struct in_addr); -typedef void (*refresh_name_fail_function) (struct subnet_record *, - struct response_record *, struct nmb_name *); - -typedef void (*query_name_success_function) (struct subnet_record *, - struct userdata_struct *, - struct nmb_name *, - struct in_addr, struct res_rec * answers); - -typedef void (*query_name_fail_function) (struct subnet_record *, - struct response_record *, struct nmb_name *, int); - -typedef void (*node_status_success_function) (struct subnet_record *, - struct userdata_struct *, - struct res_rec *, struct in_addr); -typedef void (*node_status_fail_function) (struct subnet_record *, struct response_record *); - -/* Initiated name queries are recorded in this list to track any responses. */ - -struct response_record -{ - struct response_record *next; - struct response_record *prev; - - uint16 response_id; - - /* Callbacks for packets received or not. */ - response_function resp_fn; - timeout_response_function timeout_fn; - - /* Callbacks for the request succeeding or not. */ - success_function success_fn; - fail_function fail_fn; - - struct packet_struct *packet; - - struct userdata_struct *userdata; - - int num_msgs; - - time_t repeat_time; - time_t repeat_interval; - int repeat_count; - - /* Recursion protection. */ - BOOL in_expiration_processing; -}; - -/* A subnet structure. It contains a list of workgroups and netbios names. */ - -/* - B nodes will have their own, totally separate subnet record, with their - own netbios name set. These do NOT interact with other subnet records' - netbios names. - */ - -enum subnet_type -{ - NORMAL_SUBNET = 0, /* Subnet listed in interfaces list. */ - UNICAST_SUBNET = 1, /* Subnet for unicast packets. */ - REMOTE_BROADCAST_SUBNET = 2, /* Subnet for remote broadcasts. */ - WINS_SERVER_SUBNET = 3 /* Only created if we are a WINS server. */ -}; - -/* A resource record. */ -struct res_rec -{ - struct nmb_name rr_name; - int rr_type; - int rr_class; - int ttl; - int rdlength; - char rdata[MAX_DGRAM_SIZE]; -}; - -/* An nmb packet. */ -struct nmb_packet -{ - struct - { - int name_trn_id; - int opcode; - BOOL response; - struct - { - BOOL bcast; - BOOL recursion_available; - BOOL recursion_desired; - BOOL trunc; - BOOL authoritative; - } nm_flags; - int rcode; - int qdcount; - int ancount; - int nscount; - int arcount; - } header; - - struct - { - struct nmb_name question_name; - int question_type; - int question_class; - } question; - - struct res_rec *answers; - struct res_rec *nsrecs; - struct res_rec *additional; -}; - - -/* A datagram - this normally contains SMB data in the data[] array. */ - -struct dgram_packet -{ - struct - { - int msg_type; - struct - { - enum node_type node_type; - BOOL first; - BOOL more; - } flags; - int dgm_id; - struct in_addr source_ip; - int source_port; - int dgm_length; - int packet_offset; - } header; - struct nmb_name source_name; - struct nmb_name dest_name; - int datasize; - char data[MAX_DGRAM_SIZE]; -}; - -/* Define a structure used to queue packets. This will be a linked - list of nmb packets. */ - -struct packet_struct -{ - struct packet_struct *next; - struct packet_struct *prev; - BOOL locked; - struct in_addr ip; - int port; - int fd; - time_t timestamp; - enum packet_type packet_type; - union - { - struct nmb_packet nmb; - struct dgram_packet dgram; - } packet; -}; - -/* NETLOGON opcodes */ - -#define QUERYFORPDC 7 /* Query for PDC. */ -#define QUERYFORPDC_R 12 /* Response to Query for PDC. */ -#define SAMLOGON 18 -#define SAMLOGON_R 19 - - -/* Ids for netbios packet types. */ - -#define ANN_HostAnnouncement 1 -#define ANN_AnnouncementRequest 2 -#define ANN_Election 8 -#define ANN_GetBackupListReq 9 -#define ANN_GetBackupListResp 10 -#define ANN_BecomeBackup 11 -#define ANN_DomainAnnouncement 12 -#define ANN_MasterAnnouncement 13 -#define ANN_ResetBrowserState 14 -#define ANN_LocalMasterAnnouncement 15 - - -/* Broadcast packet announcement intervals, in minutes. */ - -/* Attempt to add domain logon and domain master names. */ -#define CHECK_TIME_ADD_DOM_NAMES 5 - -/* Search for master browsers of workgroups samba knows about, - except default. */ -#define CHECK_TIME_MST_BROWSE 5 - -/* Request backup browser announcements from other servers. */ -#define CHECK_TIME_ANNOUNCE_BACKUP 15 - -/* Request host announcements from other servers: min and max of interval. */ -#define CHECK_TIME_MIN_HOST_ANNCE 3 -#define CHECK_TIME_MAX_HOST_ANNCE 12 - -/* Announce as master to WINS server and any Primary Domain Controllers. */ -#define CHECK_TIME_MST_ANNOUNCE 15 - -/* Time between syncs from domain master browser to local master browsers. */ -#define CHECK_TIME_DMB_TO_LMB_SYNC 15 - -/* Do all remote announcements this often. */ -#define REMOTE_ANNOUNCE_INTERVAL 180 - -/* what is the maximum period between name refreshes. Note that this only - affects non-permanent self names (in seconds) */ -#define MAX_REFRESH_TIME (60*20) - -/* Macro's to enumerate subnets either with or without - the UNICAST subnet. */ - -extern struct subnet_record *subnetlist; -extern struct subnet_record *unicast_subnet; -extern struct subnet_record *wins_server_subnet; -extern struct subnet_record *remote_broadcast_subnet; - -#define FIRST_SUBNET subnetlist -#define NEXT_SUBNET_EXCLUDING_UNICAST(x) ((x)->next) -#define NEXT_SUBNET_INCLUDING_UNICAST(x) (get_next_subnet_maybe_unicast((x))) - -/* To be removed. */ -enum state_type -{ TEST }; -#endif /* _NAMESERV_H_ */ diff --git a/src/vfs/smbfs/helpers/include/nterr.h b/src/vfs/smbfs/helpers/include/nterr.h deleted file mode 100644 index a94464a01..000000000 --- a/src/vfs/smbfs/helpers/include/nterr.h +++ /dev/null @@ -1,507 +0,0 @@ -/* these are the NT error codes less than 1000. They are here for when - we start supporting NT error codes in Samba. They were extracted - using a loop in smbclient then printing a netmon sniff to a file */ - -#define NT_STATUS_UNSUCCESSFUL (1) -#define NT_STATUS_NOT_IMPLEMENTED (2) -#define NT_STATUS_INVALID_INFO_CLASS (3) -#define NT_STATUS_INFO_LENGTH_MISMATCH (4) -#define NT_STATUS_ACCESS_VIOLATION (5) -#define STATUS_BUFFER_OVERFLOW (5) -#define NT_STATUS_IN_PAGE_ERROR (6) -#define NT_STATUS_PAGEFILE_QUOTA (7) -#define NT_STATUS_INVALID_HANDLE (8) -#define NT_STATUS_BAD_INITIAL_STACK (9) -#define NT_STATUS_BAD_INITIAL_PC (10) -#define NT_STATUS_INVALID_CID (11) -#define NT_STATUS_TIMER_NOT_CANCELED (12) -#define NT_STATUS_INVALID_PARAMETER (13) -#define NT_STATUS_NO_SUCH_DEVICE (14) -#define NT_STATUS_NO_SUCH_FILE (15) -#define NT_STATUS_INVALID_DEVICE_REQUEST (16) -#define NT_STATUS_END_OF_FILE (17) -#define NT_STATUS_WRONG_VOLUME (18) -#define NT_STATUS_NO_MEDIA_IN_DEVICE (19) -#define NT_STATUS_UNRECOGNIZED_MEDIA (20) -#define NT_STATUS_NONEXISTENT_SECTOR (21) -#define NT_STATUS_MORE_PROCESSING_REQUIRED (22) -#define NT_STATUS_NO_MEMORY (23) -#define NT_STATUS_CONFLICTING_ADDRESSES (24) -#define NT_STATUS_NOT_MAPPED_VIEW (25) -#define NT_STATUS_UNABLE_TO_FREE_VM (26) -#define NT_STATUS_UNABLE_TO_DELETE_SECTION (27) -#define NT_STATUS_INVALID_SYSTEM_SERVICE (28) -#define NT_STATUS_ILLEGAL_INSTRUCTION (29) -#define NT_STATUS_INVALID_LOCK_SEQUENCE (30) -#define NT_STATUS_INVALID_VIEW_SIZE (31) -#define NT_STATUS_INVALID_FILE_FOR_SECTION (32) -#define NT_STATUS_ALREADY_COMMITTED (33) -#define NT_STATUS_ACCESS_DENIED (34) -#define NT_STATUS_BUFFER_TOO_SMALL (35) -#define NT_STATUS_OBJECT_TYPE_MISMATCH (36) -#define NT_STATUS_NONCONTINUABLE_EXCEPTION (37) -#define NT_STATUS_INVALID_DISPOSITION (38) -#define NT_STATUS_UNWIND (39) -#define NT_STATUS_BAD_STACK (40) -#define NT_STATUS_INVALID_UNWIND_TARGET (41) -#define NT_STATUS_NOT_LOCKED (42) -#define NT_STATUS_PARITY_ERROR (43) -#define NT_STATUS_UNABLE_TO_DECOMMIT_VM (44) -#define NT_STATUS_NOT_COMMITTED (45) -#define NT_STATUS_INVALID_PORT_ATTRIBUTES (46) -#define NT_STATUS_PORT_MESSAGE_TOO_LONG (47) -#define NT_STATUS_INVALID_PARAMETER_MIX (48) -#define NT_STATUS_INVALID_QUOTA_LOWER (49) -#define NT_STATUS_DISK_CORRUPT_ERROR (50) -#define NT_STATUS_OBJECT_NAME_INVALID (51) -#define NT_STATUS_OBJECT_NAME_NOT_FOUND (52) -#define NT_STATUS_OBJECT_NAME_COLLISION (53) -#define NT_STATUS_HANDLE_NOT_WAITABLE (54) -#define NT_STATUS_PORT_DISCONNECTED (55) -#define NT_STATUS_DEVICE_ALREADY_ATTACHED (56) -#define NT_STATUS_OBJECT_PATH_INVALID (57) -#define NT_STATUS_OBJECT_PATH_NOT_FOUND (58) -#define NT_STATUS_OBJECT_PATH_SYNTAX_BAD (59) -#define NT_STATUS_DATA_OVERRUN (60) -#define NT_STATUS_DATA_LATE_ERROR (61) -#define NT_STATUS_DATA_ERROR (62) -#define NT_STATUS_CRC_ERROR (63) -#define NT_STATUS_SECTION_TOO_BIG (64) -#define NT_STATUS_PORT_CONNECTION_REFUSED (65) -#define NT_STATUS_INVALID_PORT_HANDLE (66) -#define NT_STATUS_SHARING_VIOLATION (67) -#define NT_STATUS_QUOTA_EXCEEDED (68) -#define NT_STATUS_INVALID_PAGE_PROTECTION (69) -#define NT_STATUS_MUTANT_NOT_OWNED (70) -#define NT_STATUS_SEMAPHORE_LIMIT_EXCEEDED (71) -#define NT_STATUS_PORT_ALREADY_SET (72) -#define NT_STATUS_SECTION_NOT_IMAGE (73) -#define NT_STATUS_SUSPEND_COUNT_EXCEEDED (74) -#define NT_STATUS_THREAD_IS_TERMINATING (75) -#define NT_STATUS_BAD_WORKING_SET_LIMIT (76) -#define NT_STATUS_INCOMPATIBLE_FILE_MAP (77) -#define NT_STATUS_SECTION_PROTECTION (78) -#define NT_STATUS_EAS_NOT_SUPPORTED (79) -#define NT_STATUS_EA_TOO_LARGE (80) -#define NT_STATUS_NONEXISTENT_EA_ENTRY (81) -#define NT_STATUS_NO_EAS_ON_FILE (82) -#define NT_STATUS_EA_CORRUPT_ERROR (83) -#define NT_STATUS_FILE_LOCK_CONFLICT (84) -#define NT_STATUS_LOCK_NOT_GRANTED (85) -#define NT_STATUS_DELETE_PENDING (86) -#define NT_STATUS_CTL_FILE_NOT_SUPPORTED (87) -#define NT_STATUS_UNKNOWN_REVISION (88) -#define NT_STATUS_REVISION_MISMATCH (89) -#define NT_STATUS_INVALID_OWNER (90) -#define NT_STATUS_INVALID_PRIMARY_GROUP (91) -#define NT_STATUS_NO_IMPERSONATION_TOKEN (92) -#define NT_STATUS_CANT_DISABLE_MANDATORY (93) -#define NT_STATUS_NO_LOGON_SERVERS (94) -#define NT_STATUS_NO_SUCH_LOGON_SESSION (95) -#define NT_STATUS_NO_SUCH_PRIVILEGE (96) -#define NT_STATUS_PRIVILEGE_NOT_HELD (97) -#define NT_STATUS_INVALID_ACCOUNT_NAME (98) -#define NT_STATUS_USER_EXISTS (99) -#define NT_STATUS_NO_SUCH_USER (100) -#define NT_STATUS_GROUP_EXISTS (101) -#define NT_STATUS_NO_SUCH_GROUP (102) -#define NT_STATUS_MEMBER_IN_GROUP (103) -#define NT_STATUS_MEMBER_NOT_IN_GROUP (104) -#define NT_STATUS_LAST_ADMIN (105) -#define NT_STATUS_WRONG_PASSWORD (106) -#define NT_STATUS_ILL_FORMED_PASSWORD (107) -#define NT_STATUS_PASSWORD_RESTRICTION (108) -#define NT_STATUS_LOGON_FAILURE (109) -#define NT_STATUS_ACCOUNT_RESTRICTION (110) -#define NT_STATUS_INVALID_LOGON_HOURS (111) -#define NT_STATUS_INVALID_WORKSTATION (112) -#define NT_STATUS_PASSWORD_EXPIRED (113) -#define NT_STATUS_ACCOUNT_DISABLED (114) -#define NT_STATUS_NONE_MAPPED (115) -#define NT_STATUS_TOO_MANY_LUIDS_REQUESTED (116) -#define NT_STATUS_LUIDS_EXHAUSTED (117) -#define NT_STATUS_INVALID_SUB_AUTHORITY (118) -#define NT_STATUS_INVALID_ACL (119) -#define NT_STATUS_INVALID_SID (120) -#define NT_STATUS_INVALID_SECURITY_DESCR (121) -#define NT_STATUS_PROCEDURE_NOT_FOUND (122) -#define NT_STATUS_INVALID_IMAGE_FORMAT (123) -#define NT_STATUS_NO_TOKEN (124) -#define NT_STATUS_BAD_INHERITANCE_ACL (125) -#define NT_STATUS_RANGE_NOT_LOCKED (126) -#define NT_STATUS_DISK_FULL (127) -#define NT_STATUS_SERVER_DISABLED (128) -#define NT_STATUS_SERVER_NOT_DISABLED (129) -#define NT_STATUS_TOO_MANY_GUIDS_REQUESTED (130) -#define NT_STATUS_GUIDS_EXHAUSTED (131) -#define NT_STATUS_INVALID_ID_AUTHORITY (132) -#define NT_STATUS_AGENTS_EXHAUSTED (133) -#define NT_STATUS_INVALID_VOLUME_LABEL (134) -#define NT_STATUS_SECTION_NOT_EXTENDED (135) -#define NT_STATUS_NOT_MAPPED_DATA (136) -#define NT_STATUS_RESOURCE_DATA_NOT_FOUND (137) -#define NT_STATUS_RESOURCE_TYPE_NOT_FOUND (138) -#define NT_STATUS_RESOURCE_NAME_NOT_FOUND (139) -#define NT_STATUS_ARRAY_BOUNDS_EXCEEDED (140) -#define NT_STATUS_FLOAT_DENORMAL_OPERAND (141) -#define NT_STATUS_FLOAT_DIVIDE_BY_ZERO (142) -#define NT_STATUS_FLOAT_INEXACT_RESULT (143) -#define NT_STATUS_FLOAT_INVALID_OPERATION (144) -#define NT_STATUS_FLOAT_OVERFLOW (145) -#define NT_STATUS_FLOAT_STACK_CHECK (146) -#define NT_STATUS_FLOAT_UNDERFLOW (147) -#define NT_STATUS_INTEGER_DIVIDE_BY_ZERO (148) -#define NT_STATUS_INTEGER_OVERFLOW (149) -#define NT_STATUS_PRIVILEGED_INSTRUCTION (150) -#define NT_STATUS_TOO_MANY_PAGING_FILES (151) -#define NT_STATUS_FILE_INVALID (152) -#define NT_STATUS_ALLOTTED_SPACE_EXCEEDED (153) -#define NT_STATUS_INSUFFICIENT_RESOURCES (154) -#define NT_STATUS_DFS_EXIT_PATH_FOUND (155) -#define NT_STATUS_DEVICE_DATA_ERROR (156) -#define NT_STATUS_DEVICE_NOT_CONNECTED (157) -#define NT_STATUS_DEVICE_POWER_FAILURE (158) -#define NT_STATUS_FREE_VM_NOT_AT_BASE (159) -#define NT_STATUS_MEMORY_NOT_ALLOCATED (160) -#define NT_STATUS_WORKING_SET_QUOTA (161) -#define NT_STATUS_MEDIA_WRITE_PROTECTED (162) -#define NT_STATUS_DEVICE_NOT_READY (163) -#define NT_STATUS_INVALID_GROUP_ATTRIBUTES (164) -#define NT_STATUS_BAD_IMPERSONATION_LEVEL (165) -#define NT_STATUS_CANT_OPEN_ANONYMOUS (166) -#define NT_STATUS_BAD_VALIDATION_CLASS (167) -#define NT_STATUS_BAD_TOKEN_TYPE (168) -#define NT_STATUS_BAD_MASTER_BOOT_RECORD (169) -#define NT_STATUS_INSTRUCTION_MISALIGNMENT (170) -#define NT_STATUS_INSTANCE_NOT_AVAILABLE (171) -#define NT_STATUS_PIPE_NOT_AVAILABLE (172) -#define NT_STATUS_INVALID_PIPE_STATE (173) -#define NT_STATUS_PIPE_BUSY (174) -#define NT_STATUS_ILLEGAL_FUNCTION (175) -#define NT_STATUS_PIPE_DISCONNECTED (176) -#define NT_STATUS_PIPE_CLOSING (177) -#define NT_STATUS_PIPE_CONNECTED (178) -#define NT_STATUS_PIPE_LISTENING (179) -#define NT_STATUS_INVALID_READ_MODE (180) -#define NT_STATUS_IO_TIMEOUT (181) -#define NT_STATUS_FILE_FORCED_CLOSED (182) -#define NT_STATUS_PROFILING_NOT_STARTED (183) -#define NT_STATUS_PROFILING_NOT_STOPPED (184) -#define NT_STATUS_COULD_NOT_INTERPRET (185) -#define NT_STATUS_FILE_IS_A_DIRECTORY (186) -#define NT_STATUS_NOT_SUPPORTED (187) -#define NT_STATUS_REMOTE_NOT_LISTENING (188) -#define NT_STATUS_DUPLICATE_NAME (189) -#define NT_STATUS_BAD_NETWORK_PATH (190) -#define NT_STATUS_NETWORK_BUSY (191) -#define NT_STATUS_DEVICE_DOES_NOT_EXIST (192) -#define NT_STATUS_TOO_MANY_COMMANDS (193) -#define NT_STATUS_ADAPTER_HARDWARE_ERROR (194) -#define NT_STATUS_INVALID_NETWORK_RESPONSE (195) -#define NT_STATUS_UNEXPECTED_NETWORK_ERROR (196) -#define NT_STATUS_BAD_REMOTE_ADAPTER (197) -#define NT_STATUS_PRINT_QUEUE_FULL (198) -#define NT_STATUS_NO_SPOOL_SPACE (199) -#define NT_STATUS_PRINT_CANCELLED (200) -#define NT_STATUS_NETWORK_NAME_DELETED (201) -#define NT_STATUS_NETWORK_ACCESS_DENIED (202) -#define NT_STATUS_BAD_DEVICE_TYPE (203) -#define NT_STATUS_BAD_NETWORK_NAME (204) -#define NT_STATUS_TOO_MANY_NAMES (205) -#define NT_STATUS_TOO_MANY_SESSIONS (206) -#define NT_STATUS_SHARING_PAUSED (207) -#define NT_STATUS_REQUEST_NOT_ACCEPTED (208) -#define NT_STATUS_REDIRECTOR_PAUSED (209) -#define NT_STATUS_NET_WRITE_FAULT (210) -#define NT_STATUS_PROFILING_AT_LIMIT (211) -#define NT_STATUS_NOT_SAME_DEVICE (212) -#define NT_STATUS_FILE_RENAMED (213) -#define NT_STATUS_VIRTUAL_CIRCUIT_CLOSED (214) -#define NT_STATUS_NO_SECURITY_ON_OBJECT (215) -#define NT_STATUS_CANT_WAIT (216) -#define NT_STATUS_PIPE_EMPTY (217) -#define NT_STATUS_CANT_ACCESS_DOMAIN_INFO (218) -#define NT_STATUS_CANT_TERMINATE_SELF (219) -#define NT_STATUS_INVALID_SERVER_STATE (220) -#define NT_STATUS_INVALID_DOMAIN_STATE (221) -#define NT_STATUS_INVALID_DOMAIN_ROLE (222) -#define NT_STATUS_NO_SUCH_DOMAIN (223) -#define NT_STATUS_DOMAIN_EXISTS (224) -#define NT_STATUS_DOMAIN_LIMIT_EXCEEDED (225) -#define NT_STATUS_OPLOCK_NOT_GRANTED (226) -#define NT_STATUS_INVALID_OPLOCK_PROTOCOL (227) -#define NT_STATUS_INTERNAL_DB_CORRUPTION (228) -#define NT_STATUS_INTERNAL_ERROR (229) -#define NT_STATUS_GENERIC_NOT_MAPPED (230) -#define NT_STATUS_BAD_DESCRIPTOR_FORMAT (231) -#define NT_STATUS_INVALID_USER_BUFFER (232) -#define NT_STATUS_UNEXPECTED_IO_ERROR (233) -#define NT_STATUS_UNEXPECTED_MM_CREATE_ERR (234) -#define NT_STATUS_UNEXPECTED_MM_MAP_ERROR (235) -#define NT_STATUS_UNEXPECTED_MM_EXTEND_ERR (236) -#define NT_STATUS_NOT_LOGON_PROCESS (237) -#define NT_STATUS_LOGON_SESSION_EXISTS (238) -#define NT_STATUS_INVALID_PARAMETER_1 (239) -#define NT_STATUS_INVALID_PARAMETER_2 (240) -#define NT_STATUS_INVALID_PARAMETER_3 (241) -#define NT_STATUS_INVALID_PARAMETER_4 (242) -#define NT_STATUS_INVALID_PARAMETER_5 (243) -#define NT_STATUS_INVALID_PARAMETER_6 (244) -#define NT_STATUS_INVALID_PARAMETER_7 (245) -#define NT_STATUS_INVALID_PARAMETER_8 (246) -#define NT_STATUS_INVALID_PARAMETER_9 (247) -#define NT_STATUS_INVALID_PARAMETER_10 (248) -#define NT_STATUS_INVALID_PARAMETER_11 (249) -#define NT_STATUS_INVALID_PARAMETER_12 (250) -#define NT_STATUS_REDIRECTOR_NOT_STARTED (251) -#define NT_STATUS_REDIRECTOR_STARTED (252) -#define NT_STATUS_STACK_OVERFLOW (253) -#define NT_STATUS_NO_SUCH_PACKAGE (254) -#define NT_STATUS_BAD_FUNCTION_TABLE (255) -#define NT_STATUS_DIRECTORY_NOT_EMPTY (257) -#define NT_STATUS_FILE_CORRUPT_ERROR (258) -#define NT_STATUS_NOT_A_DIRECTORY (259) -#define NT_STATUS_BAD_LOGON_SESSION_STATE (260) -#define NT_STATUS_LOGON_SESSION_COLLISION (261) -#define NT_STATUS_NAME_TOO_LONG (262) -#define NT_STATUS_FILES_OPEN (263) -#define NT_STATUS_CONNECTION_IN_USE (264) -#define NT_STATUS_MESSAGE_NOT_FOUND (265) -#define NT_STATUS_PROCESS_IS_TERMINATING (266) -#define NT_STATUS_INVALID_LOGON_TYPE (267) -#define NT_STATUS_NO_GUID_TRANSLATION (268) -#define NT_STATUS_CANNOT_IMPERSONATE (269) -#define NT_STATUS_IMAGE_ALREADY_LOADED (270) -#define NT_STATUS_ABIOS_NOT_PRESENT (271) -#define NT_STATUS_ABIOS_LID_NOT_EXIST (272) -#define NT_STATUS_ABIOS_LID_ALREADY_OWNED (273) -#define NT_STATUS_ABIOS_NOT_LID_OWNER (274) -#define NT_STATUS_ABIOS_INVALID_COMMAND (275) -#define NT_STATUS_ABIOS_INVALID_LID (276) -#define NT_STATUS_ABIOS_SELECTOR_NOT_AVAILABLE (277) -#define NT_STATUS_ABIOS_INVALID_SELECTOR (278) -#define NT_STATUS_NO_LDT (279) -#define NT_STATUS_INVALID_LDT_SIZE (280) -#define NT_STATUS_INVALID_LDT_OFFSET (281) -#define NT_STATUS_INVALID_LDT_DESCRIPTOR (282) -#define NT_STATUS_INVALID_IMAGE_NE_FORMAT (283) -#define NT_STATUS_RXACT_INVALID_STATE (284) -#define NT_STATUS_RXACT_COMMIT_FAILURE (285) -#define NT_STATUS_MAPPED_FILE_SIZE_ZERO (286) -#define NT_STATUS_TOO_MANY_OPENED_FILES (287) -#define NT_STATUS_CANCELLED (288) -#define NT_STATUS_CANNOT_DELETE (289) -#define NT_STATUS_INVALID_COMPUTER_NAME (290) -#define NT_STATUS_FILE_DELETED (291) -#define NT_STATUS_SPECIAL_ACCOUNT (292) -#define NT_STATUS_SPECIAL_GROUP (293) -#define NT_STATUS_SPECIAL_USER (294) -#define NT_STATUS_MEMBERS_PRIMARY_GROUP (295) -#define NT_STATUS_FILE_CLOSED (296) -#define NT_STATUS_TOO_MANY_THREADS (297) -#define NT_STATUS_THREAD_NOT_IN_PROCESS (298) -#define NT_STATUS_TOKEN_ALREADY_IN_USE (299) -#define NT_STATUS_PAGEFILE_QUOTA_EXCEEDED (300) -#define NT_STATUS_COMMITMENT_LIMIT (301) -#define NT_STATUS_INVALID_IMAGE_LE_FORMAT (302) -#define NT_STATUS_INVALID_IMAGE_NOT_MZ (303) -#define NT_STATUS_INVALID_IMAGE_PROTECT (304) -#define NT_STATUS_INVALID_IMAGE_WIN_16 (305) -#define NT_STATUS_LOGON_SERVER_CONFLICT (306) -#define NT_STATUS_TIME_DIFFERENCE_AT_DC (307) -#define NT_STATUS_SYNCHRONIZATION_REQUIRED (308) -#define NT_STATUS_DLL_NOT_FOUND (309) -#define NT_STATUS_OPEN_FAILED (310) -#define NT_STATUS_IO_PRIVILEGE_FAILED (311) -#define NT_STATUS_ORDINAL_NOT_FOUND (312) -#define NT_STATUS_ENTRYPOINT_NOT_FOUND (313) -#define NT_STATUS_CONTROL_C_EXIT (314) -#define NT_STATUS_LOCAL_DISCONNECT (315) -#define NT_STATUS_REMOTE_DISCONNECT (316) -#define NT_STATUS_REMOTE_RESOURCES (317) -#define NT_STATUS_LINK_FAILED (318) -#define NT_STATUS_LINK_TIMEOUT (319) -#define NT_STATUS_INVALID_CONNECTION (320) -#define NT_STATUS_INVALID_ADDRESS (321) -#define NT_STATUS_DLL_INIT_FAILED (322) -#define NT_STATUS_MISSING_SYSTEMFILE (323) -#define NT_STATUS_UNHANDLED_EXCEPTION (324) -#define NT_STATUS_APP_INIT_FAILURE (325) -#define NT_STATUS_PAGEFILE_CREATE_FAILED (326) -#define NT_STATUS_NO_PAGEFILE (327) -#define NT_STATUS_INVALID_LEVEL (328) -#define NT_STATUS_WRONG_PASSWORD_CORE (329) -#define NT_STATUS_ILLEGAL_FLOAT_CONTEXT (330) -#define NT_STATUS_PIPE_BROKEN (331) -#define NT_STATUS_REGISTRY_CORRUPT (332) -#define NT_STATUS_REGISTRY_IO_FAILED (333) -#define NT_STATUS_NO_EVENT_PAIR (334) -#define NT_STATUS_UNRECOGNIZED_VOLUME (335) -#define NT_STATUS_SERIAL_NO_DEVICE_INITED (336) -#define NT_STATUS_NO_SUCH_ALIAS (337) -#define NT_STATUS_MEMBER_NOT_IN_ALIAS (338) -#define NT_STATUS_MEMBER_IN_ALIAS (339) -#define NT_STATUS_ALIAS_EXISTS (340) -#define NT_STATUS_LOGON_NOT_GRANTED (341) -#define NT_STATUS_TOO_MANY_SECRETS (342) -#define NT_STATUS_SECRET_TOO_LONG (343) -#define NT_STATUS_INTERNAL_DB_ERROR (344) -#define NT_STATUS_FULLSCREEN_MODE (345) -#define NT_STATUS_TOO_MANY_CONTEXT_IDS (346) -#define NT_STATUS_LOGON_TYPE_NOT_GRANTED (347) -#define NT_STATUS_NOT_REGISTRY_FILE (348) -#define NT_STATUS_NT_CROSS_ENCRYPTION_REQUIRED (349) -#define NT_STATUS_DOMAIN_CTRLR_CONFIG_ERROR (350) -#define NT_STATUS_FT_MISSING_MEMBER (351) -#define NT_STATUS_ILL_FORMED_SERVICE_ENTRY (352) -#define NT_STATUS_ILLEGAL_CHARACTER (353) -#define NT_STATUS_UNMAPPABLE_CHARACTER (354) -#define NT_STATUS_UNDEFINED_CHARACTER (355) -#define NT_STATUS_FLOPPY_VOLUME (356) -#define NT_STATUS_FLOPPY_ID_MARK_NOT_FOUND (357) -#define NT_STATUS_FLOPPY_WRONG_CYLINDER (358) -#define NT_STATUS_FLOPPY_UNKNOWN_ERROR (359) -#define NT_STATUS_FLOPPY_BAD_REGISTERS (360) -#define NT_STATUS_DISK_RECALIBRATE_FAILED (361) -#define NT_STATUS_DISK_OPERATION_FAILED (362) -#define NT_STATUS_DISK_RESET_FAILED (363) -#define NT_STATUS_SHARED_IRQ_BUSY (364) -#define NT_STATUS_FT_ORPHANING (365) -#define NT_STATUS_PARTITION_FAILURE (370) -#define NT_STATUS_INVALID_BLOCK_LENGTH (371) -#define NT_STATUS_DEVICE_NOT_PARTITIONED (372) -#define NT_STATUS_UNABLE_TO_LOCK_MEDIA (373) -#define NT_STATUS_UNABLE_TO_UNLOAD_MEDIA (374) -#define NT_STATUS_EOM_OVERFLOW (375) -#define NT_STATUS_NO_MEDIA (376) -#define NT_STATUS_NO_SUCH_MEMBER (378) -#define NT_STATUS_INVALID_MEMBER (379) -#define NT_STATUS_KEY_DELETED (380) -#define NT_STATUS_NO_LOG_SPACE (381) -#define NT_STATUS_TOO_MANY_SIDS (382) -#define NT_STATUS_LM_CROSS_ENCRYPTION_REQUIRED (383) -#define NT_STATUS_KEY_HAS_CHILDREN (384) -#define NT_STATUS_CHILD_MUST_BE_VOLATILE (385) -#define NT_STATUS_DEVICE_CONFIGURATION_ERROR (386) -#define NT_STATUS_DRIVER_INTERNAL_ERROR (387) -#define NT_STATUS_INVALID_DEVICE_STATE (388) -#define NT_STATUS_IO_DEVICE_ERROR (389) -#define NT_STATUS_DEVICE_PROTOCOL_ERROR (390) -#define NT_STATUS_BACKUP_CONTROLLER (391) -#define NT_STATUS_LOG_FILE_FULL (392) -#define NT_STATUS_TOO_LATE (393) -#define NT_STATUS_NO_TRUST_LSA_SECRET (394) -#define NT_STATUS_NO_TRUST_SAM_ACCOUNT (395) -#define NT_STATUS_TRUSTED_DOMAIN_FAILURE (396) -#define NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE (397) -#define NT_STATUS_EVENTLOG_FILE_CORRUPT (398) -#define NT_STATUS_EVENTLOG_CANT_START (399) -#define NT_STATUS_TRUST_FAILURE (400) -#define NT_STATUS_MUTANT_LIMIT_EXCEEDED (401) -#define NT_STATUS_NETLOGON_NOT_STARTED (402) -#define NT_STATUS_ACCOUNT_EXPIRED (403) -#define NT_STATUS_POSSIBLE_DEADLOCK (404) -#define NT_STATUS_NETWORK_CREDENTIAL_CONFLICT (405) -#define NT_STATUS_REMOTE_SESSION_LIMIT (406) -#define NT_STATUS_EVENTLOG_FILE_CHANGED (407) -#define NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT (408) -#define NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT (409) -#define NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT (410) -#define NT_STATUS_DOMAIN_TRUST_INCONSISTENT (411) -#define NT_STATUS_FS_DRIVER_REQUIRED (412) -#define NT_STATUS_NO_USER_SESSION_KEY (514) -#define NT_STATUS_USER_SESSION_DELETED (515) -#define NT_STATUS_RESOURCE_LANG_NOT_FOUND (516) -#define NT_STATUS_INSUFF_SERVER_RESOURCES (517) -#define NT_STATUS_INVALID_BUFFER_SIZE (518) -#define NT_STATUS_INVALID_ADDRESS_COMPONENT (519) -#define NT_STATUS_INVALID_ADDRESS_WILDCARD (520) -#define NT_STATUS_TOO_MANY_ADDRESSES (521) -#define NT_STATUS_ADDRESS_ALREADY_EXISTS (522) -#define NT_STATUS_ADDRESS_CLOSED (523) -#define NT_STATUS_CONNECTION_DISCONNECTED (524) -#define NT_STATUS_CONNECTION_RESET (525) -#define NT_STATUS_TOO_MANY_NODES (526) -#define NT_STATUS_TRANSACTION_ABORTED (527) -#define NT_STATUS_TRANSACTION_TIMED_OUT (528) -#define NT_STATUS_TRANSACTION_NO_RELEASE (529) -#define NT_STATUS_TRANSACTION_NO_MATCH (530) -#define NT_STATUS_TRANSACTION_RESPONDED (531) -#define NT_STATUS_TRANSACTION_INVALID_ID (532) -#define NT_STATUS_TRANSACTION_INVALID_TYPE (533) -#define NT_STATUS_NOT_SERVER_SESSION (534) -#define NT_STATUS_NOT_CLIENT_SESSION (535) -#define NT_STATUS_CANNOT_LOAD_REGISTRY_FILE (536) -#define NT_STATUS_DEBUG_ATTACH_FAILED (537) -#define NT_STATUS_SYSTEM_PROCESS_TERMINATED (538) -#define NT_STATUS_DATA_NOT_ACCEPTED (539) -#define NT_STATUS_NO_BROWSER_SERVERS_FOUND (540) -#define NT_STATUS_VDM_HARD_ERROR (541) -#define NT_STATUS_DRIVER_CANCEL_TIMEOUT (542) -#define NT_STATUS_REPLY_MESSAGE_MISMATCH (543) -#define NT_STATUS_MAPPED_ALIGNMENT (544) -#define NT_STATUS_IMAGE_CHECKSUM_MISMATCH (545) -#define NT_STATUS_LOST_WRITEBEHIND_DATA (546) -#define NT_STATUS_CLIENT_SERVER_PARAMETERS_INVALID (547) -#define NT_STATUS_PASSWORD_MUST_CHANGE (548) -#define NT_STATUS_NOT_FOUND (549) -#define NT_STATUS_NOT_TINY_STREAM (550) -#define NT_STATUS_RECOVERY_FAILURE (551) -#define NT_STATUS_STACK_OVERFLOW_READ (552) -#define NT_STATUS_FAIL_CHECK (553) -#define NT_STATUS_DUPLICATE_OBJECTID (554) -#define NT_STATUS_OBJECTID_EXISTS (555) -#define NT_STATUS_CONVERT_TO_LARGE (556) -#define NT_STATUS_RETRY (557) -#define NT_STATUS_FOUND_OUT_OF_SCOPE (558) -#define NT_STATUS_ALLOCATE_BUCKET (559) -#define NT_STATUS_PROPSET_NOT_FOUND (560) -#define NT_STATUS_MARSHALL_OVERFLOW (561) -#define NT_STATUS_INVALID_VARIANT (562) -#define NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND (563) -#define NT_STATUS_ACCOUNT_LOCKED_OUT (564) -#define NT_STATUS_HANDLE_NOT_CLOSABLE (565) -#define NT_STATUS_CONNECTION_REFUSED (566) -#define NT_STATUS_GRACEFUL_DISCONNECT (567) -#define NT_STATUS_ADDRESS_ALREADY_ASSOCIATED (568) -#define NT_STATUS_ADDRESS_NOT_ASSOCIATED (569) -#define NT_STATUS_CONNECTION_INVALID (570) -#define NT_STATUS_CONNECTION_ACTIVE (571) -#define NT_STATUS_NETWORK_UNREACHABLE (572) -#define NT_STATUS_HOST_UNREACHABLE (573) -#define NT_STATUS_PROTOCOL_UNREACHABLE (574) -#define NT_STATUS_PORT_UNREACHABLE (575) -#define NT_STATUS_REQUEST_ABORTED (576) -#define NT_STATUS_CONNECTION_ABORTED (577) -#define NT_STATUS_BAD_COMPRESSION_BUFFER (578) -#define NT_STATUS_USER_MAPPED_FILE (579) -#define NT_STATUS_AUDIT_FAILED (580) -#define NT_STATUS_TIMER_RESOLUTION_NOT_SET (581) -#define NT_STATUS_CONNECTION_COUNT_LIMIT (582) -#define NT_STATUS_LOGIN_TIME_RESTRICTION (583) -#define NT_STATUS_LOGIN_WKSTA_RESTRICTION (584) -#define NT_STATUS_IMAGE_MP_UP_MISMATCH (585) -#define NT_STATUS_INSUFFICIENT_LOGON_INFO (592) -#define NT_STATUS_BAD_DLL_ENTRYPOINT (593) -#define NT_STATUS_BAD_SERVICE_ENTRYPOINT (594) -#define NT_STATUS_LPC_REPLY_LOST (595) -#define NT_STATUS_IP_ADDRESS_CONFLICT1 (596) -#define NT_STATUS_IP_ADDRESS_CONFLICT2 (597) -#define NT_STATUS_REGISTRY_QUOTA_LIMIT (598) -#define NT_STATUS_PATH_NOT_COVERED (599) -#define NT_STATUS_NO_CALLBACK_ACTIVE (600) -#define NT_STATUS_LICENSE_QUOTA_EXCEEDED (601) -#define NT_STATUS_PWD_TOO_SHORT (602) -#define NT_STATUS_PWD_TOO_RECENT (603) -#define NT_STATUS_PWD_HISTORY_CONFLICT (604) -#define NT_STATUS_PLUGPLAY_NO_DEVICE (606) -#define NT_STATUS_UNSUPPORTED_COMPRESSION (607) -#define NT_STATUS_INVALID_HW_PROFILE (608) -#define NT_STATUS_INVALID_PLUGPLAY_DEVICE_PATH (609) -#define NT_STATUS_DRIVER_ORDINAL_NOT_FOUND (610) -#define NT_STATUS_DRIVER_ENTRYPOINT_NOT_FOUND (611) -#define NT_STATUS_RESOURCE_NOT_OWNED (612) -#define NT_STATUS_TOO_MANY_LINKS (613) -#define NT_STATUS_QUOTA_LIST_INCONSISTENT (614) -#define NT_STATUS_FILE_IS_OFFLINE (615) -#define NT_STATUS_NOTIFY_ENUM_DIR (0x10C) diff --git a/src/vfs/smbfs/helpers/include/proto.h b/src/vfs/smbfs/helpers/include/proto.h deleted file mode 100644 index bdf30dbb0..000000000 --- a/src/vfs/smbfs/helpers/include/proto.h +++ /dev/null @@ -1,606 +0,0 @@ -#ifndef _PROTO_H_ -#define _PROTO_H_ -/* This file is automatically generated with "make proto". DO NOT EDIT */ - -/* The following definitions come from lib/charcnv.c */ - -char *unix2dos_format (char *str, BOOL overwrite); -char *dos2unix_format (char *str, BOOL overwrite); -void interpret_character_set (const char *str); - -/* The following definitions come from lib/charset.c */ - -void charset_initialise (void); -void codepage_initialise (int client_codepage); -void add_char_string (const char *s); - -/* The following definitions come from lib/debug.c */ - -void setup_logging (const char *pname, BOOL interactive); -void dbgflush (void); -BOOL dbghdr (int level, const char *file, const char *func, int line); - -/* The following definitions come from lib/interface.c */ - -void load_interfaces (void); -void iface_set_default (char *ip, char *bcast, char *nmask); -BOOL ismyip (struct in_addr ip); -BOOL is_local_net (struct in_addr from); -int iface_count (void); -BOOL we_are_multihomed (void); -struct interface *get_interface (int n); -struct in_addr *iface_n_ip (int n); -unsigned iface_hash (void); -struct in_addr *iface_bcast (struct in_addr ip); -struct in_addr *iface_ip (struct in_addr ip); - -/* The following definitions come from lib/kanji.c */ - -void interpret_coding_system (const char *str); -BOOL is_multibyte_codepage (void); -void initialize_multibyte_vectors (int client_codepage); - -/* The following definitions come from lib/md4.c */ - -void mdfour (unsigned char *out, unsigned char *in, int n); - -/* The following definitions come from lib/netmask.c */ - -int get_netmask (struct in_addr *ipaddr, struct in_addr *nmask); - -/* The following definitions come from lib/slprintf.c */ - -int vslprintf (char *str, int n, const char *format, va_list ap); - -/* The following definitions come from lib/system.c */ - -int sys_select (int maxfd, fd_set * fds, struct timeval *tval); -int sys_stat (const char *fname, SMB_STRUCT_STAT * sbuf); -int sys_lstat (const char *fname, SMB_STRUCT_STAT * sbuf); -int sys_fseek (FILE * fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell (FILE * fp); -int sys_open (const char *path, int oflag, mode_t mode); -FILE *sys_fopen (const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir (DIR * dirp); -char *sys_getwd (char *s); -int sys_chown (const char *fname, uid_t uid, gid_t gid); -struct hostent *sys_gethostbyname (const char *name); -long sys_random (void); -void sys_srandom (unsigned int seed); - -/* The following definitions come from lib/time.c */ - -void GetTimeOfDay (struct timeval *tval); -void TimeInit (void); -int TimeDiff (time_t t); -struct tm *LocalTime (time_t * t); -time_t nt_time_to_unix (NTTIME * nt); -time_t interpret_long_date (char *p); -void unix_to_nt_time (NTTIME * nt, time_t t); -void put_long_date (char *p, time_t t); -BOOL null_mtime (time_t mtime); -void put_dos_date (char *buf, int offset, time_t unixdate); -void put_dos_date2 (char *buf, int offset, time_t unixdate); -void put_dos_date3 (char *buf, int offset, time_t unixdate); -time_t make_unix_date (void *date_ptr); -time_t make_unix_date2 (void *date_ptr); -time_t make_unix_date3 (void *date_ptr); -char *http_timestring (time_t t); -char *timestring (void); -time_t get_create_time (SMB_STRUCT_STAT * st, BOOL fake_dirs); - -/* The following definitions come from lib/username.c */ - -const char *get_home_dir (char *user); -BOOL map_username (const char *user); -struct passwd *Get_Pwnam (const char *user); -BOOL user_in_list (const char *user, char *list); - -/* The following definitions come from lib/util.c */ - -const char *tmpdir (void); -BOOL in_group (gid_t group, gid_t current_gid, int ngroups, gid_t * groups); -char *Atoic (char *p, int *n, char *c); -char *get_numlist (char *p, uint32 ** num, int *count); -void putip (void *dest, void *src); -char *dns_to_netbios_name (char *dns_name); -int name_mangle (char *In, char *Out, char name_type); -BOOL file_exist (char *fname, SMB_STRUCT_STAT * sbuf); -time_t file_modtime (char *fname); -BOOL directory_exist (char *dname, SMB_STRUCT_STAT * st); -SMB_OFF_T file_size (char *file_name); -char *attrib_string (uint16 mode); -void unix_format (char *fname); -void dos_format (char *fname); -void show_msg (char *buf); -int smb_len (char *buf); -void _smb_setlen (char *buf, int len); -void smb_setlen (char *buf, int len); -int set_message (char *buf, int num_words, int num_bytes, BOOL zero); -int smb_buflen (char *buf); -char *smb_buf (char *buf); -int smb_offset (char *p, char *buf); -void dos_clean_name (char *s); -void unix_clean_name (char *s); -BOOL reduce_name (char *s, char *dir, BOOL widelinks); -void expand_mask (char *Mask, BOOL doext); -void make_dir_struct (char *buf, char *mask, char *fname, SMB_OFF_T size, int mode, time_t date); -void close_low_fds (void); -int set_blocking (int fd, BOOL set); -int TvalDiff (struct timeval *tvalold, struct timeval *tvalnew); -SMB_OFF_T transfer_file (int infd, int outfd, SMB_OFF_T n, char *header, int headlen, int align); -int name_extract (char *buf, int ofs, char *name); -int name_len (char *s1); -void msleep (int t); -BOOL do_match (char *str, char *regexp, int case_sig); -BOOL mask_match (char *str, char *regexp, int case_sig, BOOL trans2); -int set_filelen (int fd, SMB_OFF_T len); -void *Realloc (void *p, size_t size); -BOOL get_myname (char *my_name, struct in_addr *ip); -BOOL ip_equal (struct in_addr ip1, struct in_addr ip2); -int interpret_protocol (char *str, int def); -uint32 interpret_addr (const char *str); -struct in_addr *interpret_addr2 (const char *str); -BOOL zero_ip (struct in_addr ip); -BOOL matchname (char *remotehost, struct in_addr addr); -void standard_sub_basic (char *str); -void standard_sub (connection_struct * conn, char *str); -BOOL same_net (struct in_addr ip1, struct in_addr ip2, struct in_addr mask); -struct hostent *Get_Hostbyname (const char *name); -char *uidtoname (uid_t uid); -char *gidtoname (gid_t gid); -uid_t nametouid (const char *name); -void smb_panic (const char *why); -char *readdirname (DIR * p); -BOOL is_in_path (char *name, name_compare_entry * namelist); -void set_namearray (name_compare_entry ** ppname_array, char *namelist); -void free_namearray (name_compare_entry * name_array); -BOOL fcntl_lock (int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname (char *s); -void set_remote_arch (enum remote_arch_types type); -enum remote_arch_types get_remote_arch (void); -char *align2 (char *q, char *base); -void out_ascii (FILE * f, unsigned char *buf, int len); -void out_data (FILE * f, char *buf1, int len, int per_line); -void print_asc (int level, unsigned char *buf, int len); -void dump_data (int level, char *buf1, int len); -char *tab_depth (int depth); -int str_checksum (const char *s); -void zero_free (void *p, size_t size); -int set_maxfiles (int requested_max); - -/* The following definitions come from lib/util_file.c */ - -BOOL do_file_lock (int fd, int waitsecs, int type); -BOOL file_lock (int fd, int type, int secs, int *plock_depth); -BOOL file_unlock (int fd, int *plock_depth); -void *startfilepwent (char *pfile, char *s_readbuf, int bufsize, int *file_lock_depth, BOOL update); -void endfilepwent (void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos (void *vp); -BOOL setfilepwpos (void *vp, SMB_BIG_UINT tok); -int getfileline (void *vp, char *linebuf, int linebuf_size); -char *fgets_slash (char *s2, int maxlen, FILE * f); - -/* The following definitions come from lib/util_sock.c */ - -BOOL is_a_socket (int fd); -void set_socket_options (int fd, char *options); -void close_sockets (void); -ssize_t write_socket (int fd, char *buf, size_t len); -ssize_t read_udp_socket (int fd, char *buf, size_t len); -ssize_t read_with_timeout (int fd, char *buf, size_t mincnt, size_t maxcnt, unsigned int time_out); -BOOL send_keepalive (int client); -ssize_t read_data (int fd, char *buffer, size_t N); -ssize_t write_data (int fd, char *buffer, size_t N); -ssize_t read_smb_length (int fd, char *inbuf, unsigned int timeout); -BOOL receive_smb (int fd, char *buffer, unsigned int timeout); -BOOL client_receive_smb (int fd, char *buffer, unsigned int timeout); -BOOL send_null_session_msg (int fd); -BOOL send_smb (int fd, char *buffer); -BOOL send_one_packet (char *buf, int len, struct in_addr ip, int port, int type); -int open_socket_in (int type, int port, int dlevel, uint32 socket_addr, BOOL rebind); -int open_socket_out (int type, struct in_addr *addr, int port, int timeout); -char *client_name (int fd); -char *client_addr (int fd); - -/* The following definitions come from lib/util_str.c */ - -void set_first_token (char *ptr); -BOOL next_token (char **ptr, char *buff, const char *sep, size_t bufsize); -char **toktocliplist (int *ctok, char *sep); -int StrCaseCmp (const char *s, const char *t); -int StrnCaseCmp (const char *s, const char *t, size_t n); -BOOL strequal (const char *s1, const char *s2); -BOOL strnequal (const char *s1, const char *s2, size_t n); -BOOL strcsequal (const char *s1, const char *s2); -void strlower (char *s); -void strupper (char *s); -void strnorm (char *s); -BOOL strisnormal (char *s); -void string_replace (char *s, char oldc, char newc); -char *skip_string (char *buf, size_t n); -size_t str_charnum (const char *s); -BOOL trim_string (char *s, const char *front, const char *back); -BOOL strhasupper (const char *s); -BOOL strhaslower (const char *s); -size_t count_chars (const char *s, char c); -char *safe_strcpy (char *dest, const char *src, size_t maxlength); -char *safe_strcat (char *dest, const char *src, size_t maxlength); -char *StrCpy (char *dest, const char *src); -char *StrnCpy (char *dest, const char *src, size_t n); -char *strncpyn (char *dest, const char *src, size_t n, char c); -size_t strhex_to_str (char *p, size_t len, const char *strhex); -BOOL in_list (char *s, char *list, BOOL casesensitive); -BOOL string_init (char **dest, const char *src); -void string_free (char **s); -BOOL string_set (char **dest, const char *src); -void string_sub (char *s, const char *pattern, const char *insert); -void all_string_sub (char *s, const char *pattern, const char *insert); -void split_at_last_component (char *path, char *front, char sep, char *back); - -/* The following definitions come from libsmb/clientgen.c */ - -int cli_set_port (struct cli_state *cli, int port); -char *cli_errstr (struct cli_state *cli); -BOOL cli_api_pipe (struct cli_state *cli, char *pipe_name, int pipe_name_len, - uint16 * setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 * rparam_count, char **rdata, uint32 * rdata_count); -BOOL cli_api (struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon (struct cli_state *cli, char *user, char *workstation); -int cli_RNetShareEnum (struct cli_state *cli, - void (*fn) (const char *, uint32, const char *, void *), void *state); -BOOL cli_NetServerEnum (struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn) (const char *, uint32, const char *, void *), void *state); -BOOL cli_session_setup (struct cli_state *cli, char *user, char *pass, int passlen, char *ntpass, - int ntpasslen, char *workgroup); -BOOL cli_ulogoff (struct cli_state *cli); -BOOL cli_send_tconX (struct cli_state *cli, - const char *share, const char *dev, const char *pass, int passlen); -BOOL cli_tdis (struct cli_state *cli); -BOOL cli_rename (struct cli_state *cli, char *fname_src, char *fname_dst); -BOOL cli_unlink (struct cli_state *cli, char *fname); -BOOL cli_mkdir (struct cli_state *cli, char *dname); -BOOL cli_rmdir (struct cli_state *cli, char *dname); -int cli_nt_create (struct cli_state *cli, char *fname); -int cli_open (struct cli_state *cli, char *fname, int flags, int share_mode); -BOOL cli_close (struct cli_state *cli, int fnum); -BOOL cli_lock (struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout); -BOOL cli_unlock (struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout); -size_t cli_read (struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write (struct cli_state *cli, - int fnum, uint16 write_mode, const char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite (struct cli_state *cli, int fnum, const char *buf, off_t offset, size_t size); -BOOL cli_getattrE (struct cli_state *cli, int fd, - uint16 * attr, size_t * size, time_t * c_time, time_t * a_time, time_t * m_time); -BOOL cli_getatr (struct cli_state *cli, char *fname, uint16 * attr, size_t * size, time_t * t); -BOOL cli_setatr (struct cli_state *cli, char *fname, uint16 attr, time_t t); -BOOL cli_qpathinfo (struct cli_state *cli, const char *fname, - time_t * c_time, time_t * a_time, time_t * m_time, - size_t * size, uint16 * mode); -BOOL cli_qpathinfo2 (struct cli_state *cli, const char *fname, - time_t * c_time, time_t * a_time, time_t * m_time, - time_t * w_time, size_t * size, uint16 * mode, SMB_INO_T * ino); -BOOL cli_qfileinfo (struct cli_state *cli, int fnum, - uint16 * mode, size_t * size, - time_t * c_time, time_t * a_time, time_t * m_time, - time_t * w_time, SMB_INO_T * ino); -int cli_list (struct cli_state *cli, const char *Mask, uint16 attribute, - void (*fn) (file_info *, const char *, void *), void *state); -BOOL cli_negprot (struct cli_state *cli); -BOOL cli_session_request (struct cli_state *cli, struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect (struct cli_state *cli, const char *host, struct in_addr *ip); -struct cli_state *cli_initialise (struct cli_state *cli); -void cli_shutdown (struct cli_state *cli); -int cli_error (struct cli_state *cli, uint8 * eclass, uint32 * num, uint32 * nt_rpc_error); -void cli_sockopt (struct cli_state *cli, char *options); -uint16 cli_setpid (struct cli_state *cli, uint16 pid); -BOOL cli_reestablish_connection (struct cli_state *cli); -BOOL cli_establish_connection (struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, BOOL do_shutdown, BOOL do_tcon); -BOOL cli_chkpath (struct cli_state *cli, char *path); -BOOL cli_message_start (struct cli_state *cli, char *host, char *username, int *grp); -BOOL cli_message_text (struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end (struct cli_state *cli, int grp); -BOOL cli_dskattr (struct cli_state *cli, int *bsize, int *total, int *avail); - -/* The following definitions come from libsmb/namequery.c */ - -struct in_addr *name_query (int fd, const char *name, int name_type, BOOL bcast, BOOL recurse, - struct in_addr to_ip, int *count, void (*fn) (struct packet_struct *)); -FILE *startlmhosts (const char *fname); -BOOL getlmhostsent (FILE * fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts (FILE * fp); -BOOL resolve_name (const char *name, struct in_addr *return_ip, int name_type); -BOOL find_master_ip (char *group, struct in_addr *master_ip); - -/* The following definitions come from libsmb/nmblib.c */ - -void debug_nmb_packet (struct packet_struct *p); -char *nmb_namestr (struct nmb_name *n); -struct packet_struct *copy_packet (struct packet_struct *packet); -void free_packet (struct packet_struct *packet); -struct packet_struct *read_packet (int fd, enum packet_type packet_type); -void make_nmb_name (struct nmb_name *n, const char *name, int type); -BOOL nmb_name_equal (struct nmb_name *n1, struct nmb_name *n2); -BOOL send_packet (struct packet_struct *p); -struct packet_struct *receive_packet (int fd, enum packet_type type, int t); -void sort_query_replies (char *data, int n, struct in_addr ip); - -/* The following definitions come from libsmb/nterr.c */ - -const char *get_nt_error_msg (uint32 nt_code); - -/* The following definitions come from libsmb/pwd_cache.c */ - -void pwd_init (struct pwd_info *pwd); -void pwd_obfuscate_key (struct pwd_info *pwd, uint32 int_key, char *str_key); -void pwd_read (struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd (struct pwd_info *pwd); -void pwd_set_cleartext (struct pwd_info *pwd, char *clr); -void pwd_get_cleartext (struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16 (struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16 (struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16 (struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf (struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf (struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); - -/* The following definitions come from libsmb/smbdes.c */ - -void E_P16 (unsigned char *p14, unsigned char *p16); -void E_P24 (unsigned char *p21, unsigned char *c8, unsigned char *p24); -void D_P16 (unsigned char *p14, unsigned char *in, unsigned char *out); -void E_old_pw_hash (unsigned char *p14, unsigned char *in, unsigned char *out); -void cred_hash1 (unsigned char *out, unsigned char *in, unsigned char *key); -void cred_hash2 (unsigned char *out, unsigned char *in, unsigned char *key); -void cred_hash3 (unsigned char *out, unsigned char *in, unsigned char *key, int forw); -void SamOEMhash (unsigned char *data, unsigned char *key, int val); - -/* The following definitions come from libsmb/smbencrypt.c */ - -void SMBencrypt (uchar * passwd, uchar * c8, uchar * p24); -void E_md4hash (uchar * passwd, uchar * p16); -void nt_lm_owf_gen (char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt (uchar passwd[16], uchar * c8, uchar p24[24]); -void NTLMSSPOWFencrypt (uchar passwd[8], uchar * ntlmchalresp, uchar p24[24]); -void SMBNTencrypt (uchar * passwd, uchar * c8, uchar * p24); - -/* The following definitions come from libsmb/smberr.c */ - -char *smb_errstr (char *inbuf); - -/* The following definitions come from param/loadparm.c */ - -char *lp_logfile (void); -char *lp_configfile (void); -char *lp_smb_passwd_file (void); -char *lp_serverstring (void); -char *lp_printcapname (void); -char *lp_lockdir (void); -char *lp_rootdir (void); -char *lp_defaultservice (void); -char *lp_msg_command (void); -char *lp_hosts_equiv (void); -char *lp_auto_services (void); -char *lp_passwd_program (void); -char *lp_passwd_chat (void); -char *lp_passwordserver (void); -char *lp_name_resolve_order (void); -char *lp_workgroup (void); -char *lp_username_map (void); -char *lp_groupname_map (void); -char *lp_logon_script (void); -char *lp_logon_path (void); -char *lp_logon_drive (void); -char *lp_logon_home (void); -char *lp_remote_announce (void); -char *lp_remote_browse_sync (void); -char *lp_wins_server (void); -char *lp_interfaces (void); -char *lp_socket_address (void); -char *lp_nis_home_map_name (void); -char *lp_netbios_aliases (void); -char *lp_driverfile (void); -char *lp_panic_action (void); -char *lp_adduser_script (void); -char *lp_deluser_script (void); -char *lp_domain_groups (void); -char *lp_domain_admin_group (void); -char *lp_domain_guest_group (void); -char *lp_domain_admin_users (void); -char *lp_domain_guest_users (void); -char *lp_ldap_server (void); -char *lp_ldap_suffix (void); -char *lp_ldap_filter (void); -char *lp_ldap_root (void); -char *lp_ldap_rootpasswd (void); -int lp_ssl_version (void); -char *lp_ssl_hosts (void); -char *lp_ssl_hosts_resign (void); -char *lp_ssl_cacertdir (void); -char *lp_ssl_cacertfile (void); -char *lp_ssl_cert (void); -char *lp_ssl_privkey (void); -char *lp_ssl_client_cert (void); -char *lp_ssl_client_privkey (void); -char *lp_ssl_ciphers (void); -BOOL lp_ssl_enabled (void); -BOOL lp_ssl_reqClientCert (void); -BOOL lp_ssl_reqServerCert (void); -BOOL lp_ssl_compatibility (void); -BOOL lp_dns_proxy (void); -BOOL lp_wins_support (void); -BOOL lp_we_are_a_wins_server (void); -BOOL lp_wins_proxy (void); -BOOL lp_local_master (void); -BOOL lp_domain_master (void); -BOOL lp_domain_logons (void); -BOOL lp_preferred_master (void); -BOOL lp_load_printers (void); -BOOL lp_use_rhosts (void); -BOOL lp_readprediction (void); -BOOL lp_readbmpx (void); -BOOL lp_readraw (void); -BOOL lp_writeraw (void); -BOOL lp_null_passwords (void); -BOOL lp_strip_dot (void); -BOOL lp_encrypted_passwords (void); -BOOL lp_update_encrypted (void); -BOOL lp_syslog_only (void); -BOOL lp_timestamp_logs (void); -BOOL lp_browse_list (void); -BOOL lp_unix_realname (void); -BOOL lp_nis_home_map (void); -BOOL lp_bind_interfaces_only (void); -BOOL lp_unix_password_sync (void); -BOOL lp_passwd_chat_debug (void); -BOOL lp_ole_locking_compat (void); -BOOL lp_nt_smb_support (void); -BOOL lp_nt_pipe_support (void); -BOOL lp_nt_acl_support (void); -BOOL lp_stat_cache (void); -BOOL lp_allow_trusted_domains (void); -BOOL lp_restrict_anonymous (void); -int lp_os_level (void); -int lp_max_ttl (void); -int lp_max_wins_ttl (void); -int lp_min_wins_ttl (void); -int lp_max_open_files (void); -int lp_maxxmit (void); -int lp_maxmux (void); -int lp_passwordlevel (void); -int lp_usernamelevel (void); -int lp_readsize (void); -int lp_shmem_size (void); -int lp_deadtime (void); -int lp_maxprotocol (void); -int lp_security (void); -int lp_maxdisksize (void); -int lp_lpqcachetime (void); -int lp_syslog (void); -int lp_client_code_page (void); -int lp_lm_announce (void); -int lp_lm_interval (void); -int lp_machine_password_timeout (void); -int lp_change_notify_timeout (void); -int lp_stat_cache_size (void); -int lp_map_to_guest (void); -int lp_min_passwd_length (void); -int lp_oplock_break_wait_time (void); -int lp_ldap_port (void); -char *lp_preexec (int); -char *lp_postexec (int); -char *lp_rootpreexec (int); -char *lp_rootpostexec (int); -char *lp_servicename (int); -char *lp_pathname (int); -char *lp_dontdescend (int); -char *lp_username (int); -char *lp_guestaccount (int); -char *lp_invalid_users (int); -char *lp_valid_users (int); -char *lp_admin_users (int); -char *lp_printcommand (int); -char *lp_lpqcommand (int); -char *lp_lprmcommand (int); -char *lp_lppausecommand (int); -char *lp_lpresumecommand (int); -char *lp_queuepausecommand (int); -char *lp_queueresumecommand (int); -char *lp_printername (int); -char *lp_printerdriver (int); -char *lp_hostsallow (int); -char *lp_hostsdeny (int); -char *lp_magicscript (int); -char *lp_magicoutput (int); -char *lp_comment (int); -char *lp_force_user (int); -char *lp_force_group (int); -char *lp_readlist (int); -char *lp_writelist (int); -char *lp_fstype (int); -char *lp_mangled_map (int); -char *lp_veto_files (int); -char *lp_hide_files (int); -char *lp_veto_oplocks (int); -char *lp_driverlocation (int); -BOOL lp_revalidate (int); -BOOL lp_casesensitive (int); -BOOL lp_preservecase (int); -BOOL lp_shortpreservecase (int); -BOOL lp_casemangle (int); -BOOL lp_status (int); -BOOL lp_hide_dot_files (int); -BOOL lp_browseable (int); -BOOL lp_readonly (int); -BOOL lp_no_set_dir (int); -BOOL lp_guest_ok (int); -BOOL lp_guest_only (int); -BOOL lp_print_ok (int); -BOOL lp_postscript (int); -BOOL lp_map_hidden (int); -BOOL lp_map_archive (int); -BOOL lp_locking (int); -BOOL lp_strict_locking (int); -BOOL lp_share_modes (int); -BOOL lp_oplocks (int); -BOOL lp_onlyuser (int); -BOOL lp_manglednames (int); -BOOL lp_widelinks (int); -BOOL lp_symlinks (int); -BOOL lp_syncalways (int); -BOOL lp_strict_sync (int); -BOOL lp_map_system (int); -BOOL lp_delete_readonly (int); -BOOL lp_fake_oplocks (int); -BOOL lp_recursive_veto_delete (int); -BOOL lp_dos_filetimes (int); -BOOL lp_dos_filetime_resolution (int); -BOOL lp_fake_dir_create_times (int); -BOOL lp_blocking_locks (int); -BOOL lp_mangle_locks (int); -int lp_create_mode (int); -int lp_force_create_mode (int); -int lp_dir_mode (int); -int lp_force_dir_mode (int); -int lp_max_connections (int); -int lp_defaultcase (int); -int lp_minprintspace (int); -int lp_printing (int); -int lp_oplock_contention_limit (int); -char lp_magicchar (int); -BOOL lp_add_home (const char *pszHomename, int iDefaultService, const char *pszHomedir); -int lp_add_service (char *pszService, int iDefaultService); -BOOL lp_add_printer (char *pszPrintername, int iDefaultService); -BOOL lp_file_list_changed (void); -void *lp_local_ptr (int snum, void *ptr); -BOOL lp_do_parameter (int snum, const char *pszParmName, const char *pszParmValue); -BOOL lp_is_default (int snum, struct parm_struct *parm); -struct parm_struct *lp_next_parameter (int snum, int *i, int allparameters); -BOOL lp_snum_ok (int iService); -void lp_add_one_printer (char *name, char *comment); -BOOL lp_loaded (void); -void lp_killunused (BOOL (*snumused) (int)); -BOOL lp_load (const char *pszFname, BOOL global_only, BOOL save_defaults, BOOL add_ipc); -void lp_resetnumservices (void); -int lp_numservices (void); -int lp_servicenumber (const char *pszServiceName); -char *volume_label (int snum); -int lp_default_server_announce (void); -int lp_major_announce_version (void); -int lp_minor_announce_version (void); -void lp_set_name_resolve_order (char *new_order); -void lp_set_kernel_oplocks (BOOL val); -BOOL lp_kernel_oplocks (void); - -/* The following definitions come from param/params.c */ - -BOOL pm_process (const char *FileName, - BOOL (*sfunc) (const char *), BOOL (*pfunc) (const char *, const char *)); -#endif /* _PROTO_H_ */ diff --git a/src/vfs/smbfs/helpers/include/smb.h b/src/vfs/smbfs/helpers/include/smb.h deleted file mode 100644 index 7200b6a70..000000000 --- a/src/vfs/smbfs/helpers/include/smb.h +++ /dev/null @@ -1,1745 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - SMB parameters and setup - */ -#ifndef _SMB_H -#define _SMB_H - -#define BUFFER_SIZE (0xFFFF) -#define SAFETY_MARGIN 1024 - -#define NMB_PORT 137 -#define DGRAM_PORT 138 -#define SMB_PORT 139 - -#define False (0) -#define True (1) -#define BOOLSTR(b) ((b) ? "Yes" : "No") -#define BITSETB(ptr,bit) ((((char *)ptr)[0] & (1<<(bit)))!=0) -#define BITSETW(ptr,bit) ((SVAL(ptr,0) & (1<<(bit)))!=0) - -#define IS_BITS_SET_ALL(var,bit) (((var)&(bit))==(bit)) -#define IS_BITS_SET_SOME(var,bit) (((var)&(bit))!=0) -#define IS_BITS_CLR_ALL(var,bit) (((var)&(bit))==0) - -#define PTR_DIFF(p1,p2) ((ptrdiff_t)(((const char *)(p1)) - (const char *)(p2))) - -typedef int BOOL; - -/* limiting size of ipc replies */ -#define REALLOC(ptr,size) Realloc(ptr,MAX((size),4*1024)) - -#define SIZEOFWORD 2 - -#ifndef DEF_CREATE_MASK -#define DEF_CREATE_MASK (0755) -#endif - -/* how long to wait for secondary SMB packets (milli-seconds) */ -#define SMB_SECONDARY_WAIT (60*1000) - -/* -------------------------------------------------------------------------- ** - * Debugging code. See also debug.c - */ - -/* mkproto.awk has trouble with ifdef'd function definitions (it ignores - * the #ifdef directive and will read both definitions, thus creating two - * diffferent prototype declarations), so we must do these by hand. - */ -/* I know the __attribute__ stuff is ugly, but it does ensure we get the - arguments to DEBUG() right. We have got them wrong too often in the - past */ -#ifdef HAVE_STDARG_H -int -Debug1 (const char *, ...) -#ifdef __GNUC__ - __attribute__ ((format (printf, 1, 2))) -#endif - ; - BOOL dbgtext (const char *, ...) -#ifdef __GNUC__ - __attribute__ ((format (printf, 1, 2))) -#endif - ; -#else -int Debug1 (); -BOOL dbgtext (); -#endif - -/* If we have these macros, we can add additional info to the header. */ -#ifdef HAVE_FILE_MACRO -#define FILE_MACRO (__FILE__) -#else -#define FILE_MACRO ("") -#endif - -#ifdef HAVE_FUNCTION_MACRO -#define FUNCTION_MACRO (__FUNCTION__) -#else -#define FUNCTION_MACRO ("") -#endif - -/* Debugging macros. - * DEBUGLVL() - If level is <= the system-wide DEBUGLEVEL then generate a - * header using the default macros for file, line, and - * function name. - * Returns True if the debug level was <= DEBUGLEVEL. - * Example usage: - * if( DEBUGLVL( 2 ) ) - * dbgtext( "Some text.\n" ); - * DEGUG() - Good old DEBUG(). Each call to DEBUG() will generate a new - * header *unless* the previous debug output was unterminated - * (i.e., no '\n'). See debug.c:dbghdr() for more info. - * Example usage: - * DEBUG( 2, ("Some text.\n") ); - * DEBUGADD() - If level <= DEBUGLEVEL, then the text is appended to the - * current message (i.e., no header). - * Usage: - * DEBUGADD( 2, ("Some additional text.\n") ); - */ -#define DEBUGLVL( level ) \ - ( (DEBUGLEVEL >= (level)) \ - && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) - -#if 0 - -#define DEBUG( level, body ) \ - ( ( DEBUGLEVEL >= (level) \ - && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) \ - ? (void)(dbgtext body) : (void)0 ) - -#define DEBUGADD( level, body ) \ - ( (DEBUGLEVEL >= (level)) ? (void)(dbgtext body) : (void)0 ) - -#else - -#define DEBUG( level, body ) \ - (void)( (DEBUGLEVEL >= (level)) \ - && (dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) )) \ - && (dbgtext body) ) - -#define DEBUGADD( level, body ) \ - (void)( (DEBUGLEVEL >= (level)) && (dbgtext body) ) - -#endif - -/* End Debugging code section. - * -------------------------------------------------------------------------- ** - */ - -/* this defines the error codes that receive_smb can put in smb_read_error */ -#define READ_TIMEOUT 1 -#define READ_EOF 2 -#define READ_ERROR 3 - - -#define DIR_STRUCT_SIZE 43 - -/* these define all the command types recognised by the server - there - are lots of gaps so probably there are some rare commands that are not - implemented */ - -#define pSETDIR '\377' - -/* these define the attribute byte as seen by DOS */ -#define aRONLY (1L<<0) -#define aHIDDEN (1L<<1) -#define aSYSTEM (1L<<2) -#define aVOLID (1L<<3) -#define aDIR (1L<<4) -#define aARCH (1L<<5) - -/* for readability... */ -#define IS_DOS_READONLY(test_mode) (((test_mode) & aRONLY) != 0) -#define IS_DOS_DIR(test_mode) (((test_mode) & aDIR) != 0) -#define IS_DOS_ARCHIVE(test_mode) (((test_mode) & aARCH) != 0) -#define IS_DOS_SYSTEM(test_mode) (((test_mode) & aSYSTEM) != 0) -#define IS_DOS_HIDDEN(test_mode) (((test_mode) & aHIDDEN) != 0) - -/* deny modes */ -#define DENY_DOS 0 -#define DENY_ALL 1 -#define DENY_WRITE 2 -#define DENY_READ 3 -#define DENY_NONE 4 -#define DENY_FCB 7 - -/* open modes */ -#define DOS_OPEN_RDONLY 0 -#define DOS_OPEN_WRONLY 1 -#define DOS_OPEN_RDWR 2 -#define DOS_OPEN_FCB 0xF - -/* define shifts and masks for share and open modes. */ -#define OPEN_MODE_MASK 0xF -#define SHARE_MODE_SHIFT 4 -#define SHARE_MODE_MASK 0x7 -#define GET_OPEN_MODE(x) ((x) & OPEN_MODE_MASK) -#define SET_OPEN_MODE(x) ((x) & OPEN_MODE_MASK) -#define GET_DENY_MODE(x) (((x)>>SHARE_MODE_SHIFT) & SHARE_MODE_MASK) -#define SET_DENY_MODE(x) ((x)<