diff options
author | cvs2svn Import User <samba-bugs@samba.org> | 1997-07-01 01:19:14 +0000 |
---|---|---|
committer | cvs2svn Import User <samba-bugs@samba.org> | 1997-07-01 01:19:14 +0000 |
commit | ad00237aafd5f68c89df5da4bae7f98b95741200 (patch) | |
tree | c163ab405805300cac2da0c6d20f72e45253d6e1 /source/include | |
parent | 1c6e433caa22813a699c9766847886eb59755f8b (diff) | |
download | samba-misc-tags/pre_luke_stuffup_1.tar.gz samba-misc-tags/pre_luke_stuffup_1.tar.xz samba-misc-tags/pre_luke_stuffup_1.zip |
This commit was manufactured by cvs2svn to create tagsamba-misc-tags/pre_luke_stuffup_1
'pre_luke_stuffup_1'.
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/byteorder.h | 144 | ||||
-rw-r--r-- | source/include/charset.h | 65 | ||||
-rw-r--r-- | source/include/clitar.h | 17 | ||||
-rw-r--r-- | source/include/includes.h | 1256 | ||||
-rw-r--r-- | source/include/kanji.h | 130 | ||||
-rw-r--r-- | source/include/local.h | 162 | ||||
-rw-r--r-- | source/include/nameserv.h | 429 | ||||
-rw-r--r-- | source/include/trans2.h | 246 | ||||
-rw-r--r-- | source/include/version.h | 1 | ||||
-rw-r--r-- | source/include/vt_mode.h | 48 |
10 files changed, 0 insertions, 2498 deletions
diff --git a/source/include/byteorder.h b/source/include/byteorder.h deleted file mode 100644 index a55789a4036..00000000000 --- a/source/include/byteorder.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - SMB Byte handling - Copyright (C) Andrew Tridgell 1992-1997 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -/* - 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 -RIVAL(buf,pos) - like IVAL() 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 - -it also defines lots of intermediate macros, just ignore those :-) - -*/ - -#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 -/* 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 -*/ -#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))) -#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 - - -/* 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 RIVAL(buf,pos) IREV(IVAL(buf,pos)) -#define RSSVAL(buf,pos,val) SSVAL(buf,pos,SREV(val)) -#define RSIVAL(buf,pos,val) SIVAL(buf,pos,IREV(val)) diff --git a/source/include/charset.h b/source/include/charset.h deleted file mode 100644 index 25544fb6215..00000000000 --- a/source/include/charset.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - Character set handling - Copyright (C) Andrew Tridgell 1992-1997 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef CHARSET_C - -extern char *dos_char_map; -extern char *upper_char_map; -extern char *lower_char_map; -extern void add_char_string(char *s); -extern void charset_initialise(int); - -#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 - diff --git a/source/include/clitar.h b/source/include/clitar.h deleted file mode 100644 index 2305fceeec7..00000000000 --- a/source/include/clitar.h +++ /dev/null @@ -1,17 +0,0 @@ - -#define TBLOCK 512 -#define NAMSIZ 100 -union hblock { - char dummy[TBLOCK]; - struct header { - char name[NAMSIZ]; - char mode[8]; - char uid[8]; - char gid[8]; - char size[12]; - char mtime[12]; - char chksum[8]; - char linkflag; - char linkname[NAMSIZ]; - } dbuf; -}; diff --git a/source/include/includes.h b/source/include/includes.h deleted file mode 100644 index 7403fc4b641..00000000000 --- a/source/include/includes.h +++ /dev/null @@ -1,1256 +0,0 @@ -#ifndef _INCLUDES_H -#define _INCLUDES_H -/* - Unix SMB/Netbios implementation. - Version 1.9. - Machine customisation and include handling - Copyright (C) Andrew Tridgell 1994-1997 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -/* - This file does all the #includes's. This makes it easier to - port to a new unix. Hopefully a port will only have to edit the Makefile - and add a section for the new unix below. -*/ - - -/* the first OS dependent section is to setup what includes will be used. - the main OS dependent section comes later on -*/ - -#ifdef ALTOS -#define NO_UTIMEH -#endif - -#ifdef MIPS -#define POSIX_H -#define NO_UTIMEH -#endif - -#ifdef sun386 -#define NO_UTIMEH -#endif - -#ifdef NEXT2 -#define NO_UTIMEH -#endif - -#ifdef NEXT3_0 -#define NO_UTIMEH -#define NO_UNISTDH -#endif - -#ifdef APOLLO -#define NO_UTIMEH -#define NO_SYSMOUNTH -#define NO_UNISTDH -#endif - -#ifdef AIX -#define NO_SYSMOUNTH -#endif - -#ifdef M88K_R3 -#define SVR3H -#define NO_RESOURCEH -#endif - -#ifdef DNIX -#define NO_SYSMOUNTH -#define NO_NETIFH -#define NO_RESOURCEH -#define PRIME_NMBD 0 -#define NO_SETGROUPS -#endif - - -#ifdef ISC -#define SYSSTREAMH -#define NO_RESOURCEH -#endif - -#ifdef QNX -#define NO_RESOURCEH -#define NO_SYSMOUNTH -#define USE_MMAP 1 -#ifdef __386__ - #define __i386__ -#endif -#endif - -#ifdef NEWS42 -#define NO_UTIMEH -#define NO_STRFTIME -#define NO_UTIMBUF -#define REPLACE_MKTIME -#define NO_TM_NAME -#endif - -#ifdef OS2 -#define NO_SYSMOUNTH -#define NO_NETIFH -#endif - -#ifdef LYNX -#define NO_SYSMOUNTH -#endif - - -#if (defined(SHADOW_PWD)||defined(OSF1_ENH_SEC)||defined(SecureWare)||defined(PWDAUTH)) -#define PASSWORD_LENGTH 16 -#endif - -/* here is the general includes section - with some ifdefs generated - by the previous section -*/ -#include "local.h" -#include <stdio.h> -#ifdef POSIX_STDLIBH -#include <posix/stdlib.h> -#else -#include <stdlib.h> -#endif -#include <ctype.h> -#include <time.h> -#ifndef NO_UTIMEH -#include <utime.h> -#endif -#include <sys/types.h> - -#ifdef SVR3H -#include <sys/statfs.h> -#include <sys/stream.h> -#include <netinet/types.h> -#include <netinet/ether.h> -#include <netinet/ip_if.h> -#endif - -#include <sys/socket.h> -#ifdef AXPROC -#include <termio.h> -#endif -#include <sys/ioctl.h> -#include <stddef.h> -#ifdef POSIX_H -#include <posix/utime.h> -#include <bsd/sys/time.h> -#include <bsd/netinet/in.h> -#else -#include <sys/time.h> -#include <netinet/in.h> -#endif -#include <netdb.h> -#include <signal.h> -#include <errno.h> -#include <sys/file.h> -#include <sys/stat.h> -#include <sys/param.h> -#include <grp.h> -#ifndef NO_RESOURCEH -#include <sys/resource.h> -#endif -#ifndef NO_SYSMOUNTH -#include <sys/mount.h> -#endif -#include <pwd.h> -#ifdef __STDC__ -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#ifndef NO_UNISTDH -#include <unistd.h> -#endif -#include <sys/wait.h> -#ifdef SYSSTREAMH -#include <sys/stream.h> -#endif -#ifndef NO_NETIFH -#ifdef POSIX_H -#include <bsd/net/if.h> -#else -#include <net/if.h> -#endif -#endif - -#if defined(GETPWANAM) -#include <sys/types.h> -#include <sys/label.h> -#include <sys/audit.h> -#include <pwdadj.h> -#endif - -#if defined(SHADOW_PWD) && !defined(NETBSD) && !defined(FreeBSD) && !defined(CONVEX) -#include <shadow.h> -#endif - -#ifdef SYSLOG -#include <syslog.h> -#endif - - - -/*************************************************************************** -Here come some platform specific sections -***************************************************************************/ - - -#ifdef LINUX -#include <arpa/inet.h> -#include <dirent.h> -#include <string.h> -#include <sys/vfs.h> -#include <netinet/in.h> -#ifndef NO_ASMSIGNALH -#include <asm/signal.h> -#endif -#define SIGNAL_CAST (__sighandler_t) -#define USE_GETCWD -#define USE_SETSID -#define HAVE_BZERO -#define HAVE_MEMMOVE -#define USE_SIGPROCMASK -#define USE_WAITPID -#if 0 -/* SETFS disabled until we can check on some bug reports */ -#if _LINUX_C_LIB_VERSION_MAJOR >= 5 -#define USE_SETFS -#endif -#endif -#ifdef SHADOW_PWD -#if _LINUX_C_LIB_VERSION_MAJOR < 5 -#ifndef crypt -#define crypt pw_encrypt -#endif -#endif -#endif -#endif - -#ifdef SUNOS4 -#define SIGNAL_CAST (void (*)(int)) -#include <netinet/tcp.h> -#include <dirent.h> -#include <sys/acct.h> -#include <sys/vfs.h> -#include <string.h> -#include <errno.h> -#include <sys/wait.h> -#include <signal.h> -/* #include <termios.h> */ -#ifdef sun386 -#define NO_STRFTIME -#define NO_UTIMBUF -#define mktime timelocal -typedef unsigned short mode_t; -#else -#include <utime.h> -#define NO_STRERROR -#endif -#ifndef REPLACE_GETPASS -#define REPLACE_GETPASS -#endif -#ifndef BSD_TERMIO -#define BSD_TERMIO -#endif -#ifndef USE_SIGPROCMASK -#define USE_SIGPROCMASK -#endif -#ifndef USE_WAITPID -#define USE_WAITPID -#endif -/* SunOS doesn't have POSIX atexit */ -#define atexit on_exit -#endif - - -#ifdef SUNOS5 -#include <fcntl.h> -#include <dirent.h> -#include <sys/acct.h> -#include <sys/statfs.h> -#include <sys/statvfs.h> -#include <sys/filio.h> -#include <sys/sockio.h> -#include <netinet/in_systm.h> -#include <netinet/tcp.h> -#include <netinet/ip.h> -#include <string.h> -#include <arpa/inet.h> -#include <rpcsvc/ypclnt.h> -#include <termios.h> -#ifndef USE_LIBDES -#include <crypt.h> -#endif /* USE_LIBDES */ -extern int gettimeofday (struct timeval *, void *); -extern int gethostname (char *name, int namelen); -extern int innetgr (const char *, const char *, const char *, const char *); -#define USE_SETVBUF -#define SIGNAL_CAST (void (*)(int)) -#ifndef SYSV -#define SYSV -#endif -#define USE_WAITPID -#define REPLACE_STRLEN -#define USE_STATVFS -#define USE_GETCWD -#define USE_SETSID -#define REPLACE_GETPASS -#define USE_SIGPROCMASK -#endif - - -#ifdef ULTRIX -#include <strings.h> -#include <nfs/nfs_clnt.h> -#include <nfs/vfs.h> -#include <netinet/tcp.h> -#ifdef ULTRIX_AUTH -#include <auth.h> -#endif -char *getwd(char *); -#define NOSTRDUP -#ifdef __STDC__ -#define SIGNAL_CAST (void(*)(int)) -#endif -#define USE_DIRECT -#define USE_WAITPID -#endif - -#ifdef SGI -#include <netinet/tcp.h> -#include <sys/statfs.h> -#include <string.h> -#include <signal.h> -#ifndef SYSV -#define SYSV -#endif -#define SIGNAL_CAST (void (*)()) -#define STATFS4 -#define USE_WAITPID -#define USE_DIRECT -#define USE_SETSID -#endif - -#ifdef SGI5 -#include <arpa/inet.h> -#include <netinet/tcp.h> -#include <sys/statvfs.h> -#include <string.h> -#include <signal.h> -#include <dirent.h> -#define USE_WAITPID -#define NETGROUP -#ifndef SYSV -#define SYSV -#endif -#define SIGNAL_CAST (void (*)()) -#define USE_STATVFS -#define USE_WAITPID -#define USE_SETSID -#endif - - -#ifdef MIPS -#include <bsd/net/soioctl.h> -#include <string.h> -#include <dirent.h> -#include <fcntl.h> -#include <sys/statfs.h> -#include <sys/wait.h> -#include <sys/termio.h> -#define SIGNAL_CAST (void (*)()) -typedef int mode_t; -extern struct group *getgrnam(); -extern struct passwd *getpwnam(); -#define STATFS4 -#define NO_STRERROR -#define REPLACE_STRSTR -#endif /* MIPS */ - - - -#ifdef DGUX -#include <string.h> -#include <dirent.h> -#include <sys/statfs.h> -#include <sys/statvfs.h> -#include <fcntl.h> -#include <termios.h> -#define SYSV -#define USE_WAITPID -#define SIGNAL_CAST (void (*)(int)) -#define STATFS4 -#define USE_GETCWD -#endif - - -#ifdef SVR4 -#include <string.h> -#include <sys/dir.h> -#include <dirent.h> -#include <sys/statfs.h> -#include <sys/statvfs.h> -#include <sys/vfs.h> -#include <sys/filio.h> -#include <fcntl.h> -#include <sys/sockio.h> -#include <netinet/tcp.h> -#include <stropts.h> -#include <termios.h> -#define SYSV -#define USE_WAITPID -#define SIGNAL_CAST (void (*)(int)) -#define USE_STATVFS -#define USE_GETCWD -#define USE_SETSID -#endif - - -#ifdef OSF1 -#include <termios.h> -#include <strings.h> -#include <dirent.h> -char *getwd(char *); -char *mktemp(char *); /* No standard include */ -#include <netinet/in.h> -#include <arpa/inet.h> /* both for inet_ntoa */ -#define SIGNAL_CAST ( void (*) (int) ) -#define STATFS3 -#define USE_F_FSIZE -#define USE_SETSID -#include <netinet/tcp.h> -#ifdef OSF1_ENH_SEC -#include <pwd.h> -#include <sys/types.h> -#include <sys/security.h> -#include <prot.h> -#include <unistd.h> -#define PASSWORD_LENGTH 16 -#define NEED_AUTH_PARAMETERS -#endif /* OSF1_ENH_SEC */ -#endif - - -#ifdef CLIX -#include <dirent.h> -#define SIGNAL_CAST (void (*)()) -#include <sys/fcntl.h> -#include <sys/statfs.h> -#include <string.h> -#define NO_EID -#define USE_WAITPID -#define STATFS4 -#define NO_FSYNC -#define USE_GETCWD -#define USE_SETSID -#define REPLACE_GETPASS -#define NO_GETRLIMIT -#endif /* CLIX */ - - - -#ifdef BSDI -#include <string.h> -#include <netinet/tcp.h> -#define SIGNAL_CAST (void (*)()) -#define USE_DIRECT -#endif - - -#ifdef NETBSD -#include <strings.h> -#include <netinet/tcp.h> -/* you may not need this */ -#define NO_GETSPNAM -#define SIGNAL_CAST (void (*)()) -#define USE_DIRECT -#define REPLACE_INNETGR -#endif - - - -#ifdef FreeBSD -#include <arpa/inet.h> -#include <strings.h> -#include <netinet/tcp.h> -#include <netinet/in_systm.h> -#include <netinet/ip.h> -#define SIGNAL_CAST (void (*)()) -#define USE_SETVBUF -#define USE_SETSID -#define USE_GETCWD -#define USE_WAITPID -#define USE_DIRECT -#define HAVE_MEMMOVE -#define HAVE_BZERO -#define HAVE_GETTIMEOFDAY -#define HAVE_PATHCONF -#define HAVE_GETGRNAM 1 -#endif - - - -#ifdef AIX -#include <strings.h> -#include <sys/dir.h> -#include <sys/select.h> -#include <dirent.h> -#include <sys/statfs.h> -#include <sys/vfs.h> -#include <sys/id.h> -#include <sys/priv.h> -#include <netinet/tcp.h> -#include <locale.h> -#define SYSV -#define USE_WAITPID -#define USE_SIGBLOCK -#define SIGNAL_CAST (void (*)()) -#define DEFAULT_PRINTING PRINT_AIX -/* we undef this because sys/param.h is broken in aix. uggh. */ -#undef MAXHOSTNAMELEN -#endif - - -#ifdef HPUX -#include <string.h> -#include <dirent.h> -#include <fcntl.h> -#include <sys/vfs.h> -#include <sys/types.h> -#include <sys/termios.h> -#include <netinet/tcp.h> -#ifdef HPUX_10_TRUSTED -#include <hpsecurity.h> -#include <prot.h> -#define NEED_AUTH_PARAMETERS -#endif -#define SIGNAL_CAST (void (*)(__harg)) -#define SELECT_CAST (int *) -#define SYSV -#define USE_WAITPID -#define WAIT3_CAST2 (int *) -#define USE_GETCWD -#define USE_SETSID -#define USE_SETRES -#define DEFAULT_PRINTING PRINT_HPUX -#define SIGCLD_IGNORE -#endif - - -#ifdef SEQUENT -#include <signal.h> -#include <string.h> -#include <dirent.h> -#include <sys/types.h> -#include <sys/statfs.h> -#include <sys/stat.h> -#include <sys/buf.h> -#include <sys/socket.h> -#include <unistd.h> -#include <fcntl.h> -#define SIGNAL_CAST (void (*)(int)) -#define USE_WAITPID -#define USE_GETCWD -#define NO_EID -#define STATFS4 -#define USE_DIRECT -#ifdef PTX4 -#undef USE_DIRECT -#endif -#endif - - - -#ifdef SEQUENT_PTX4 -#include <string.h> -#include <sys/dir.h> -#include <dirent.h> -#include <sys/statfs.h> -#include <sys/statvfs.h> -#include <sys/vfs.h> -#include <fcntl.h> -#include <sys/sockio.h> -#include <netinet/tcp.h> -#include <stropts.h> -#include <termios.h> -#define SYSV -#define USE_WAITPID -#define SIGNAL_CAST (void (*)(int)) -#define USE_STATVFS -#define USE_GETCWD -#ifndef seteuid -#define seteuid(uid) setreuid(-1,uid) -#endif -#ifndef setegid -#define setegid(gid) setregid(-1,gid) -#endif -#endif - - -#ifdef NEXT2 -#include <sys/types.h> -#include <strings.h> -#include <dirent.h> -#include <sys/vfs.h> -#define bzero(b,len) memset(b,0,len) -#define mode_t int -#define NO_UTIMBUF -#include <libc.h> -#define NOSTRDUP -#define USE_DIRECT -#define USE_WAITPID -#endif - - -#ifdef NEXT3_0 -#include <strings.h> -#include <sys/dir.h> -#include <sys/vfs.h> -#define bzero(b,len) memset(b,0,len) -#define NO_UTIMBUF -#include <libc.h> -#define NOSTRDUP -#define USE_DIRECT -#define mode_t int -#define GID_TYPE int -#define gid_t int -#define pid_t int -#define SIGNAL_CAST (void (*)(int)) -#define WAIT3_CAST1 (union wait *) -#define HAVE_GMTOFF -#endif - - - -#ifdef APOLLO -#include <string.h> -#include <fcntl.h> -#include <sys/statfs.h> -#define NO_UTIMBUF -#define USE_DIRECT -#define USE_GETCWD -#define SIGNAL_CAST (void (*)()) -#define HAVE_FCNTL_LOCK 0 -#define HAVE_GETTIMEOFDAY -#define STATFS4 -#endif - - - -#ifdef SCO -#include <sys/netinet/tcp.h> -#include <sys/netinet/in_systm.h> -#include <sys/netinet/ip.h> -#include <dirent.h> -#include <string.h> -#include <fcntl.h> -#include <sys/statfs.h> -#include <sys/stropts.h> -#include <limits.h> -#include <locale.h> -#ifdef EVEREST -#include <unistd.h> -#endif -#ifdef NETGROUP -#include <rpcsvc/ypclnt.h> -#endif -#ifdef SecureWare -#include <sys/security.h> -#include <sys/audit.h> -#include <prot.h> -#define crypt bigcrypt -#endif -#ifndef EVEREST - #define ftruncate(f,l) syscall(0x0a28,f,l) -#endif -#define SIGNAL_CAST (void (*)(int)) -#define USE_WAITPID -#define USE_GETCWD -#define USE_SETSID -#ifdef SCO3_2_2 -#define NO_EID -#else -#ifndef EVEREST -#define USE_IFREQ -#endif -#endif -#define STATFS4 -#define NO_FSYNC -#ifndef EVEREST -#define NO_INITGROUPS -#endif -#define HAVE_PATHCONF -#define NO_GETRLIMIT -#endif - - - -/* Definitions for RiscIX */ -#ifdef RiscIX -#define SIGNAL_CAST (void (*)(int)) -#include <sys/dirent.h> -#include <sys/acct.h> -#include <sys/vfs.h> -#include <string.h> -#include <utime.h> -#include <signal.h> -#define HAVE_GETTIMEOFDAY -#define NOSTRCASECMP -#define NOSTRDUP -#endif - - - -#ifdef ISC -#include <net/errno.h> -#include <string.h> -#include <sys/dir.h> -#include <dirent.h> -#include <sys/statfs.h> -#include <fcntl.h> -#include <sys/sioctl.h> -#include <stropts.h> -#include <limits.h> -#include <netinet/tcp.h> -#define FIONREAD FIORDCHK -#define SYSV -#define USE_WAITPID -#define SIGNAL_CAST (void (*)(int)) -#define USE_GETCWD -#define USE_SETSID -#define USE_IFREQ -#define NO_FTRUNCATE -#define STATFS4 -#define NO_FSYNC -#endif - - - -#ifdef AUX -#include <fstab.h> -#include <string.h> -#include <dirent.h> -#include <sys/vfs.h> -#include <fcntl.h> -#include <termios.h> -#define SYSV -#define USE_WAITPID -#define SIGNAL_CAST (void (*)(int)) -char *strdup (char *); -#define USE_GETCWD -#endif - - -#ifdef M88K_R3 -#include <string.h> -#include <dirent.h> -#include <fcntl.h> -#include <termios.h> -#define STATFS4 -#define SYSV -#define USE_WAITPID -#define SIGNAL_CAST (void (*)(int)) -char *strdup (char *); -#define USE_GETCWD -#define NO_FSYNC -#define NO_EID -#endif - - -#ifdef DNIX -#include <dirent.h> -#include <string.h> -#include <fcntl.h> -#include <sys/statfs.h> -#include <sys/stropts.h> -#define NO_GET_BROADCAST -#define USE_WAITPID -#define USE_GETCWD -#define USE_SETSID -#define STATFS4 -#define NO_EID -#define PF_INET AF_INET -#define NO_STRERROR -#define ftruncate(f,l) chsize(f,l) -#endif /* DNIX */ - -#ifdef CONVEX -#include <netinet/tcp.h> -#include <arpa/inet.h> -#include <dirent.h> -#include <string.h> -#include <sys/vfs.h> -#include <fcntl.h> -#define DONT_REINSTALL_SIG -#define USE_SIGBLOCK -#define USE_WAITPID -#define SIGNAL_CAST (_SigFunc_Ptr_t) -#define NO_GETSPNAM -#define HAVE_MEMMOVE -extern char *mktemp(char *); -extern int fsync(int); -extern int seteuid(uid_t); -extern int setgroups(int, int *); -extern int initgroups(char *, int); -extern int statfs(char *, struct statfs *); -extern int setegid(gid_t); -extern int getopt(int, char *const *, const char *); -extern int chroot(char *); -extern int gettimeofday(struct timeval *, struct timezone *); -extern int gethostname(char *, int); -extern char *crypt(char *, char *); -extern char *getpass(char *); -#endif - - -#ifdef CRAY -#define MAXPATHLEN 1024 -#include <dirent.h> -#include <string.h> -#include <fcntl.h> -#include <sys/statfs.h> -#define SIGNAL_CAST (void (*)(int)) -#define SIGCLD_IGNORE -#define HAVE_FCNTL_LOCK 1 -#define USE_SETSID -#define STATFS4 -#endif - - -#ifdef ALTOS -#include <unistd.h> -#include <string.h> -#include <dirent.h> -#include <sys/fcntl.h> -#include <sys/statfs.h> -#define const -#define uid_t int -#define gid_t int -#define mode_t int -#define ptrdiff_t int -#define HAVE_GETGRNAM 0 -#define NO_EID -#define NO_FSYNC -#define NO_FTRUNCATE -#define NO_GETRLIMIT -#define NO_INITGROUPS -#define NO_SELECT -#define NO_SETGROUPS -#define NO_STRERROR -#define NO_STRFTIME -#define NO_TM_NAME -#define NO_UTIMEH -#define NOSTRCASECMP -#define REPLACE_MKTIME -#define REPLACE_RENAME -#define REPLACE_STRSTR -#define STATFS4 -#define USE_GETCWD -#endif - -#ifdef QNX -#define STATFS4 -#include <sys/statfs.h> -#include <sys/select.h> -#include <signal.h> -#include <sys/dir.h> -#define SIGNAL_CAST (void (*)()) -#define USE_WAITPID -#define NO_INITGROUPS -#define NO_SETGROUPS -#define HAVE_TIMEZONE -#define USE_GETCWD -#define USE_SETSID -#define HAVE_FCNTL_LOCK 1 -#define DEFAULT_PRINTING PRINT_QNX -#endif - - -#ifdef NEWS42 -#include <string.h> -#include <dirent.h> -#include <sys/vfs.h> -#include <sys/timeb.h> -typedef int mode_t; -#endif - -#ifdef OS2 -#include <dirent.h> -#include <sys/statfs.h> -#include <string.h> -#include <limits.h> -#define SIGNAL_CAST (void (*)()) -#define HAVE_FCNTL_LOCK 0 -#define USE_WAITPID -#define NO_GET_BROADCAST -#define NO_EID -#define NO_SETGROUPS -#define NO_INITGROUPS -#define NO_CRYPT -#define NO_STATFS -#define NO_CHROOT -#define NO_CHOWN -#define strcasecmp stricmp -#define strncasecmp strnicmp -#endif - - -#ifdef LYNX -#define SIGNAL_CAST (void (*)()) -#define WAIT3_CAST1 (union wait *) -#define STATFS4 -#include <fcntl.h> -#include <resource.h> -#include <stat.h> -#include <string.h> -#include <dirent.h> -#include <sys/statfs.h> -#define USE_GETCWD -#define USE_GETSID -#endif - - -#ifdef BOS -#define SIGNAL_CAST (void (*)(int)) -#include <string.h> -#include <sys/dir.h> -#include <sys/select.h> -#include <dirent.h> -#include <fcntl.h> -#include <signal.h> -#include <sys/statfs.h> -#include <sys/bsdioctl.h> -#endif - -#ifdef AMIGA -#include <arpa/inet.h> -#include <dirent.h> -#include <string.h> -#include <netinet/tcp.h> -#include <sys/acct.h> -#include <sys/fcntl.h> -#include <sys/filio.h> -#include <sys/sockio.h> -#include <netinet/in_systm.h> -#include <netinet/ip.h> -#include <sys/termios.h> -#include <limits.h> -#include <sys/timeb.h> - -#define SIGNAL_CAST (void (*)(int)) -#define USE_GETCWD -#define HAVE_BZERO -#define HAVE_MEMMOVE -#define USE_SIGPROCMASK -#define USE_WAITPID -#define USE_DIRECT -#define USE_F_FSIZE -#define HAVE_FCNTL_LOCK 0 -#define HAVE_GETTIMEOFDAY -#define HAVE_PATHCONF - -#define HAVE_NO_PROC -#define NO_FORK_DEBUG -#define HAVE_FORK 0 -#define HAVE_VFORK 1 -#endif - - -/******************************************************************* -end of the platform specific sections -********************************************************************/ - -#if defined(USE_MMAP) || defined(FAST_SHARE_MODES) -#include <sys/mman.h> -#endif - -#ifdef SecureWare -#define NEED_AUTH_PARAMETERS -#endif - -#ifdef REPLACE_GETPASS -extern char *getsmbpass(char *); -#define getpass(s) getsmbpass(s) -#endif - -#ifdef REPLACE_INNETGR -#define innetgr(group,host,user,dom) InNetGr(group,host,user,dom) -#endif - -#ifndef FD_SETSIZE -#define FD_SETSIZE 255 -#endif - -#ifndef __STDC__ -#define const -#endif - -/* Now for some other grungy stuff */ -#ifdef NO_GETSPNAM -struct spwd { /* fake shadow password structure */ - char *sp_pwdp; -}; -#endif - -#ifndef HAVE_BZERO -#ifndef bzero -#define bzero(p,s) memset(p,0,s) -#endif -#endif - -#ifndef HAVE_MEMMOVE -#ifndef memmove -#define memmove(d,s,n) MemMove(d,s,n) -#endif -#endif - -#ifdef USE_DIRECT -#include <sys/dir.h> -#endif - -/* some unixes have ENOTTY instead of TIOCNOTTY */ -#ifndef TIOCNOTTY -#ifdef ENOTTY -#define TIOCNOTTY ENOTTY -#endif -#endif - -#ifndef SIGHUP -#define SIGHUP 1 -#endif - -/* if undefined then use bsd or sysv printing */ -#ifndef DEFAULT_PRINTING -#ifdef SYSV -#define DEFAULT_PRINTING PRINT_SYSV -#else -#define DEFAULT_PRINTING PRINT_BSD -#endif -#endif - - -#ifdef AFS_AUTH -#include <afs/stds.h> -#include <afs/kautils.h> -#endif - -#ifdef DFS_AUTH -#include <dce/dce_error.h> -#include <dce/sec_login.h> -#endif - -#ifdef NO_UTIMBUF -struct utimbuf { - time_t actime; - time_t modtime; -}; -#endif - -#ifdef NO_STRERROR -#ifndef strerror -extern char *sys_errlist[]; -#define strerror(i) sys_errlist[i] -#endif -#endif - -#ifndef perror -#define perror(m) printf("%s: %s\n",m,strerror(errno)) -#endif - -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 255 -#endif - -#include "version.h" -#include "smb.h" -#include "nameserv.h" -#include "proto.h" -#include "byteorder.h" - -#include "kanji.h" -#include "charset.h" - -#ifndef S_IFREG -#define S_IFREG 0100000 -#endif - -#ifndef S_ISREG -#define S_ISREG(x) ((S_IFREG & x)!=0) -#endif - -#ifndef S_ISDIR -#define S_ISDIR(x) ((S_IFDIR & x)!=0) -#endif - -#ifdef UFC_CRYPT -#define crypt ufc_crypt -#endif - -#ifdef REPLACE_STRLEN -#define strlen(s) Strlen(s) -#endif - -#ifdef REPLACE_STRSTR -#define strstr(s,p) Strstr(s,p) -#endif - -#ifdef REPLACE_MKTIME -#define mktime(t) Mktime(t) -#endif - -#ifndef NGROUPS_MAX -#define NGROUPS_MAX 128 -#endif - -#ifndef EDQUOT -#define EDQUOT ENOSPC -#endif - -#ifndef HAVE_GETGRNAM -#define HAVE_GETGRNAM 1 -#endif - -#ifndef SOL_TCP -#define SOL_TCP 6 -#endif - -/* default to using ftruncate workaround as this is safer than assuming -it works and getting lots of bug reports */ -#ifndef FTRUNCATE_CAN_EXTEND -#define FTRUNCATE_CAN_EXTEND 0 -#endif - -/* maybe this unix doesn't separate RD and WR locks? */ -#ifndef F_RDLCK -#define F_RDLCK F_WRLCK -#endif - -#ifndef ENOTSOCK -#define ENOTSOCK EINVAL -#endif - -#ifndef SIGCLD -#define SIGCLD SIGCHLD -#endif - -#ifndef MAP_FILE -#define MAP_FILE 0 -#endif - -#ifndef HAVE_FCNTL_LOCK -#define HAVE_FCNTL_LOCK 1 -#endif - -#ifndef WAIT3_CAST2 -#define WAIT3_CAST2 (struct rusage *) -#endif - -#ifndef WAIT3_CAST1 -#define WAIT3_CAST1 (int *) -#endif - -#ifndef QSORT_CAST -#define QSORT_CAST (int (*)()) -#endif - -/* this is a rough check to see if this machine has a lstat() call. - it is not guaranteed to work */ -#if !(defined(S_ISLNK) || defined(S_IFLNK)) -#define lstat stat -#endif - -/* Not all systems declare ERRNO in errno.h... and some systems #define it! */ -#ifndef errno -extern int errno; -#endif - - -#ifdef NO_EID -#define geteuid() getuid() -#define getegid() getgid() -#define seteuid(x) setuid(x) -#define setegid(x) setgid(x) -#endif - - -#if (HAVE_FCNTL_LOCK == 0) -/* since there is no locking available, system includes */ -/* for DomainOS 10.4 do not contain any of the following */ -/* #define's. So, to satisfy the compiler, add these */ -/* #define's, although they arn't really necessary. */ -#define F_GETLK 0 -#define F_SETLK 0 -#define F_WRLCK 0 -#define F_UNLCK 0 -#endif /* HAVE_FCNTL_LOCK == 0 */ - -#ifdef NOSTRCASECMP -#define strcasecmp(s1,s2) StrCaseCmp(s1,s2) -#define strncasecmp(s1,s2,n) StrnCaseCmp(s1,s2,n) -#endif - -#ifndef strcpy -#define strcpy(dest,src) StrCpy(dest,src) -#endif - - -/* possibly wrap the malloc calls */ -#if WRAP_MALLOC - -/* undo the old malloc def if necessary */ -#ifdef malloc -#define xx_old_malloc malloc -#undef malloc -#endif - -#define malloc(size) malloc_wrapped(size,__FILE__,__LINE__) - -/* undo the old realloc def if necessary */ -#ifdef realloc -#define xx_old_realloc realloc -#undef realloc -#endif - -#define realloc(ptr,size) realloc_wrapped(ptr,size,__FILE__,__LINE__) - -/* undo the old free def if necessary */ -#ifdef free -#define xx_old_free free -#undef free -#endif - -#define free(ptr) free_wrapped(ptr,__FILE__,__LINE__) - -/* and the malloc prototypes */ -void *malloc_wrapped(int,char *,int); -void *realloc_wrapped(void *,int,char *,int); -void free_wrapped(void *,char *,int); - -#endif - - -#if WRAP_MEMCPY -/* undo the old memcpy def if necessary */ -#ifdef memcpy -#define xx_old_memcpy memcpy -#undef memcpy -#endif - -#define memcpy(d,s,l) memcpy_wrapped(d,s,l,__FILE__,__LINE__) -void *memcpy_wrapped(void *d,void *s,int l,char *fname,int line); -#endif - -#endif diff --git a/source/include/kanji.h b/source/include/kanji.h deleted file mode 100644 index ee3ba7e09a6..00000000000 --- a/source/include/kanji.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - Kanji Extensions - Copyright (C) Andrew Tridgell 1992-1997 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - Adding for Japanese language by <fujita@ainix.isac.co.jp> 1994.9.5 - and extend coding system to EUC/SJIS/JIS/HEX at 1994.10.11 - and add all jis codes sequence at 1995.8.16 - Notes: Hexadecimal code by <ohki@gssm.otuka.tsukuba.ac.jp> -*/ -#ifndef _KANJI_H_ -#define _KANJI_H_ - -#ifdef KANJI - -/* 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)) - -#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') ) - -#else /* not _KANJI_C_ */ - -extern char* (*_dos_to_unix) (const char *str, BOOL overwrite); -extern char* (*_unix_to_dos) (const char *str, BOOL overwrite); - -#define unix_to_dos (*_unix_to_dos) -#define dos_to_unix (*_dos_to_unix) - -extern char *sj_strtok (char *s1, const char *s2); -extern char *sj_strchr (const char *s, int c); -extern char *sj_strrchr (const char *s, int c); -extern char *sj_strstr (const char *s1, const char *s2); - -#define strchr sj_strchr -#define strrchr sj_strrchr -#define strstr sj_strstr -#define strtok sj_strtok - -#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 - -int interpret_coding_system (char *str, int def); - -#else - -#define unix_to_dos(x,y) unix2dos_format(x,y) -#define dos_to_unix(x,y) dos2unix_format(x,y) - -#endif /* not KANJI */ - -#endif /* _KANJI_H_ */ diff --git a/source/include/local.h b/source/include/local.h deleted file mode 100644 index 01eac556525..00000000000 --- a/source/include/local.h +++ /dev/null @@ -1,162 +0,0 @@ -/* local definitions for file server */ -#ifndef _LOCAL_H -#define _LOCAL_H - -/* 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" - -/* This defines the name of the printcap file. It is MOST UNLIKELY that - this will change BUT! Specifying a file with the format of a printcap - file but containing only a subset of the printers actually in your real - printcap file is a quick-n-dirty way to allow dynamic access to a subset - of available printers. -*/ -#define PRINTCAP_NAME "/etc/printcap" - -/* set these to define the limits of the server. NOTE These are on a - per-client basis. Thus any one machine can't connect to more than - MAX_CONNECTIONS services, but any number of machines may connect at - one time. */ -#define MAX_CONNECTIONS 127 -#define MAX_OPEN_FILES 100 - -/* the max number of connections that the smbstatus program will show */ -#define MAXSTATUS 1000 - -/* 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 MAXDIR 64 - -#define WORDMAX 0xFFFF - - -/* separators for lists */ -#define LIST_SEP " \t,;:\n\r" - -#ifndef LOCKDIR -/* this should have been set in the Makefile */ -#define LOCKDIR "/tmp/samba" -#endif - -/* 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 type of filesystem do we want this to show up as in a NT file - manager window? */ -#define FSTYPE_STRING "Samba" - -/* 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 - -/* do you want session setups at user level security with a invalid - password to be rejected or allowed in as guest? WinNT rejects them - but it can be a pain as it means "net view" needs to use a password - - You have 3 choices: - - GUEST_SESSSETUP = 0 means session setups with an invalid password - are rejected. - - GUEST_SESSSETUP = 1 means session setups with an invalid password - are rejected, unless the username does not exist, in which case it - is treated as a guest login - - GUEST_SESSSETUP = 2 means session setups with an invalid password - are treated as a guest login - - Note that GUEST_SESSSETUP only has an effect in user or server - level security. - */ -#ifndef GUEST_SESSSETUP -#define GUEST_SESSSETUP 0 -#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 - -/* 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 (10) -#define SHARE_MODES_CHECK (10) -#define SHARE_MODES_CLEAN (300) -#define IDLE_CLOSED_TIMEOUT (60) -#define DPTR_IDLE_TIMEOUT (120) -#define SMBD_SELECT_LOOP (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 - -/* 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 - -#define SMB_ALIGNMENT 1 - - -/* shall we support browse requests via a FIFO to nmbd? */ -#define ENABLE_FIFO 1 - -/* keep the password server open, this uses up a aocket, but is needed - by many apps */ -#define KEEP_PASSWORD_SERVER_OPEN 1 - -/* how long to wait for a socket connect to happen */ -#define LONG_CONNECT_TIMEOUT 30 -#define SHORT_CONNECT_TIMEOUT 5 - - -/* the directory to sit in when idle */ -/* #define IDLE_DIR "/" */ - -#endif diff --git a/source/include/nameserv.h b/source/include/nameserv.h deleted file mode 100644 index ae59f952524..00000000000 --- a/source/include/nameserv.h +++ /dev/null @@ -1,429 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - NBT netbios header - version 2 - Copyright (C) Andrew Tridgell 1994-1997 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#define GET_TTL(ttl) ((ttl)?MIN(ttl,lp_max_ttl()):lp_max_ttl()) - -/* 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 - -#define NMB_QUERY 0x20 -#define NMB_STATUS 0x21 - -#define NMB_REG 0x05 /* see rfc1002.txt 4.2.2,3,5,6,7,8 */ -#define NMB_REG_REFRESH 0x09 /* see rfc1002.txt 4.2.4 */ -#define NMB_REL 0x06 /* see rfc1002.txt 4.2.9,10,11 */ -#define NMB_WAIT_ACK 0x07 /* see rfc1002.txt 4.2.16 */ -/* XXXX what about all the other types?? 0x1, 0x2, 0x3, 0x4, 0x8? */ - -#define FIND_SELF 0x01 -#define FIND_WINS 0x02 -#define FIND_LOCAL 0x04 - -/* 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_FLGMSK 0x60 - -#define REFRESH_TIME (15*60) -#define NAME_POLL_REFRESH_TIME (5*60) -#define NAME_POLL_INTERVAL 15 - -/* NetBIOS flag identifier */ -#define NAME_PERMANENT(p) ((p) & NB_PERM) -#define NAME_ACTIVE(p) ((p) & NB_ACTIVE) -#define NAME_CONFLICT(p) ((p) & NB_CONFL) -#define NAME_DEREG(p) ((p) & NB_DEREG) -#define NAME_GROUP(p) ((p) & NB_GROUP) - -#define NAME_BFLAG(p) (((p) & NB_FLGMSK) == NB_BFLAG) -#define NAME_PFLAG(p) (((p) & NB_FLGMSK) == NB_PFLAG) -#define NAME_MFLAG(p) (((p) & NB_FLGMSK) == NB_MFLAG) -#define NAME_HFLAG(p) (((p) & NB_FLGMSK) == NB_HFLAG) - -/* server type identifiers */ -#define AM_MASTER(work) (work->ServerType & SV_TYPE_MASTER_BROWSER) -#define AM_BACKUP(work) (work->ServerType & SV_TYPE_BACKUP_BROWSER) -#define AM_DOMMST(work) (work->ServerType & SV_TYPE_DOMAIN_MASTER) -#define AM_DOMMEM(work) (work->ServerType & SV_TYPE_DOMAIN_MEMBER) - -/* microsoft browser NetBIOS name */ -#define MSBROWSE "\001\002__MSBROWSE__\002" - -/* mail slots */ -#define BROWSE_MAILSLOT "\\MAILSLOT\\BROWSE" -#define NET_LOGON_MAILSLOT "\\MAILSLOT\\NET\\NETLOGON" - -enum name_source {STATUS_QUERY, LMHOSTS, REGISTER, SELF, DNS, DNSFAIL}; -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_POTENTIAL, - MST_BACK, - MST_MSB, - MST_BROWSER -}; - -enum domain_state -{ - DOMAIN_NONE, - DOMAIN_WAIT, - DOMAIN_MST -}; - -enum logon_state -{ - LOGON_NONE, - LOGON_WAIT, - LOGON_SRV -}; - -enum state_type -{ - NAME_STATUS_DOM_SRV_CHK, - NAME_STATUS_SRV_CHK, - NAME_REGISTER_CHALLENGE, - NAME_REGISTER, - NAME_RELEASE, - NAME_QUERY_CONFIRM, - NAME_QUERY_ANNOUNCE_HOST, - NAME_QUERY_SYNC_LOCAL, - NAME_QUERY_SYNC_REMOTE, - NAME_QUERY_DOM_SRV_CHK, - NAME_QUERY_SRV_CHK, - NAME_QUERY_FIND_MST, - NAME_QUERY_MST_CHK, - NAME_QUERY_DOMAIN -}; - -/* a netbios name structure */ -struct nmb_name { - char name[17]; - char scope[64]; - int name_type; -}; - -/* a netbios flags + ip address structure */ -/* this is used for multi-homed systems and for internet group names */ -struct nmb_ip -{ - struct in_addr ip; /* ip address of host that owns this name */ - uint16 nb_flags; /* netbios flags */ -}; - -/* this is the structure used for the local netbios name list */ -struct name_record -{ - struct name_record *next; - struct name_record *prev; - - struct nmb_name name; /* the netbios name */ - struct nmb_ip *ip_flgs; /* the ip + flags */ - int num_ips; /* number of ip+flags entries */ - - enum name_source source; /* where the name came from */ - - time_t death_time; /* time record must be removed (do not remove if 0) */ - time_t refresh_time; /* time record should be refreshed */ -}; - -struct subnet_record; - -/* browse and backup server cache for synchronising browse list */ -struct browse_cache_record -{ - struct browse_cache_record *next; - struct browse_cache_record *prev; - - pstring name; - int type; - pstring group; - struct in_addr ip; - time_t sync_time; - BOOL synced; - BOOL local; - struct subnet_record *subnet; -}; - -/* 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 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 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 */ - int ServerType; - - /* announce info */ - time_t lastannounce_time; - int announce_interval; - BOOL needannounce; - - - /* election info */ - BOOL RunningElection; - BOOL needelection; - int ElectionCount; - uint32 ElectionCriterion; -}; - -/* initiated name queries recorded in this list to track any responses... */ -/* sadly, we need to group everything together. i suppose that if this - gets unwieldy, then a union ought to be considered. oh for c++... */ -struct response_record -{ - struct response_record *next; - struct response_record *prev; - - uint16 response_id; - enum state_type state; - - int fd; - int quest_type; - struct nmb_name name; - int nb_flags; - time_t ttl; - - int server_type; - fstring my_name; - fstring my_comment; - - BOOL bcast; - BOOL recurse; - struct in_addr send_ip; - struct in_addr reply_to_ip; - - int num_msgs; - - time_t repeat_time; - time_t repeat_interval; - int repeat_count; -}; - -/* a subnet structure. it contains a list of workgroups and netbios names*/ - -/* note that a subnet of 255.255.255.255 contains all the WINS netbios names. - all communication from such nodes are on a non-broadcast basis: they - are point-to-point (P nodes) or mixed point-to-point and broadcast - (M nodes). M nodes use point-to-point as a preference, and will use - broadcasting for certain activities, or will resort to broadcasting as a - last resort, if the WINS server fails (users of wfwg will notice that their - machine often freezes for 30 seconds at a time intermittently, if the WINS - server is down). - - 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, INCLUDING the WINS one (with an ip "address", so called, - of 255.255.255.255) - - there is a separate response list for each subnet record. in the case of - the 255.255.255.255 subnet record (WINS), the WINS server will be able to - use this to poll (infrequently!) each of its entries, to ensure that the - names are still in use. - XXXX this polling is a planned feature for a really over-cautious WINS server -*/ - -struct subnet_record -{ - struct subnet_record *next; - struct subnet_record *prev; - - struct work_record *workgrouplist; /* list of workgroups */ - struct name_record *namelist; /* list of netbios names */ - struct response_record *responselist; /* list of responses expected */ - - struct in_addr bcast_ip; - struct in_addr mask_ip; - struct in_addr myip; -}; - -/* 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]; -}; - -/* define a 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; - 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; -}; - - -/* 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 - -/* do all remote announcements this often */ -#define REMOTE_ANNOUNCE_INTERVAL 180 - -#define DFLT_SERVER_TYPE (SV_TYPE_WORKSTATION | SV_TYPE_SERVER | \ - (lp_time_server() ? SV_TYPE_TIME_SOURCE : 0) | \ - SV_TYPE_SERVER_UNIX | \ - SV_TYPE_PRINTQ_SERVER | SV_TYPE_SERVER_NT | \ - SV_TYPE_NT ) - -/* Macro's to enumerate subnets either with or without - the WINS subnet. */ - -extern struct subnet_record *subnetlist; -extern struct subnet_record *wins_subnet; - -#define FIRST_SUBNET subnetlist -#define NEXT_SUBNET_EXCLUDING_WINS(x) ((x)->next) -#define NEXT_SUBNET_INCLUDING_WINS(x) ( ((x) == wins_subnet) ? NULL : \ - (((x)->next == NULL) ? wins_subnet : \ - (x)->next)) - diff --git a/source/include/trans2.h b/source/include/trans2.h deleted file mode 100644 index 70285358bc4..00000000000 --- a/source/include/trans2.h +++ /dev/null @@ -1,246 +0,0 @@ -/* - Unix SMB/Netbios implementation. - Version 1.9. - SMB transaction2 handling - Copyright (C) Jeremy Allison 1994-1997 - - Extensively modified by Andrew Tridgell, 1995 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef _TRANS2_H_ -#define _TRANS2_H_ - -/* Define the structures needed for the trans2 calls. */ - -/******************************************************* - For DosFindFirst/DosFindNext - level 1 - -MAXFILENAMELEN = 255; -FDATE == uint16 -FTIME == uint16 -ULONG == uint32 -USHORT == uint16 - -typedef struct _FILEFINDBUF { -Byte offset Type name description --------------+-------+-------------------+-------------- -0 FDATE fdateCreation; -2 FTIME ftimeCreation; -4 FDATE fdateLastAccess; -6 FTIME ftimeLastAccess; -8 FDATE fdateLastWrite; -10 FTIME ftimeLastWrite; -12 ULONG cbFile file length in bytes -16 ULONG cbFileAlloc size of file allocation unit -20 USHORT attrFile -22 UCHAR cchName length of name to follow (not including zero) -23 UCHAR achName[MAXFILENAMELEN]; Null terminated name -} FILEFINDBUF; -*********************************************************/ - -#define l1_fdateCreation 0 -#define l1_fdateLastAccess 4 -#define l1_fdateLastWrite 8 -#define l1_cbFile 12 -#define l1_cbFileAlloc 16 -#define l1_attrFile 20 -#define l1_cchName 22 -#define l1_achName 23 - -/********************************************************** -For DosFindFirst/DosFindNext - level 2 - -typedef struct _FILEFINDBUF2 { -Byte offset Type name description --------------+-------+-------------------+-------------- -0 FDATE fdateCreation; -2 FTIME ftimeCreation; -4 FDATE fdateLastAccess; -6 FTIME ftimeLastAccess; -8 FDATE fdateLastWrite; -10 FTIME ftimeLastWrite; -12 ULONG cbFile file length in bytes -16 ULONG cbFileAlloc size of file allocation unit -20 USHORT attrFile -22 ULONG cbList Extended attribute list (always 0) -26 UCHAR cchName length of name to follow (not including zero) -27 UCHAR achName[MAXFILENAMELEN]; Null terminated name -} FILEFINDBUF2; -*************************************************************/ - -#define l2_fdateCreation 0 -#define l2_fdateLastAccess 4 -#define l2_fdateLastWrite 8 -#define l2_cbFile 12 -#define l2_cbFileAlloc 16 -#define l2_attrFile 20 -#define l2_cbList 22 -#define l2_cchName 26 -#define l2_achName 27 - - -/********************************************************** -For DosFindFirst/DosFindNext - level 260 - -typedef struct _FILEFINDBUF260 { -Byte offset Type name description --------------+-------+-------------------+-------------- -0 ULONG NextEntryOffset; -4 ULONG FileIndex; -8 LARGE_INTEGER CreationTime; -16 LARGE_INTEGER LastAccessTime; -24 LARGE_INTEGER LastWriteTime; -32 LARGE_INTEGER ChangeTime; -40 LARGE_INTEGER EndOfFile; -48 LARGE_INTEGER AllocationSize; -56 ULONG FileAttributes; -60 ULONG FileNameLength; -64 ULONG EaSize; -68 CHAR ShortNameLength; -70 UNICODE ShortName[12]; -94 UNICODE FileName[]; -*************************************************************/ - -#define l260_achName 94 - - -/********************************************************** -For DosQueryPathInfo/DosQueryFileInfo/DosSetPathInfo/ -DosSetFileInfo - level 1 - -typedef struct _FILESTATUS { -Byte offset Type name description --------------+-------+-------------------+-------------- -0 FDATE fdateCreation; -2 FTIME ftimeCreation; -4 FDATE fdateLastAccess; -6 FTIME ftimeLastAccess; -8 FDATE fdateLastWrite; -10 FTIME ftimeLastWrite; -12 ULONG cbFile file length in bytes -16 ULONG cbFileAlloc size of file allocation unit -20 USHORT attrFile -} FILESTATUS; -*************************************************************/ - -/* Use the l1_ defines from DosFindFirst */ - -/********************************************************** -For DosQueryPathInfo/DosQueryFileInfo/DosSetPathInfo/ -DosSetFileInfo - level 2 - -typedef struct _FILESTATUS2 { -Byte offset Type name description --------------+-------+-------------------+-------------- -0 FDATE fdateCreation; -2 FTIME ftimeCreation; -4 FDATE fdateLastAccess; -6 FTIME ftimeLastAccess; -8 FDATE fdateLastWrite; -10 FTIME ftimeLastWrite; -12 ULONG cbFile file length in bytes -16 ULONG cbFileAlloc size of file allocation unit -20 USHORT attrFile -22 ULONG cbList Length of EA's (0) -} FILESTATUS2; -*************************************************************/ - -/* Use the l2_ #defines from DosFindFirst */ - -/********************************************************** -For DosQFSInfo/DosSetFSInfo - level 1 - -typedef struct _FSALLOCATE { -Byte offset Type name description --------------+-------+-------------------+-------------- -0 ULONG idFileSystem id of file system -4 ULONG cSectorUnit number of sectors per allocation unit -8 ULONG cUnit number of allocation units -12 ULONG cUnitAvail Available allocation units -16 USHORT cbSector bytes per sector -} FSALLOCATE; -*************************************************************/ - -#define l1_idFileSystem 0 -#define l1_cSectorUnit 4 -#define l1_cUnit 8 -#define l1_cUnitAvail 12 -#define l1_cbSector 16 - -/********************************************************** -For DosQFSInfo/DosSetFSInfo - level 2 - -typedef struct _FSINFO { -Byte offset Type name description --------------+-------+-------------------+-------------- -0 FDATE vol_fdateCreation -2 FTIME vol_ftimeCreation -4 UCHAR vol_cch length of volume name (excluding NULL) -5 UCHAR vol_szVolLabel[12] volume name -} FSINFO; -*************************************************************/ - -#define SMB_QUERY_FS_LABEL_INFO 0x101 -#define SMB_QUERY_FS_VOLUME_INFO 0x102 -#define SMB_QUERY_FS_SIZE_INFO 0x103 -#define SMB_QUERY_FS_DEVICE_INFO 0x104 -#define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105 - - -#define l2_vol_fdateCreation 0 -#define l2_vol_cch 4 -#define l2_vol_szVolLabel 5 - - -#define SMB_QUERY_FILE_BASIC_INFO 0x101 -#define SMB_QUERY_FILE_STANDARD_INFO 0x102 -#define SMB_QUERY_FILE_EA_INFO 0x103 -#define SMB_QUERY_FILE_NAME_INFO 0x104 -#define SMB_QUERY_FILE_ALLOCATION_INFO 0x105 -#define SMB_QUERY_FILE_END_OF_FILEINFO 0x106 -#define SMB_QUERY_FILE_ALL_INFO 0x107 -#define SMB_QUERY_FILE_ALT_NAME_INFO 0x108 -#define SMB_QUERY_FILE_STREAM_INFO 0x109 - -#define SMB_FIND_FILE_DIRECTORY_INFO 0x101 -#define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102 -#define SMB_FIND_FILE_NAMES_INFO 0x103 -#define SMB_FIND_FILE_BOTH_DIRECTORY_INFO 0x104 - -#define SMB_SET_FILE_BASIC_INFO 0x101 -#define SMB_SET_FILE_DISPOSITION_INFO 0x102 -#define SMB_SET_FILE_ALLOCATION_INFO 0x103 -#define SMB_SET_FILE_END_OF_FILE_INFO 0x104 - -#define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName)) - -/* NT uses a FILE_ATTRIBUTE_NORMAL when no other attributes - are set. */ - -#define NT_FILE_ATTRIBUTE_NORMAL 0x80 - -/* Function prototypes */ - - -int reply_findnclose(char *inbuf,char *outbuf,int length,int bufsize); - -int reply_findclose(char *inbuf,char *outbuf,int length,int bufsize); - -#endif - - - diff --git a/source/include/version.h b/source/include/version.h deleted file mode 100644 index 37e26dd65ee..00000000000 --- a/source/include/version.h +++ /dev/null @@ -1 +0,0 @@ -#define VERSION "1.9.17alpha3" diff --git a/source/include/vt_mode.h b/source/include/vt_mode.h deleted file mode 100644 index 85b481122ee..00000000000 --- a/source/include/vt_mode.h +++ /dev/null @@ -1,48 +0,0 @@ -/* vt_mode.h */ -/* -support vtp-sessions - -written by Christian A. Lademann <cal@zls.com> -*/ - -/* -02.05.95:cal:ported to samba-1.9.13 -*/ - -#ifndef __vt_mode_h__ -# define __vt_mode_h__ - -# define VT_CLOSED 0 -# define VT_OPEN 1 - -# define MS_NONE 0 -# define MS_PTY 1 -# define MS_STREAM 2 -# define MS_VTY 3 - -# define VT_MAXREAD 32 - - -# undef EXTERN - -# ifndef __vt_mode_c__ -# define EXTERN extern -# define DEFAULT(v) -# else -# define EXTERN -# define DEFAULT(v) =(v) -# endif - - EXTERN int VT_Status DEFAULT(VT_CLOSED), - VT_Fd DEFAULT(-1), - VT_ChildPID DEFAULT(-1); - - EXTERN BOOL VT_Mode DEFAULT(False), - VT_ChildDied DEFAULT(False); - - EXTERN char *VT_Line DEFAULT(NULL); - -# undef EXTERN - - -#endif /* __vt_mode_h__ */ |