From ef2e26c91b80556af033d3335e55f5dfa6fff31d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Aug 2003 01:53:07 +0000 Subject: first public release of samba4 code (This used to be commit b0510b5428b3461aeb9bbe3cc95f62fc73e2b97f) --- source4/include/includes.h | 1237 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1237 insertions(+) create mode 100644 source4/include/includes.h (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h new file mode 100644 index 0000000000..f369367d82 --- /dev/null +++ b/source4/include/includes.h @@ -0,0 +1,1237 @@ +#ifndef _INCLUDES_H +#define _INCLUDES_H +/* + Unix SMB/CIFS implementation. + Machine customisation and include handling + Copyright (C) Andrew Tridgell 1994-1998 + Copyright (C) 2002 by Martin Pool + + 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 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 + +#ifdef SUNOS4 +/* on SUNOS4 termios.h conflicts with sys/ioctl.h */ +#undef HAVE_TERMIOS_H +#endif + +#ifdef LINUX +#ifndef DEFAULT_PRINTING +#define DEFAULT_PRINTING PRINT_BSD +#endif +#ifndef PRINTCAP_NAME +#define PRINTCAP_NAME "/etc/printcap" +#endif +#endif + +#ifdef __GNUC__ +/** Use gcc attribute to check printf fns. a1 is the 1-based index of + * the parameter containing the format, and a2 the index of the first + * argument. **/ +#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) +#else +#define PRINTF_ATTRIBUTE(a1, a2) +#endif + +#ifdef __GNUC__ +/** gcc attribute used on function parameters so that it does not emit + * warnings about them being unused. **/ +# define UNUSED(param) param __attribute__ ((unused)) +#else +# define UNUSED(param) param +/** Feel free to add definitions for other compilers here. */ +#endif + +#ifdef RELIANTUNIX +/* + * has to be included before any other to get + * large file support on Reliant UNIX. Yes, it's broken :-). + */ +#ifdef HAVE_UNISTD_H +#include +#endif +#endif /* RELIANTUNIX */ + +#include + +#ifdef TIME_WITH_SYS_TIME +#include +#include +#else +#ifdef HAVE_SYS_TIME_H +#include +#else +#include +#endif +#endif + +#ifdef HAVE_SYS_RESOURCE_H +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + +#include +#include + +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +#ifdef HAVE_STDLIB_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#ifdef HAVE_UNIXSOCKET +#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 HAVE_MALLOC_H +#include +#endif + +#ifdef HAVE_FCNTL_H +#include +#else +#ifdef HAVE_SYS_FCNTL_H +#include +#endif +#endif + +#include + +#ifdef HAVE_LIMITS_H +#include +#endif + +#ifdef HAVE_SYS_IOCTL_H +#include +#endif + +#ifdef HAVE_SYS_FILIO_H +#include +#endif + +#include + +#ifdef HAVE_SYS_WAIT_H +#include +#endif +#ifdef HAVE_CTYPE_H +#include +#endif +#ifdef HAVE_GRP_H +#include +#endif +#ifdef HAVE_SYS_PRIV_H +#include +#endif +#ifdef HAVE_SYS_ID_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 + +#ifdef HAVE_SYSLOG_H +#include +#else +#ifdef HAVE_SYS_SYSLOG_H +#include +#endif +#endif + +#include + +#ifdef HAVE_NETINET_TCP_H +#include +#endif + +/* + * The next three defines are needed to access the IPTOS_* options + * on some systems. + */ + +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif + +#ifdef HAVE_NETINET_IN_IP_H +#include +#endif + +#ifdef HAVE_NETINET_IP_H +#include +#endif + +#if defined(HAVE_TERMIOS_H) +/* POSIX terminal handling. */ +#include +#elif defined(HAVE_TERMIO_H) +/* Older SYSV terminal handling - don't use if we can avoid it. */ +#include +#elif defined(HAVE_SYS_TERMIO_H) +/* Older SYSV terminal handling - don't use if we can avoid it. */ +#include +#endif + +#if HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif +#endif + +#ifdef HAVE_SYS_MMAN_H +#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 + +#ifdef HAVE_SYS_CAPABILITY_H + +#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) +#define _I386_STATFS_H +#define BROKEN_REDHAT_7_STATFS_WORKAROUND +#endif + +#include + +#ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND +#undef _I386_STATFS_H +#undef BROKEN_REDHAT_7_STATFS_WORKAROUND +#endif + +#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 */ + +#if defined(HAVE_SYS_IPC_H) +#include +#endif /* HAVE_SYS_IPC_H */ + +#if defined(HAVE_SYS_SHM_H) +#include +#endif /* HAVE_SYS_SHM_H */ + +#ifdef HAVE_NATIVE_ICONV +#ifdef HAVE_ICONV +#include +#endif +#ifdef HAVE_GICONV +#include +#endif +#endif + +#if HAVE_KRB5_H +#include +#else +#undef HAVE_KRB5 +#endif + +#if HAVE_LBER_H +#include +#endif + +#if HAVE_LDAP_H +#include +#else +#undef HAVE_LDAP +#endif + +#if HAVE_GSSAPI_H +#include +#endif + +#if HAVE_GSSAPI_GSSAPI_H +#include +#endif + +#if HAVE_GSSAPI_GSSAPI_GENERIC_H +#include +#endif + +#if HAVE_COM_ERR_H +#include +#endif + +/* we support ADS if we want it and have krb5 and ldap libs */ +#if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) +#define HAVE_ADS +#endif + +/* + * Define VOLATILE if needed. + */ + +#if defined(HAVE_VOLATILE) +#define VOLATILE volatile +#else +#define VOLATILE +#endif + +/* + * Define additional missing types + */ +#if defined(HAVE_SIG_ATOMIC_T_TYPE) && defined(AIX) +typedef sig_atomic_t SIG_ATOMIC_T; +#elif defined(HAVE_SIG_ATOMIC_T_TYPE) && !defined(AIX) +typedef sig_atomic_t VOLATILE SIG_ATOMIC_T; +#else +typedef int VOLATILE SIG_ATOMIC_T; +#endif + +#ifndef HAVE_SOCKLEN_T_TYPE +typedef int socklen_t; +#endif + + +#ifndef uchar +#define uchar unsigned char +#endif + +#ifdef HAVE_UNSIGNED_CHAR +#define schar signed char +#else +#define schar char +#endif + +/* + 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 +#else +/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */ +#define int32 int +#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 +#else +/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */ +#define uint32 unsigned +#endif +#endif + +/* + * Types for devices, inodes and offsets. + */ + +#ifndef SMB_DEV_T +# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_DEV64_T) +# define SMB_DEV_T dev64_t +# else +# define SMB_DEV_T dev_t +# endif +#endif + +/* + * Setup the correctly sized inode type. + */ + +#ifndef SMB_INO_T +# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_INO64_T) +# define SMB_INO_T ino64_t +# else +# define SMB_INO_T ino_t +# endif +#endif + +#ifndef LARGE_SMB_INO_T +# if (defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_INO64_T)) || (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 +# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) +# define SMB_OFF_T off64_t +# else +# define SMB_OFF_T off_t +# endif +#endif + +/* this should really be a 64 bit type if possible */ +#define br_off SMB_BIG_UINT + +#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(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T)) || (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)) +#define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,(v)&0xFFFFFFFF), SIVAL(p,ofs,(v)>>32)) +#define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ))) +#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF)) | \ + (( ((SMB_BIG_UINT)(IVAL((buf),(off+4)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ) << 32 ) ) +#else +#define SOFF_T(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) +#define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,v),SIVAL(p,ofs,0)) +#define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((uint32)(IVAL((buf),(off)))) & 0xFFFFFFFF ))) +#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF)) | \ + (( ((SMB_BIG_UINT)(IVAL((buf),(off+4)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ) << 32 ) ) +#endif + +/* + * Type for stat structure. + */ + +#ifndef SMB_STRUCT_STAT +# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STAT64) && defined(HAVE_OFF64_T) +# define SMB_STRUCT_STAT struct stat64 +# else +# define SMB_STRUCT_STAT struct stat +# endif +#endif + +/* + * Type for dirent structure. + */ + +#ifndef SMB_STRUCT_DIRENT +# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_DIRENT64) +# define SMB_STRUCT_DIRENT struct dirent64 +# else +# define SMB_STRUCT_DIRENT struct dirent +# endif +#endif + +/* + * Defines for 64 bit fcntl locks. + */ + +#ifndef SMB_STRUCT_FLOCK +# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) +# define SMB_STRUCT_FLOCK struct flock64 +# else +# define SMB_STRUCT_FLOCK struct flock +# endif +#endif + +#ifndef SMB_F_SETLKW +# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) +# define SMB_F_SETLKW F_SETLKW64 +# else +# define SMB_F_SETLKW F_SETLKW +# endif +#endif + +#ifndef SMB_F_SETLK +# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) +# define SMB_F_SETLK F_SETLK64 +# else +# define SMB_F_SETLK F_SETLK +# endif +#endif + +#ifndef SMB_F_GETLK +# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) +# define SMB_F_GETLK F_GETLK64 +# else +# define SMB_F_GETLK F_GETLK +# endif +#endif + +#if defined(HAVE_LONGLONG) +#define SMB_BIG_UINT unsigned long long +#define SMB_BIG_INT long long +#define SBVAL(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) +#define BVAL(p, ofs) (IVAL(p,ofs) | (((SMB_BIG_UINT)IVAL(p,(ofs)+4)) << 32)) +#else +#define SMB_BIG_UINT unsigned long +#define SMB_BIG_INT long +#define SBVAL(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) +#define BVAL(p, ofs) IVAL(p,ofs) +#endif + +#define SMB_BIG_UINT_BITS (sizeof(SMB_BIG_UINT)*8) + +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + +#ifndef MAX +#define MAX(a,b) ((a)>(b)?(a):(b)) +#endif + +#ifndef HAVE_STRERROR +extern char *sys_errlist[]; +#define strerror(i) sys_errlist[i] +#endif + +#ifndef HAVE_ERRNO_DECL +extern int errno; +#endif + +#ifdef HAVE_BROKEN_GETGROUPS +#define GID_T int +#else +#define GID_T gid_t +#endif + +#ifndef NGROUPS_MAX +#define NGROUPS_MAX 32 /* Guess... */ +#endif + +/* Our own pstrings and fstrings */ +#include "pstring.h" + +/* Lists, trees, caching, database... */ +#include "xfile.h" +#include "intl.h" +#include "dlinklist.h" +#include "../tdb/tdb.h" +#include "../tdb/spinlock.h" +#include "../tdb/tdbutil.h" +#include "talloc.h" +#include "nt_status.h" +#include "ads.h" +#include "interfaces.h" +#include "trans2.h" +#include "ioctl.h" +#include "nterr.h" +#include "messages.h" +#include "charset.h" +#include "dynconfig.h" +#include "adt_tree.h" + +#include "util_getent.h" + +#include "version.h" +#include "smb.h" +#include "nameserv.h" +#include "secrets.h" + +#include "byteorder.h" + +#include "ntdomain.h" + +#include "msdfs.h" + +#include "mapping.h" + +#include "rap.h" + +#include "md5.h" +#include "hmacmd5.h" + +#include "ntlmssp.h" + +#include "auth.h" + +#include "passdb.h" + +#include "sam.h" + +#include "session.h" + +#include "asn_1.h" + +#include "popt.h" + +#include "mangle.h" + +#include "nsswitch/winbind_client.h" + +#include "genparser.h" + +#include "mutex.h" + +/* + * Type for wide character dirent structure. + * Only d_name is defined by POSIX. + */ + +typedef struct smb_wdirent { + wpstring d_name; +} SMB_STRUCT_WDIRENT; + +/* + * Type for wide character passwd structure. + */ + +typedef struct smb_wpasswd { + wfstring pw_name; + char *pw_passwd; + uid_t pw_uid; + gid_t pw_gid; + wpstring pw_gecos; + wpstring pw_dir; + wpstring pw_shell; +} SMB_STRUCT_WPASSWD; + +/* used in net.c */ +struct functable { + const char *funcname; + int (*fn)(int argc, const char **argv); +}; + + +/* Defines for wisXXX functions. */ +#define UNI_UPPER 0x1 +#define UNI_LOWER 0x2 +#define UNI_DIGIT 0x4 +#define UNI_XDIGIT 0x8 +#define UNI_SPACE 0x10 + +#include "nsswitch/nss.h" + +/* forward declaration from printing.h to get around + header file dependencies */ + +struct printjob; + +/***** automatically generated prototypes *****/ +#include "proto.h" + +/* String routines */ + +#include "safe_string.h" + +#ifdef __COMPAR_FN_T +#define QSORT_CAST (__compar_fn_t) +#endif + +#ifndef QSORT_CAST +#define QSORT_CAST (int (*)(const void *, const void *)) +#endif + +#ifndef DEFAULT_PRINTING +#ifdef HAVE_CUPS +#define DEFAULT_PRINTING PRINT_CUPS +#define PRINTCAP_NAME "cups" +#elif defined(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 + +#ifndef MAP_FILE +#define MAP_FILE 0 +#endif + +#if (!defined(WITH_NISPLUS) && !defined(WITH_LDAP) && !defined(WITH_TDB_SAM)) +#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 + +#ifdef REPLACE_INET_NTOA +#define inet_ntoa rep_inet_ntoa +#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 HAVE_CRYPT +#define crypt ufc_crypt +#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_STRDUP +char *strdup(const char *s); +#endif + +#ifndef HAVE_MEMMOVE +void *memmove(void *dest,const void *src,int size); +#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_STRLCPY +size_t strlcpy(char *d, const char *s, size_t bufsize); +#endif + +#ifndef HAVE_STRLCAT +size_t strlcat(char *d, const char *s, size_t bufsize); +#endif + +#ifndef HAVE_FTRUNCATE +int ftruncate(int f,long l); +#endif + +#ifndef HAVE_STRNDUP +char *strndup(const char *s, size_t n); +#endif + +#ifndef HAVE_STRNLEN +size_t strnlen(const char *s, size_t n); +#endif + +#ifndef HAVE_STRTOUL +unsigned long strtoul(const char *nptr, char **endptr, int base); +#endif + +#ifndef HAVE_SETENV +int setenv(const char *name, const char *value, int overwrite); +#endif + +#if (defined(USE_SETRESUID) && !defined(HAVE_SETRESUID_DECL)) +/* stupid glibc */ +int setresuid(uid_t ruid, uid_t euid, uid_t suid); +#endif +#if (defined(USE_SETRESUID) && !defined(HAVE_SETRESGID_DECL)) +int setresgid(gid_t rgid, gid_t egid, gid_t sgid); +#endif +#ifndef HAVE_VASPRINTF_DECL +int vasprintf(char **ptr, const char *format, va_list ap); +#endif + +#if !defined(HAVE_BZERO) && defined(HAVE_MEMSET) +#define bzero(a,b) memset((a),'\0',(b)) +#endif + +#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) + +/* + * glibc on linux doesn't seem to have MSG_WAITALL + * defined. I think the kernel has it though.. + */ + +#ifndef MSG_WAITALL +#define MSG_WAITALL 0 +#endif + +/* 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 + +/* Load header file for dynamic linking stuff */ + +#ifdef HAVE_DLFCN_H +#include +#endif + +/* dmalloc -- free heap debugger (dmalloc.org). This should be near + * the *bottom* of include files so as not to conflict. */ +#ifdef ENABLE_DMALLOC +# include +#endif + + +/* Some POSIX definitions for those without */ + +#ifndef S_IFDIR +#define S_IFDIR 0x4000 +#endif +#ifndef S_ISDIR +#define S_ISDIR(mode) ((mode & 0xF000) == S_IFDIR) +#endif +#ifndef S_IRWXU +#define S_IRWXU 00700 /* read, write, execute: owner */ +#endif +#ifndef S_IRUSR +#define S_IRUSR 00400 /* read permission: owner */ +#endif +#ifndef S_IWUSR +#define S_IWUSR 00200 /* write permission: owner */ +#endif +#ifndef S_IXUSR +#define S_IXUSR 00100 /* execute permission: owner */ +#endif +#ifndef S_IRWXG +#define S_IRWXG 00070 /* read, write, execute: group */ +#endif +#ifndef S_IRGRP +#define S_IRGRP 00040 /* read permission: group */ +#endif +#ifndef S_IWGRP +#define S_IWGRP 00020 /* write permission: group */ +#endif +#ifndef S_IXGRP +#define S_IXGRP 00010 /* execute permission: group */ +#endif +#ifndef S_IRWXO +#define S_IRWXO 00007 /* read, write, execute: other */ +#endif +#ifndef S_IROTH +#define S_IROTH 00004 /* read permission: other */ +#endif +#ifndef S_IWOTH +#define S_IWOTH 00002 /* write permission: other */ +#endif +#ifndef S_IXOTH +#define S_IXOTH 00001 /* execute permission: other */ +#endif + +/* For sys_adminlog(). */ +#ifndef LOG_EMERG +#define LOG_EMERG 0 /* system is unusable */ +#endif + +#ifndef LOG_ALERT +#define LOG_ALERT 1 /* action must be taken immediately */ +#endif + +#ifndef LOG_CRIT +#define LOG_CRIT 2 /* critical conditions */ +#endif + +#ifndef LOG_ERR +#define LOG_ERR 3 /* error conditions */ +#endif + +#ifndef LOG_WARNING +#define LOG_WARNING 4 /* warning conditions */ +#endif + +#ifndef LOG_NOTICE +#define LOG_NOTICE 5 /* normal but significant condition */ +#endif + +#ifndef LOG_INFO +#define LOG_INFO 6 /* informational */ +#endif + +#ifndef LOG_DEBUG +#define LOG_DEBUG 7 /* debug-level messages */ +#endif + +/* NetBSD doesn't have these */ +#ifndef SHM_R +#define SHM_R 0400 +#endif + +#ifndef SHM_W +#define SHM_W 0200 +#endif + +#if HAVE_KERNEL_SHARE_MODES +#ifndef LOCK_MAND +#define LOCK_MAND 32 /* This is a mandatory flock */ +#define LOCK_READ 64 /* ... Which allows concurrent read operations */ +#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ +#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ +#endif +#endif + +extern int DEBUGLEVEL; + +#define MAX_SEC_CTX_DEPTH 8 /* Maximum number of security contexts */ + + +#ifdef GLIBC_HACK_FCNTL64 +/* this is a gross hack. 64 bit locking is completely screwed up on + i386 Linux in glibc 2.1.95 (which ships with RedHat 7.0). This hack + "fixes" the problem with the current 2.4.0test kernels +*/ +#define fcntl fcntl64 +#undef F_SETLKW +#undef F_SETLK +#define F_SETLK 13 +#define F_SETLKW 14 +#endif + + +/* Needed for sys_dlopen/sys_dlsym/sys_dlclose */ +#ifndef RTLD_GLOBAL +#define RTLD_GLOBAL 0 +#endif + +#ifndef RTLD_LAZY +#define RTLD_LAZY 0 +#endif + +#ifndef RTLD_NOW +#define RTLD_NOW 0 +#endif + +/* needed for some systems without iconv. Doesn't really matter + what error code we use */ +#ifndef EILSEQ +#define EILSEQ EIO +#endif + +/* add varargs prototypes with printf checking */ +int fdprintf(int , const char *, ...) PRINTF_ATTRIBUTE(2,3); +int d_printf(const char *, ...) PRINTF_ATTRIBUTE(1,2); +int d_fprintf(FILE *f, const char *, ...) PRINTF_ATTRIBUTE(2,3); +#ifndef HAVE_SNPRINTF_DECL +int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4); +#endif +#ifndef HAVE_ASPRINTF_DECL +int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); +#endif + +void sys_adminlog(int priority, const char *format_str, ...) PRINTF_ATTRIBUTE(2,3); + +int pstr_sprintf(pstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); +int fstr_sprintf(fstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); + +int d_vfprintf(FILE *f, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0); + +int smb_xvasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0); + +/* we used to use these fns, but now we have good replacements + for snprintf and vsnprintf */ +#define slprintf snprintf +#define vslprintf vsnprintf + + +/* we need to use __va_copy() on some platforms */ +#ifdef HAVE_VA_COPY +#define VA_COPY(dest, src) __va_copy(dest, src) +#else +#define VA_COPY(dest, src) (dest) = (src) +#endif + +#ifndef HAVE_TIMEGM +time_t timegm(struct tm *tm); +#endif + +#if defined(VALGRIND) +#define strlen(x) valgrind_strlen(x) +#endif + +/* + * Veritas File System. Often in addition to native. + * Quotas different. + */ +#if defined(HAVE_SYS_FS_VX_QUOTA_H) +#define VXFS_QUOTA +#endif + +#if defined(HAVE_KRB5) + +#ifndef KRB5_SET_REAL_TIME +krb5_error_code krb5_set_real_time(krb5_context context, int32_t seconds, int32_t microseconds); +#endif + +#ifndef HAVE_KRB5_SET_DEFAULT_TGS_KTYPES +krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype *enc); +#endif + +#if defined(HAVE_KRB5_AUTH_CON_SETKEY) && !defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) +krb5_error_code krb5_auth_con_setuseruserkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock *keyblock); +#endif + +/* Samba wrapper function for krb5 functionality. */ +void setup_kaddr( krb5_address *pkaddr, struct sockaddr *paddr); +int create_kerberos_key_from_string(krb5_context context, krb5_principal host_princ, krb5_data *password, krb5_keyblock *key, krb5_enctype enctype); +void get_auth_data_from_tkt(DATA_BLOB *auth_data, krb5_ticket *tkt); +krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt); +krb5_error_code krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters); +krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes); +void free_kerberos_etypes(krb5_context context, krb5_enctype *enctypes); +BOOL krb5_get_smb_session_key(krb5_context context, krb5_auth_context auth_context, uint8 session_key[16]); +#endif /* HAVE_KRB5 */ + +#endif /* _INCLUDES_H */ + -- cgit From 7699f3834f281f8f51588e92d7280ae6b8e0b3c6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 29 Sep 2003 21:59:18 +0000 Subject: Remove obsolete file (This used to be commit ac05e976f20796202deb1731f9488d5a52e2b25f) --- source4/include/includes.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index f369367d82..11f6a14df9 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -762,8 +762,6 @@ extern int errno; #include "passdb.h" -#include "sam.h" - #include "session.h" #include "asn_1.h" -- cgit From 7fd381376f88ae99a4bf022d89f21ae497b48c1a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 30 Oct 2003 08:32:26 +0000 Subject: - a few portability fixes from Jim Myers - added SMBD_LISTEN_BACKLOG in local.h - added the beginnings of a ndr/rpc parsing framework for Samba4. It currently correctly parses security descriptors for the nttrans QUERY_SECDESC call, but I hope it will become a reasonable framework that an idl based generator can work to (This used to be commit 9bf904fc34f88e0581f93656e73d3c01ca96f761) --- source4/include/includes.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 11f6a14df9..39b589a49d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -776,6 +776,9 @@ extern int errno; #include "mutex.h" +#include "libcli/rpc/librpc.h" +#include "libcli/rpc/rpc_sec.h" + /* * Type for wide character dirent structure. * Only d_name is defined by POSIX. -- cgit From c5cf47443985c34ad32c44c322901e0fc3a065d7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Nov 2003 06:22:45 +0000 Subject: a major revamp of the low level dcerpc code in samba4, We can now do a successful LSA OpenPolicy using smbtorture (This used to be commit e925c315f55905060fcca1b188ae1f7e40baf514) --- source4/include/includes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 39b589a49d..68bd3b629f 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -776,8 +776,9 @@ extern int errno; #include "mutex.h" -#include "libcli/rpc/librpc.h" -#include "libcli/rpc/rpc_sec.h" +#include "libcli/ndr/libndr.h" +#include "libcli/ndr/ndr_sec.h" +#include "libcli/rpc/dcerpc.h" /* * Type for wide character dirent structure. -- cgit From dc2ffe07a8b25c117c7778fb706274198c11c2cc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Nov 2003 07:26:30 +0000 Subject: started adding RPC-ECHO torture cases (This used to be commit 8cff335dab438aa2dbcca91a717e14ef5a8288dd) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 68bd3b629f..fb8719b2b6 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -777,7 +777,6 @@ extern int errno; #include "mutex.h" #include "libcli/ndr/libndr.h" -#include "libcli/ndr/ndr_sec.h" #include "libcli/rpc/dcerpc.h" /* -- cgit From 4fa0f615f286631820316f8c87dd61eda494e203 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 6 Nov 2003 12:34:04 +0000 Subject: another major bit of restructuring of rpc in Samba4. Mostly moving files around, but also added the first bits of auto-generated code for the lsa pipe. I haven't updated the Makefile to call pidl yet, so for now the code was cut-and-pasted into librpc/ndr/ndr_lsa.c manually (This used to be commit 6b222d3b6541ee74cf8bf3f0913cd444903ca991) --- source4/include/includes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index fb8719b2b6..e6a25a9b24 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -776,8 +776,8 @@ extern int errno; #include "mutex.h" -#include "libcli/ndr/libndr.h" -#include "libcli/rpc/dcerpc.h" +#include "librpc/ndr/libndr.h" +#include "librpc/rpc/dcerpc.h" /* * Type for wide character dirent structure. -- cgit From d47d14f2ffc7a6d2cc306530b777f364767998b3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 23 Nov 2003 01:53:54 +0000 Subject: reduced the number of magic types we need in mkproto.pl In general I prefer "struct foo" to just "foo" for most structures. There are exceptions. (This used to be commit 04eb12b56c653f98801ab29411f47564ab32fa58) --- source4/include/includes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index e6a25a9b24..0f5e73cf56 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -631,9 +631,9 @@ typedef int socklen_t; #ifndef SMB_STRUCT_DIRENT # if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_DIRENT64) -# define SMB_STRUCT_DIRENT struct dirent64 +# define smb_dirent dirent64 # else -# define SMB_STRUCT_DIRENT struct dirent +# define smb_dirent dirent # endif #endif -- cgit From a846e592058726b670e40505493a4668bd856186 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 25 Nov 2003 03:15:26 +0000 Subject: CVS: ---------------------------------------------------------------------- CVS: Enter Log. Lines beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: Makefile.in configure.in include/includes.h include/ntvfs.h CVS: include/smb.h lib/iconv.c lib/module.c ntvfs/ntvfs_base.c CVS: ntvfs/cifs/vfs_cifs.c ntvfs/ipc/vfs_ipc.c CVS: ntvfs/posix/vfs_posix.c ntvfs/print/vfs_print.c CVS: ntvfs/reference/vfs_ref.c ntvfs/simple/vfs_simple.c CVS: passdb/pdb_interface.c CVS: Added Files: CVS: include/module.h CVS: ---------------------------------------------------------------------- Update to the modules system. Fixed: - get rid of smb_probe_module - merge older updates from 3.0 - introduced register_subsystem() and register_backend() functions - adapt ntvfs and charset to use new register functions - made smb_load_modules() work recursively (e.g. 'preload modules = /usr/lib/samba') - got rid of some old remains Things that still need work: - Did I break tankFS? I don't think so, but I can't test it here :-( - Add 'postload modules = ' (for modules that need to be loaded after fork() in smbd, if applicable) - Convert RPC, auth, passdb, etc to use new register_{subsystem,backend}() functions - Accept wildcards in 'preload modules' option, instead of loading recursively (This used to be commit 7512b9ab1a8b3103f7a6c13f736353c46a26b668) --- source4/include/includes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 0f5e73cf56..908d2a4e76 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -759,11 +759,12 @@ extern int errno; #include "ntlmssp.h" #include "auth.h" - #include "passdb.h" #include "session.h" +#include "module.h" + #include "asn_1.h" #include "popt.h" -- cgit From e0ac659917066dbf7f8fdbcc7684ce2b49dd04d9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 26 Nov 2003 01:16:41 +0000 Subject: signed DCERPC over TCP now works ! * moved ntlmssp code into libcli/auth/, and updated to latest ntlmssp code from samba3 (thanks Andrew! the new interface is great) * added signing/ntlmssp support in the dcerpc code * added a dcerpc_auth.c module for the various dcerpc auth mechanisms (This used to be commit c18c9b5585a3e5f7868562820c14f7cb529cdbcd) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 908d2a4e76..2b4eff6eb4 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -756,7 +756,7 @@ extern int errno; #include "md5.h" #include "hmacmd5.h" -#include "ntlmssp.h" +#include "libcli/auth/ntlmssp.h" #include "auth.h" #include "passdb.h" -- cgit From cfd41af8145ce31e9d0ff7abfcbd0d7c275dc30e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Dec 2003 00:38:30 +0000 Subject: removed more old code (This used to be commit fbccf58539827ef368f8a0be122e45edcd0f070e) --- source4/include/includes.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 2b4eff6eb4..d8784f618b 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -734,7 +734,6 @@ extern int errno; #include "messages.h" #include "charset.h" #include "dynconfig.h" -#include "adt_tree.h" #include "util_getent.h" @@ -749,10 +748,6 @@ extern int errno; #include "msdfs.h" -#include "mapping.h" - -#include "rap.h" - #include "md5.h" #include "hmacmd5.h" -- cgit From 3c76426f2e343df2194825ae2e0ef84f4ad4c6ac Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 10 Dec 2003 03:02:12 +0000 Subject: * removed some unused code * updated tdb to latest version from Samba3 * removed some extraneous ';' in tdbutil.c (Thanks to Erlend Aasland for pointing this out) (This used to be commit f3eaf270e57d8d2e2157a6a36e260860c7f71c19) --- source4/include/includes.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index d8784f618b..fe6fcf5bce 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -451,12 +451,10 @@ /* * Define additional missing types */ -#if defined(HAVE_SIG_ATOMIC_T_TYPE) && defined(AIX) +#if defined(HAVE_SIG_ATOMIC_T_TYPE) typedef sig_atomic_t SIG_ATOMIC_T; -#elif defined(HAVE_SIG_ATOMIC_T_TYPE) && !defined(AIX) -typedef sig_atomic_t VOLATILE SIG_ATOMIC_T; #else -typedef int VOLATILE SIG_ATOMIC_T; +typedef int SIG_ATOMIC_T; #endif #ifndef HAVE_SOCKLEN_T_TYPE -- cgit From 2bde98c0ee67b4c60c5906b3b2f297cf4922c67c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 10 Dec 2003 22:24:33 +0000 Subject: the rest of the initial rpc server side infrastructure (This used to be commit 5fb01b0ec0321724c25669151ea7c20e6ec182d0) --- source4/include/includes.h | 51 ---------------------------------------------- 1 file changed, 51 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index fe6fcf5bce..9683d032cc 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -773,28 +773,6 @@ extern int errno; #include "librpc/ndr/libndr.h" #include "librpc/rpc/dcerpc.h" -/* - * Type for wide character dirent structure. - * Only d_name is defined by POSIX. - */ - -typedef struct smb_wdirent { - wpstring d_name; -} SMB_STRUCT_WDIRENT; - -/* - * Type for wide character passwd structure. - */ - -typedef struct smb_wpasswd { - wfstring pw_name; - char *pw_passwd; - uid_t pw_uid; - gid_t pw_gid; - wpstring pw_gecos; - wpstring pw_dir; - wpstring pw_shell; -} SMB_STRUCT_WPASSWD; /* used in net.c */ struct functable { @@ -803,20 +781,8 @@ struct functable { }; -/* Defines for wisXXX functions. */ -#define UNI_UPPER 0x1 -#define UNI_LOWER 0x2 -#define UNI_DIGIT 0x4 -#define UNI_XDIGIT 0x8 -#define UNI_SPACE 0x10 - #include "nsswitch/nss.h" -/* forward declaration from printing.h to get around - header file dependencies */ - -struct printjob; - /***** automatically generated prototypes *****/ #include "proto.h" @@ -832,23 +798,6 @@ struct printjob; #define QSORT_CAST (int (*)(const void *, const void *)) #endif -#ifndef DEFAULT_PRINTING -#ifdef HAVE_CUPS -#define DEFAULT_PRINTING PRINT_CUPS -#define PRINTCAP_NAME "cups" -#elif defined(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 -- cgit From 16309de71d6c8de96e869aeaab0b879185991d87 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 12 Dec 2003 03:59:09 +0000 Subject: * the RPC-ECHO pipe now works in smbd, as long as the data sizes don't cause fragmented pdus (I'll add fragments shortly) * change data_blob_talloc() to not zero memory when the 2nd argument is NULL. The zeroing just masks bugs, and can't even allow a DOS attack * modified pidl to ensure that [ref] arguments to the out side of functions are allocated when parsing the in side. This allows rpc backends to assume that [ref] variables are all setup. Doesn't work correctly for [ref] arrays yet * changed DLIST_ADD_END() to take the type instead of a tmp variable. This means you don't need to declare a silly tmp variable in the caller (This used to be commit 46e0a358198eeb9af1907ee2a29025d3ab23b6d1) --- source4/include/includes.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 9683d032cc..305875cae0 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -773,6 +773,11 @@ extern int errno; #include "librpc/ndr/libndr.h" #include "librpc/rpc/dcerpc.h" +#include "rpc_server/dcerpc_server.h" +#include "context.h" +#include "ntvfs.h" +#include "cli_context.h" + /* used in net.c */ struct functable { -- cgit From 727c3bfdebf67e306e1ab15bb533e67b1e1b9090 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Dec 2003 02:59:30 +0000 Subject: make sure we have a value for DEFAULT_PRINTING on all platforms (This used to be commit d0bef33ffa21ce5caaf8e052cbbd2bb32db40b0c) --- source4/include/includes.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 305875cae0..b3f98d2f2c 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -45,14 +45,12 @@ #undef HAVE_TERMIOS_H #endif -#ifdef LINUX #ifndef DEFAULT_PRINTING #define DEFAULT_PRINTING PRINT_BSD #endif #ifndef PRINTCAP_NAME #define PRINTCAP_NAME "/etc/printcap" #endif -#endif #ifdef __GNUC__ /** Use gcc attribute to check printf fns. a1 is the 1-based index of -- cgit From 24c22aef90d8534ee2d016b37b2b302f1367d106 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Dec 2003 09:02:58 +0000 Subject: a fairly large commit! This adds support for bigendian rpc in the client. I have installed SUN pcnetlink locally and am using it to test the samba4 rpc code. This allows us to easily find places where we have stuffed up the types (such as 2 uint16 versus a uint32), as testing both big-endian and little-endian easily shows which is correct. I have now used this to fix several bugs like that in the samba4 IDL. In order to make this work I also had to redefine a GUID as a true structure, not a blob. From the pcnetlink wire it is clear that it is indeed defined as a structure (the byte order changes). This required changing lots of Samba code to use a GUID as a structure. I also had to fix the if_version code in dcerpc syntax IDs, as it turns out they are a single uint32 not two uint16s. The big-endian support is a bit ugly at the moment, and breaks the layering in some places. More work is needed, especially on the server side. (This used to be commit bb1af644a5a7b188290ce36232f255da0e5d66d2) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b3f98d2f2c..6d796da6b3 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -768,7 +768,6 @@ extern int errno; #include "mutex.h" -#include "librpc/ndr/libndr.h" #include "librpc/rpc/dcerpc.h" #include "rpc_server/dcerpc_server.h" -- cgit From a5ece462abeaa1326cb7fd7073dfc9fd0c7cb9f2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 28 Jan 2004 18:54:36 +0000 Subject: remove a lot of unused stuff from the header files and exclude some files from Makefile.in metze (This used to be commit f77990cf2496f72d02566f09477349436be3dfcd) --- source4/include/includes.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 6d796da6b3..2b83d14622 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -715,7 +715,6 @@ extern int errno; /* Lists, trees, caching, database... */ #include "xfile.h" -#include "intl.h" #include "dlinklist.h" #include "../tdb/tdb.h" #include "../tdb/spinlock.h" @@ -740,8 +739,6 @@ extern int errno; #include "byteorder.h" -#include "ntdomain.h" - #include "msdfs.h" #include "md5.h" @@ -752,8 +749,6 @@ extern int errno; #include "auth.h" #include "passdb.h" -#include "session.h" - #include "module.h" #include "asn_1.h" @@ -764,8 +759,6 @@ extern int errno; #include "nsswitch/winbind_client.h" -#include "genparser.h" - #include "mutex.h" #include "librpc/rpc/dcerpc.h" -- cgit From 670ccc7d643b8e04743542b4336f6830ac065463 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 1 Feb 2004 11:26:25 +0000 Subject: merge: ldap and krb5 configure tests libads/*.c and libcli/raw/clikrb5.c from 3.0 metze (This used to be commit 64b5bfcd73d7626d6f687a641b11e64821144df7) --- source4/include/includes.h | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 2b83d14622..2391a59b67 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -339,10 +339,6 @@ #include #endif -#ifdef HAVE_POLL_H -#include -#endif - #ifdef HAVE_SYS_CAPABILITY_H #if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) @@ -721,7 +717,6 @@ extern int errno; #include "../tdb/tdbutil.h" #include "talloc.h" #include "nt_status.h" -#include "ads.h" #include "interfaces.h" #include "trans2.h" #include "ioctl.h" @@ -734,6 +729,7 @@ extern int errno; #include "version.h" #include "smb.h" +#include "ads.h" #include "nameserv.h" #include "secrets.h" @@ -1147,30 +1143,5 @@ time_t timegm(struct tm *tm); #define VXFS_QUOTA #endif -#if defined(HAVE_KRB5) - -#ifndef KRB5_SET_REAL_TIME -krb5_error_code krb5_set_real_time(krb5_context context, int32_t seconds, int32_t microseconds); -#endif - -#ifndef HAVE_KRB5_SET_DEFAULT_TGS_KTYPES -krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype *enc); -#endif - -#if defined(HAVE_KRB5_AUTH_CON_SETKEY) && !defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) -krb5_error_code krb5_auth_con_setuseruserkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock *keyblock); -#endif - -/* Samba wrapper function for krb5 functionality. */ -void setup_kaddr( krb5_address *pkaddr, struct sockaddr *paddr); -int create_kerberos_key_from_string(krb5_context context, krb5_principal host_princ, krb5_data *password, krb5_keyblock *key, krb5_enctype enctype); -void get_auth_data_from_tkt(DATA_BLOB *auth_data, krb5_ticket *tkt); -krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt); -krb5_error_code krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters); -krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes); -void free_kerberos_etypes(krb5_context context, krb5_enctype *enctypes); -BOOL krb5_get_smb_session_key(krb5_context context, krb5_auth_context auth_context, uint8 session_key[16]); -#endif /* HAVE_KRB5 */ - #endif /* _INCLUDES_H */ -- cgit From 1c798aba40fb0e389c7a54ad3d8f7d45876f2809 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 3 Feb 2004 11:10:56 +0000 Subject: - port AUTH and PASSDB subsystems to new SMB_SUBSYSTEM() scheme - some const fixes in ntvfs metze (This used to be commit af89a78123068767b1d134969c5651a0fd978b0d) --- source4/include/includes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 2391a59b67..351f7e1ad8 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -742,8 +742,8 @@ extern int errno; #include "libcli/auth/ntlmssp.h" -#include "auth.h" -#include "passdb.h" +#include "auth/auth.h" +#include "passdb/passdb.h" #include "module.h" -- cgit From 009fa83b136fbb4544a9b79074ab17e357493c32 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 3 Feb 2004 11:18:54 +0000 Subject: move include/ntvfs.h to ntvfs/ntvfs.h metze (This used to be commit 041dc8c83df21c4cff9a62b9381ebc68b3876e77) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 351f7e1ad8..607392b158 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -761,7 +761,7 @@ extern int errno; #include "rpc_server/dcerpc_server.h" #include "context.h" -#include "ntvfs.h" +#include "ntvfs/ntvfs.h" #include "cli_context.h" -- cgit From 078cced5ec1026432f5df275a7023db70a62693e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Feb 2004 10:22:12 +0000 Subject: - modified the dcerpc client security code to be generic, so ntlmssp and schannel are both instances of possible security modules - added schannel sign and sign/seal support to the dcerpc client code. You select it with binding options of "schannel,sign" or "schannel,seal". (This used to be commit 05db0b9d942cad8f1dd574dc35b759e5e79d4195) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 607392b158..dc83f55430 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -741,6 +741,7 @@ extern int errno; #include "hmacmd5.h" #include "libcli/auth/ntlmssp.h" +#include "libcli/auth/schannel.h" #include "auth/auth.h" #include "passdb/passdb.h" -- cgit From 9a8cd1aa27204096d64b99c4dbed73f498e3ccfe Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 12 Feb 2004 15:59:16 +0000 Subject: move the tdb lib code to lib/tdb/* metze (This used to be commit 5ebd6fb761370cbe2835a2a2631e24e35bcaffb4) --- source4/include/includes.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index dc83f55430..32132b9fcd 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -712,9 +712,9 @@ extern int errno; /* Lists, trees, caching, database... */ #include "xfile.h" #include "dlinklist.h" -#include "../tdb/tdb.h" -#include "../tdb/spinlock.h" -#include "../tdb/tdbutil.h" +#include "lib/tdb/tdb.h" +#include "lib/tdb/spinlock.h" +#include "lib/tdb/tdbutil.h" #include "talloc.h" #include "nt_status.h" #include "interfaces.h" -- cgit From 932026724ff7e8050cfa0412c45168c25ee47e1a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Feb 2004 13:55:15 +0000 Subject: remove unused NISPLUS/AUTOMOUNT stuff metze (This used to be commit cbfa29549e5b302f947c7f2ca14fbea257e46c33) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 32132b9fcd..71ecaa508e 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -798,7 +798,7 @@ struct functable { #define MAP_FILE 0 #endif -#if (!defined(WITH_NISPLUS) && !defined(WITH_LDAP) && !defined(WITH_TDB_SAM)) +#if (!defined(WITH_LDAP) && !defined(WITH_TDB_SAM)) #define USE_SMBPASS_DB 1 #endif -- cgit From 64cdbddbc1e0f63302aee4f02213d7a771feb315 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Feb 2004 15:31:25 +0000 Subject: don't inlcude rpc/rpc.h and rpcsvc/*.h anymore and remove NET_GROUP stuff, this needs to be implemented in a better way if we ever readd this metze (This used to be commit da5f22976fb40ec96160439c7a926a15805fc7f0) --- source4/include/includes.h | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 71ecaa508e..ec744920ed 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -355,29 +355,6 @@ #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 */ - #if defined(HAVE_SYS_IPC_H) #include #endif /* HAVE_SYS_IPC_H */ @@ -479,7 +456,7 @@ typedef int socklen_t; #define uint8 unsigned char #endif -#if !defined(int16) && !defined(HAVE_INT16_FROM_RPC_RPC_H) +#if !defined(int16) #if (SIZEOF_SHORT == 4) #define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16; #else /* SIZEOF_SHORT != 4 */ @@ -487,12 +464,8 @@ typedef int socklen_t; #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 !defined(uint16) #if (SIZEOF_SHORT == 4) #define uint16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16; #else /* SIZEOF_SHORT != 4 */ @@ -500,7 +473,7 @@ typedef int socklen_t; #endif /* SIZEOF_SHORT != 4 */ #endif -#if !defined(int32) && !defined(HAVE_INT32_FROM_RPC_RPC_H) +#if !defined(int32) #if (SIZEOF_INT == 4) #define int32 int #elif (SIZEOF_LONG == 4) @@ -513,12 +486,8 @@ typedef int socklen_t; #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 !defined(uint32) #if (SIZEOF_INT == 4) #define uint32 unsigned int #elif (SIZEOF_LONG == 4) -- cgit From 9403f3dc7e977d53efe1439ec20461bbc4935fe5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Mar 2004 01:57:28 +0000 Subject: switch from SIG_ATOMIC_T to sig_atomic_t (This used to be commit b881b72cb9cb5a4a8ad27b621e8cbe9dcfa7ba7f) --- source4/include/includes.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index ec744920ed..2241425323 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -422,10 +422,8 @@ /* * Define additional missing types */ -#if defined(HAVE_SIG_ATOMIC_T_TYPE) -typedef sig_atomic_t SIG_ATOMIC_T; -#else -typedef int SIG_ATOMIC_T; +#ifndef HAVE_SIG_ATOMIC_T_TYPE +typedef int sig_atomic_t; #endif #ifndef HAVE_SOCKLEN_T_TYPE -- cgit From c424c2b857fe08587eb81a5c5e3625545119d1c2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 4 Apr 2004 16:24:08 +0000 Subject: r20: Add the registry library. Still needs a lot of work, see source/lib/registry/TODO for details. (This used to be commit 7cab3a00d7b4b1d95a3bfa6b28f318b4aaa5d493) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 2241425323..3ea7d9549f 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -731,6 +731,7 @@ extern int errno; #include "context.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" +#include "registry.h" /* used in net.c */ -- cgit From 42889e5e1e276c8957cc666991364c6f0b6bdc79 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 9 Apr 2004 08:06:39 +0000 Subject: r134: - added ldb to the build of smbd - fixed build of the ldb registry backend (This used to be commit 0b66590330603efaa816fd2348c05a994a1580ef) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 3ea7d9549f..be0f7baaf4 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -679,6 +679,7 @@ extern int errno; /* Lists, trees, caching, database... */ #include "xfile.h" #include "dlinklist.h" +#include "lib/ldb/include/ldb.h" #include "lib/tdb/tdb.h" #include "lib/tdb/spinlock.h" #include "lib/tdb/tdbutil.h" -- cgit From 177777b05534c86514f5ee79b67532537bfd99dd Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sat, 10 Apr 2004 06:10:26 +0000 Subject: r141: A number of changes to get things working on FreeBSD and reduce the breakage caused by someone recently ... 1. Add configure check HAVE_COMPARISON_FN_T to see if this is defined. I have not checked this on Linux yet, but will do so soon. 2. Add the definitions of malloc_p, realloc_p etc. 3. Check for LDAP and don't build stuff that depends on LDAP if we don't\ have it. It currently builds on FreeBSD but there is one warning printed out at the end. (This used to be commit 7b34fbe0f2ef175e5504e34e4f3cdf9a0563970f) --- source4/include/includes.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index be0f7baaf4..79fca5f7b4 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -741,6 +741,15 @@ struct functable { int (*fn)(int argc, const char **argv); }; +#define malloc_p(type) (type *)malloc(sizeof(type)) +#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) +#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count) + +#ifndef HAVE_COMPARISON_FN_T +typedef int (*comparison_fn_t)(const void *, const void *); +#endif + +#include "lib/ldb/include/ldb_parse.h" #include "nsswitch/nss.h" -- cgit From ac193579e7db00c7a2ea0aadaaf0d34c10dcf1a5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 10 Apr 2004 20:18:22 +0000 Subject: r152: a quick airport commit .... added ldbedit, a _really_ useful command added ldbadd, ldbdel, ldbsearch and ldbmodify to build solved lots of timezone issues, we now pass the torture tests with client and server in different zones fixed several build issues I know this breaks the no-LDAP build. Wait till I arrive in San Jose for that fix. (This used to be commit af34710d4da1841653624fe304b1c8d812c0fdd9) --- source4/include/includes.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 79fca5f7b4..b611974e29 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -680,6 +680,7 @@ extern int errno; #include "xfile.h" #include "dlinklist.h" #include "lib/ldb/include/ldb.h" +#include "lib/ldb/include/ldb_parse.h" #include "lib/tdb/tdb.h" #include "lib/tdb/spinlock.h" #include "lib/tdb/tdbutil.h" @@ -749,8 +750,6 @@ struct functable { typedef int (*comparison_fn_t)(const void *, const void *); #endif -#include "lib/ldb/include/ldb_parse.h" - #include "nsswitch/nss.h" /***** automatically generated prototypes *****/ -- cgit From 722e301591dd0d603c12befc9e6462230f62f2b6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 6 May 2004 04:41:28 +0000 Subject: r503: we don't need to include ldb_parse.h any more (This used to be commit 85e57684b4dc4edcfd6d4cd1492d63810f8ce211) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b611974e29..622b68b1af 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -680,7 +680,6 @@ extern int errno; #include "xfile.h" #include "dlinklist.h" #include "lib/ldb/include/ldb.h" -#include "lib/ldb/include/ldb_parse.h" #include "lib/tdb/tdb.h" #include "lib/tdb/spinlock.h" #include "lib/tdb/tdbutil.h" -- cgit From dce84ffd379012812170f68f7de8aab73123f0b3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 9 May 2004 12:42:18 +0000 Subject: r610: - Merge the Samba3 'ntlm_auth --diagnostics' testsuite to Samba4. - This required using NETLOGON_NEG_AUTH2_FLAGS for the SetupCredentials2 negotiation flags, which is what Samba3 does, because otherwise the server uses different crypto. - This tests the returned session keys, which we decrypt. - Update the Samba4 notion of a 'session key' to be a DATA_BLOB in most places. - Fix session key code to return NT_STATUS_NO_SESSION_KEY if none is available. - Remove a useless argument to SMBsesskeygen_ntv1 - move netr_CredentialState from the .idl to the new credentials.h Andrew Bartlett (This used to be commit 44f8b5b53e6abd4de8a676f78d729988fadff320) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 622b68b1af..de06b4d8a5 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -709,6 +709,7 @@ extern int errno; #include "hmacmd5.h" #include "libcli/auth/ntlmssp.h" +#include "libcli/auth/credentials.h" #include "libcli/auth/schannel.h" #include "auth/auth.h" -- cgit From f236700ef67d4f93ec56ec7808584552e94e0dfe Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 13 May 2004 10:20:53 +0000 Subject: r665: merge over the new build system from my tmp branch to the main SAMBA_4_0 tree. NOTE: that it's not completely ready, but it's functional:-) metze (This used to be commit c78a2ddb28ec50d6570a83b1f66f18a5c3621731) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index de06b4d8a5..42d4c2552e 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -23,6 +23,7 @@ #ifndef NO_CONFIG_H /* for some tests */ #include "config.h" +#include "smb_build.h" #endif #include "local.h" -- cgit From d12e825042d1f108051eb6e205340dee444d5591 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 13 May 2004 15:34:56 +0000 Subject: r685: The SAM is dead! Long live the new SAM! ;-) This commit kills passdb, which was only hosting the auth subsystem. With the work tridge has done on Samba4's SAM backend, this can (and now is) all hosted on ldb. The auth_sam.c file now references this backend. You will need to assign your users passwords in ldb - adding a new line: unicodePwd: myPass to a record, using ldbedit, should be sufficient. Naturally, this assumes you have had your personal SAMR provisioning tutorial from tridge. Everybody else can still use the anonymous logins. Andrew Bartlett (This used to be commit 2aa0b55fb86648731d5f2201fa5a6aa993b7ca48) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 42d4c2552e..89509255e8 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -714,7 +714,6 @@ extern int errno; #include "libcli/auth/schannel.h" #include "auth/auth.h" -#include "passdb/passdb.h" #include "module.h" -- cgit From a3d61e0485c70ec5215c34b6caf40e2e6c6c5338 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 24 May 2004 16:27:23 +0000 Subject: r848: convert lib/tdb into the same layout as lib/ldb metze (This used to be commit bacab322ce89979f0ad0811cd15b73d81eceb69d) --- source4/include/includes.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 89509255e8..f9598845c3 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -681,9 +681,9 @@ extern int errno; #include "xfile.h" #include "dlinklist.h" #include "lib/ldb/include/ldb.h" -#include "lib/tdb/tdb.h" -#include "lib/tdb/spinlock.h" -#include "lib/tdb/tdbutil.h" +#include "lib/tdb/include/tdb.h" +#include "lib/tdb/include/spinlock.h" +#include "lib/tdb/include/tdbutil.h" #include "talloc.h" #include "nt_status.h" #include "interfaces.h" -- cgit From 7fb1be73734915e027f86aca9ba62b86c56ca787 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 24 May 2004 17:41:47 +0000 Subject: r853: remove a real big bunch of unused code I really think that this is needed to get a better overview of what is currently used Also this stuff is really out of date so if we really ever need some of this stuff back, a 'svn copy' from the SAMBA_3_0 branch should be no big problem... metze (This used to be commit 972598d511c64f29bdc849fe58c9c82fbcf6a4a2) --- source4/include/includes.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index f9598845c3..bc3d948a2c 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -723,8 +723,6 @@ extern int errno; #include "mangle.h" -#include "nsswitch/winbind_client.h" - #include "mutex.h" #include "librpc/rpc/dcerpc.h" @@ -750,8 +748,6 @@ struct functable { typedef int (*comparison_fn_t)(const void *, const void *); #endif -#include "nsswitch/nss.h" - /***** automatically generated prototypes *****/ #include "proto.h" -- cgit From 1f033febfe19d6bb0b45524a672eaf1d1373f15e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 24 May 2004 22:05:06 +0000 Subject: r861: remove the next round of unused stuff metze (This used to be commit 8f59daba0d03a2c58f7f23655153de05cbe47e81) --- source4/include/includes.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index bc3d948a2c..1037d54c4e 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -694,8 +694,6 @@ extern int errno; #include "charset.h" #include "dynconfig.h" -#include "util_getent.h" - #include "version.h" #include "smb.h" #include "ads.h" @@ -704,8 +702,6 @@ extern int errno; #include "byteorder.h" -#include "msdfs.h" - #include "md5.h" #include "hmacmd5.h" @@ -721,8 +717,6 @@ extern int errno; #include "popt.h" -#include "mangle.h" - #include "mutex.h" #include "librpc/rpc/dcerpc.h" @@ -733,13 +727,6 @@ extern int errno; #include "cli_context.h" #include "registry.h" - -/* used in net.c */ -struct functable { - const char *funcname; - int (*fn)(int argc, const char **argv); -}; - #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) #define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count) -- cgit From 579c13da43d5b40ac6d6c1436399fbc1d8dfd054 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 25 May 2004 13:57:39 +0000 Subject: r873: converted samba4 to use real 64 bit integers instead of structures. This was suggested by metze recently. I checked on the build farm and all the machines we have support 64 bit ints, and support the LL suffix for 64 bit constants. I suspect some won't support strtoll() and related functions, so we will probably need replacements for those. (This used to be commit 9a9244a1c66654c12abe4379661cba83a73c4c21) --- source4/include/includes.h | 41 ++++++++--------------------------------- 1 file changed, 8 insertions(+), 33 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 1037d54c4e..b6be02155e 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -499,6 +499,14 @@ typedef int socklen_t; #endif #endif +#if !defined(uint64) +#define uint64 uint64_t +#endif + +#if !defined(int64) +#define int64 int64_t +#endif + /* * Types for devices, inodes and offsets. */ @@ -543,11 +551,6 @@ typedef int socklen_t; # endif #endif -/* this should really be a 64 bit type if possible */ -#define br_off SMB_BIG_UINT - -#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. @@ -559,20 +562,6 @@ typedef int socklen_t; # endif #endif -#ifdef LARGE_SMB_OFF_T -#define SOFF_T(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) -#define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,(v)&0xFFFFFFFF), SIVAL(p,ofs,(v)>>32)) -#define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ))) -#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF)) | \ - (( ((SMB_BIG_UINT)(IVAL((buf),(off+4)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ) << 32 ) ) -#else -#define SOFF_T(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) -#define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,v),SIVAL(p,ofs,0)) -#define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((uint32)(IVAL((buf),(off)))) & 0xFFFFFFFF ))) -#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF)) | \ - (( ((SMB_BIG_UINT)(IVAL((buf),(off+4)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ) << 32 ) ) -#endif - /* * Type for stat structure. */ @@ -633,20 +622,6 @@ typedef int socklen_t; # endif #endif -#if defined(HAVE_LONGLONG) -#define SMB_BIG_UINT unsigned long long -#define SMB_BIG_INT long long -#define SBVAL(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) -#define BVAL(p, ofs) (IVAL(p,ofs) | (((SMB_BIG_UINT)IVAL(p,(ofs)+4)) << 32)) -#else -#define SMB_BIG_UINT unsigned long -#define SMB_BIG_INT long -#define SBVAL(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) -#define BVAL(p, ofs) IVAL(p,ofs) -#endif - -#define SMB_BIG_UINT_BITS (sizeof(SMB_BIG_UINT)*8) - #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif -- cgit From f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 25 May 2004 16:24:13 +0000 Subject: r884: convert samba4 to use [u]int32_t instead of [u]int32 metze (This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095) --- source4/include/includes.h | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b6be02155e..e6593754ed 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -443,7 +443,7 @@ typedef int socklen_t; #endif /* - Samba needs type definitions for int16, int32, uint16 and uint32. + Samba needs type definitions for int16, int32_t, uint16 and uint32_t. Normally these are signed and unsigned 16 and 32 bit integers, but they actually only need to be at least 16 and 32 bits @@ -473,40 +473,21 @@ typedef int socklen_t; #endif #if !defined(int32) -#if (SIZEOF_INT == 4) -#define int32 int -#elif (SIZEOF_LONG == 4) -#define int32 long -#elif (SIZEOF_SHORT == 4) -#define int32 short -#else -/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */ -#define int32 int -#endif +#define int32 int32_t #endif - #if !defined(uint32) -#if (SIZEOF_INT == 4) -#define uint32 unsigned int -#elif (SIZEOF_LONG == 4) -#define uint32 unsigned long -#elif (SIZEOF_SHORT == 4) -#define uint32 unsigned short -#else -/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */ -#define uint32 unsigned +#define uint32 uint32_t #endif + +#if !defined(int64) +#define int64 int64_t #endif #if !defined(uint64) #define uint64 uint64_t #endif -#if !defined(int64) -#define int64 int64_t -#endif - /* * Types for devices, inodes and offsets. */ -- cgit From f88bf54c7f6d1c2ef833047eb8327953c304b5ff Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 25 May 2004 17:24:24 +0000 Subject: r889: convert samba4 to use [u]int16_t instead of [u]int16 metze (This used to be commit af6f1f8a01bebbecd99bc8c066519e89966e65e3) --- source4/include/includes.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index e6593754ed..a47ede6796 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -443,10 +443,12 @@ typedef int socklen_t; #endif /* - Samba needs type definitions for int16, int32_t, uint16 and uint32_t. + Samba needs type definitions for + int8_t, int16_t, int32_t, int64_t + uint8_t, uint16_t, uint32_t and uint64_t. - Normally these are signed and unsigned 16 and 32 bit integers, but - they actually only need to be at least 16 and 32 bits + Normally these are signed and unsigned 8, 16, 32 and 64 bit integers, but + they actually only need to be at least 8, 16, 32 and 64 bits respectively. Thus if your word size is 8 bytes just defining them as signed and unsigned int will work. */ @@ -456,20 +458,11 @@ typedef int socklen_t; #endif #if !defined(int16) -#if (SIZEOF_SHORT == 4) -#define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16; -#else /* SIZEOF_SHORT != 4 */ -#define int16 short -#endif /* SIZEOF_SHORT != 4 */ +#define int16 int16_t #endif - #if !defined(uint16) -#if (SIZEOF_SHORT == 4) -#define uint16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16; -#else /* SIZEOF_SHORT != 4 */ -#define uint16 unsigned short -#endif /* SIZEOF_SHORT != 4 */ +#define uint16 uint16_t #endif #if !defined(int32) -- cgit From fcd718c7d8a6850ae8719f23ed044b06b57501cd Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 25 May 2004 17:50:17 +0000 Subject: r890: convert samba4 to use [u]int8_t instead of [u]int8 metze (This used to be commit 2986c5f08c8f0c26a2ea7b6ce20aae025183109f) --- source4/include/includes.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index a47ede6796..441111ed6f 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -453,8 +453,12 @@ typedef int socklen_t; as signed and unsigned int will work. */ -#ifndef uint8 -#define uint8 unsigned char +#if !defined(int8) +#define int8 int8_t +#endif + +#if !defined(uint8) +#define uint8 uint8_t #endif #if !defined(int16) -- cgit From 8b3f08cefcd41e6f8005de84a2cc865c1011194d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 26 May 2004 05:40:33 +0000 Subject: r898: - remove some unused macros - remove unused lib/smbpasswd.c - don't set the pkt size twice when doing SMB signing (This used to be commit 69a2942f7987647a32d43c71f41ac1a82a82ccda) --- source4/include/includes.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 441111ed6f..5aa46c36cf 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -436,12 +436,6 @@ typedef int socklen_t; #define uchar unsigned char #endif -#ifdef HAVE_UNSIGNED_CHAR -#define schar signed char -#else -#define schar char -#endif - /* Samba needs type definitions for int8_t, int16_t, int32_t, int64_t @@ -711,10 +705,6 @@ typedef int (*comparison_fn_t)(const void *, const void *); #define MAP_FILE 0 #endif -#if (!defined(WITH_LDAP) && !defined(WITH_TDB_SAM)) -#define USE_SMBPASS_DB 1 -#endif - #if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS) #define OSF1_ENH_SEC 1 #endif -- cgit From 39a236883ee4015980ff3d3cab8a8e5fec858502 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 26 May 2004 08:02:20 +0000 Subject: r904: - fixed account expiry testing in auth_sam - added printf style format attribute checking to samdb varargs fns - fix nt_time_to_unix() for zero and -1 times (This used to be commit 41f9b144f9fe77e92f960bd11b1df397a63fd2d5) --- source4/include/includes.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 5aa46c36cf..d067a0d214 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -683,7 +683,10 @@ typedef int (*comparison_fn_t)(const void *, const void *); #endif /***** automatically generated prototypes *****/ +#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "proto.h" +#undef _PRINTF_ATTRIBUTE +#define _PRINTF_ATTRIBUTE(a1, a2) /* String routines */ -- cgit From 98d291423ff581786a369ce373c861f94c654aa0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 1 Jun 2004 08:30:34 +0000 Subject: r961: convert 'uchar' to 'uint8_t' metze (This used to be commit 9f914e4af99e18b469d4cf9d8b1514a2bd28ddec) --- source4/include/includes.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index d067a0d214..808bb5dd78 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -432,10 +432,6 @@ typedef int socklen_t; #endif -#ifndef uchar -#define uchar unsigned char -#endif - /* Samba needs type definitions for int8_t, int16_t, int32_t, int64_t -- cgit From 2b7cd77ee2d640c32805af348e148c1f54a0a385 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 7 Jun 2004 12:06:26 +0000 Subject: r1065: some header file cleanups smb.h should end with only smb protocol specific stuff in it metze (This used to be commit fda8e59f3d057bf849598f96f78f50f62d8514fe) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 808bb5dd78..b3cd402e9f 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -638,6 +638,7 @@ extern int errno; #include "dynconfig.h" #include "version.h" +#include "rewrite.h" #include "smb.h" #include "ads.h" #include "nameserv.h" -- cgit From bf598954f75bfd924b9aa22649975b372c74a49e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 19 Jun 2004 08:15:41 +0000 Subject: r1198: Merge the Samba 3.0 ntlm_auth, including the kerberos and SPENGO parts. I have moved the SPNEGO and Kerberos code into libcli/auth, and intend to refactor them into the same format as NTLMSSP. Andrew Bartlett (This used to be commit 58da78a7460d5d0a4abee7d7b84799c228e6bc0b) --- source4/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b3cd402e9f..25725bdf4a 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -649,9 +649,11 @@ extern int errno; #include "md5.h" #include "hmacmd5.h" +#include "libcli/auth/spnego.h" #include "libcli/auth/ntlmssp.h" #include "libcli/auth/credentials.h" #include "libcli/auth/schannel.h" +#include "libcli/auth/kerberos.h" #include "auth/auth.h" -- cgit From be081037e09bb78c0308cd6c7a5d7ae563678b7c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 20 Jun 2004 00:58:09 +0000 Subject: r1200: Add 'gensec', our generic security layer. This layer is used for DCERPC security, as well as ntlm_auth at this time. It expect things like SASL and the CIFS layer to use it as well. The particular purpose of this layer is to introduce SPENGO, which needs generic access to the actual implementation mechanisms. Schannel, due to it's 'interesting' setup properties is in GENSEC, but is only in the RPC code. Andrew Bartlett (This used to be commit 902af49006fb8cfecaadd3cc0c10e2e542083fb1) --- source4/include/includes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 25725bdf4a..cd5de0d64e 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -649,11 +649,12 @@ extern int errno; #include "md5.h" #include "hmacmd5.h" -#include "libcli/auth/spnego.h" #include "libcli/auth/ntlmssp.h" #include "libcli/auth/credentials.h" #include "libcli/auth/schannel.h" #include "libcli/auth/kerberos.h" +#include "libcli/auth/gensec.h" +#include "libcli/auth/spnego.h" #include "auth/auth.h" -- cgit From d62cb6c005a33724ba3ef1c57059ce53bc4aa3e7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 28 Jun 2004 08:45:27 +0000 Subject: r1281: move include/context.h to smb_server/smb_server.h metze (This used to be commit 7b4ad993ad7c937ef9bee1a48a8bda62f2f5d3b9) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index cd5de0d64e..080abc890c 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -669,7 +669,7 @@ extern int errno; #include "librpc/rpc/dcerpc.h" #include "rpc_server/dcerpc_server.h" -#include "context.h" +#include "smb_server/smb_server.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "registry.h" -- cgit From e3fd2d049216f79ced472e2af790ca6ffefba442 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 11 Jul 2004 01:01:48 +0000 Subject: r1432: - Move the various Gtk-specific parts from the registry code into a directory gtk/ - Move common "Samba-Gtk" code into gtk/common/ ("Connect to RPC pipe"-dialog, etc) - Add a new utility 'gwcrontab' that can currently list, delete and add 'atsvc' jobs. It still displays times and dates as integers though, will fix that later. Some screenshots available at: http://samba.org/~jelmer/gwcrontab/ (This used to be commit d321cf20f1f0ff33603b013c26d370669f255868) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 080abc890c..8b60881cec 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -673,6 +673,7 @@ extern int errno; #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "registry.h" +#include "gtk/common/gtk-smb.h" #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) -- cgit From ec3a86254b41988b453da33112c9309f1ec2eb36 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 11 Jul 2004 16:16:02 +0000 Subject: r1454: Today is the day of broken builds, now I get my share ... :-) Add a missing file. Volker (This used to be commit 2bc6147c118a61f7f37f3414cce3df44625ade65) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 8b60881cec..0283f0bb8a 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -673,6 +673,7 @@ extern int errno; #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "registry.h" +#include "rap.h" #include "gtk/common/gtk-smb.h" #define malloc_p(type) (type *)malloc(sizeof(type)) -- cgit From 805ebe10848316f357553cac516187475989abae Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 11 Jul 2004 20:16:02 +0000 Subject: r1455: More Gtk+ updates: - Start working on 'gwsam' - Add GtkSelectDomainDialog and GtkSelectHostDialog (This used to be commit bea47671aa791f3c4d22263f9444aea1a73f47f1) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 0283f0bb8a..058d547736 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -675,6 +675,7 @@ extern int errno; #include "registry.h" #include "rap.h" #include "gtk/common/gtk-smb.h" +#include "gtk/common/select.h" #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) -- cgit From 45a85bdd353418828df8017a9d7eb7c14f6f0cd3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 13 Jul 2004 21:04:56 +0000 Subject: r1486: commit the start of the generic server infastructure the idea is to have services as modules (smb, dcerpc, swat, ...) the process_model don't know about the service it self anymore. TODO: - the smbsrv should use the smbsrv_send function - the service subsystem init should be done like for other modules - we need to have a generic socket subsystem, which handle stream, datagram, and virtuell other sockets( e.g. for the ntvfs_ipc module to connect to the dcerpc server , or for smb or dcerpc or whatever to connect to a server wide auth service) - and other fixes... NOTE: process model pthread seems to be broken( but also before this patch!) metze (This used to be commit bbe5e00715ca4013ff0dbc345aa97adc6b5c2458) --- source4/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 058d547736..9ce2b71982 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -668,6 +668,8 @@ extern int errno; #include "librpc/rpc/dcerpc.h" +#include "smbd/server.h" +#include "smbd/service.h" #include "rpc_server/dcerpc_server.h" #include "smb_server/smb_server.h" #include "ntvfs/ntvfs.h" -- cgit From b3c46674a670ea51607d5c2a73271dff531ae7d6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 16 Jul 2004 02:54:57 +0000 Subject: r1521: Updates to our SMB signing code. - This causes our client and server code to use the same core code, with the same debugs etc. - In turn, this will allow the 'mandetory/fallback' signing algorithms to be shared, and only written once. Updates to the SPNEGO code - Don't wrap an empty token to the server, if we are actually already finished. Andrew Bartlett (This used to be commit 35b83eb329482ac1b3bc67285854cc47844ff353) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 9ce2b71982..1e6cc0e5a4 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -671,6 +671,7 @@ extern int errno; #include "smbd/server.h" #include "smbd/service.h" #include "rpc_server/dcerpc_server.h" +#include "request.h" #include "smb_server/smb_server.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" -- cgit From fa8d37adae70a5f479262b722e47aa7fc21aaf5c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 12 Aug 2004 04:55:59 +0000 Subject: r1756: merge volkers ldap client lib to samba4 for simo to start with the ldap server code it's not compiled in yet... metze (This used to be commit 48939adca1332ff90f9287311c0e9ff3e2e5917a) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 1e6cc0e5a4..3821269f2b 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -641,6 +641,7 @@ extern int errno; #include "rewrite.h" #include "smb.h" #include "ads.h" +#include "libcli/ldap/ldap.h" #include "nameserv.h" #include "secrets.h" -- cgit From 28ea8b8785e5e8e3b3f3ddf0c12c0c8c69ea77c5 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 12 Aug 2004 19:29:52 +0000 Subject: r1785: remove unneeded dependencies on openldap client libraries (This used to be commit 44083e317855f6d8a0b4a81002a3376e8775df28) --- source4/include/includes.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 3821269f2b..e13175ecb7 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -379,16 +379,6 @@ #undef HAVE_KRB5 #endif -#if HAVE_LBER_H -#include -#endif - -#if HAVE_LDAP_H -#include -#else -#undef HAVE_LDAP -#endif - #if HAVE_GSSAPI_H #include #endif -- cgit From 7b088a8f654f34911928dcdf320ca3cf79592aed Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 13 Aug 2004 00:16:57 +0000 Subject: r1796: Enable server-side SPNEGO, now that I have fixed the server-side SMB signing code to be able to cope. Andrew Bartlett (This used to be commit cb74d52b563730a50e33c92d868c45ee96a598e8) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index e13175ecb7..f2900697f9 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -663,6 +663,7 @@ extern int errno; #include "smbd/service.h" #include "rpc_server/dcerpc_server.h" #include "request.h" +#include "signing.h" #include "smb_server/smb_server.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" -- cgit From d3e7a22630aa931d55ed44a695a0b05344bc6098 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 16 Aug 2004 16:52:57 +0000 Subject: r1836: - as abartlet said to me, we need to contact the users domain pdcfor doing a password change - add start of libnet_SetPassword - use KRB5 and LDAP instead of ADS as ADS isn't a protocol - add start of lib_rpc_connect() metze (This used to be commit 05c40dca8ad1ab020aa75282da046f1dbce2a52a) --- source4/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index f2900697f9..53a5a969e5 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -672,6 +672,8 @@ extern int errno; #include "gtk/common/gtk-smb.h" #include "gtk/common/select.h" +#include "libnet/libnet.h" + #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) #define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count) -- cgit From f7c842707afac05aebaba5c6868a73091a98bb3e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Aug 2004 10:35:46 +0000 Subject: r1877: since make proto catches all functions the inlcude has to move to includes.h metze (This used to be commit 97fe38183b6a03c01f6ac2d28a958d632eb4ff8a) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 53a5a969e5..c4b8f24397 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -673,6 +673,7 @@ extern int errno; #include "gtk/common/select.h" #include "libnet/libnet.h" +#include "utils/net/net.h" #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) -- cgit From 045bdb356f3f35ca65279d55cedad45fc65185e8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 19 Aug 2004 07:54:38 +0000 Subject: r1902: we need to include popt.h before popt_common.h metze (This used to be commit edde7497e9e06be0e51e886981725271a85bd9e5) --- source4/include/includes.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index c4b8f24397..c67b3c8195 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -653,8 +653,6 @@ extern int errno; #include "asn_1.h" -#include "popt.h" - #include "mutex.h" #include "librpc/rpc/dcerpc.h" -- cgit From 3ddde3b74c0e387ea431d9f77a3f930c9f1f2776 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 7 Sep 2004 22:02:44 +0000 Subject: r2242: some older versions of gcc don't properly handle the PRINTF_ATTRIBUTE() format checking magic, so only enable it for gcc versions >= 3.0 (This used to be commit 9c7100e3c770fca163d3788fc6b735457f74d7e9) --- source4/include/includes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index c67b3c8195..7ea85b4fb9 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -53,10 +53,11 @@ #define PRINTCAP_NAME "/etc/printcap" #endif -#ifdef __GNUC__ +#if (__GNUC__ >= 3) /** Use gcc attribute to check printf fns. a1 is the 1-based index of * the parameter containing the format, and a2 the index of the first - * argument. **/ + * argument. Note that some gcc 2.x versions don't handle this + * properly **/ #define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) #else #define PRINTF_ATTRIBUTE(a1, a2) -- cgit From a560d554bdfade75b81780e427e51cc436d9488a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 13 Sep 2004 10:36:59 +0000 Subject: r2321: add complately untested LDAP server start based on volker's patch this is compiled by default but not started by default metze (This used to be commit 5387bc423d4dc669cbac6626f8dd3a5498a6519d) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 7ea85b4fb9..33806ab36f 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -668,6 +668,7 @@ extern int errno; #include "cli_context.h" #include "registry.h" #include "rap.h" +#include "ldap_server/ldap_server.h" #include "gtk/common/gtk-smb.h" #include "gtk/common/select.h" -- cgit From ce694e7051dca90cdb5700e3865315d16931c3c1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 13 Sep 2004 14:17:41 +0000 Subject: r2328: add the start of a new system and protocol independent socket library. this is not used, but compiled currently there're maybe some api changes later... metze (This used to be commit de4447d7a57c614b80d0ac00dca900ea7e1c21ea) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 33806ab36f..b033d584f8 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -632,6 +632,7 @@ extern int errno; #include "rewrite.h" #include "smb.h" #include "ads.h" +#include "lib/socket/socket.h" #include "libcli/ldap/ldap.h" #include "nameserv.h" #include "secrets.h" -- cgit From 03cb4367d67ba9cdedf22df743d25d81093941d7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 18 Sep 2004 08:16:14 +0000 Subject: r2404: the first large lump of posix vfs stuff. this is still very much a skeleton (with many limbs missing too!). I am committing this early to get some feedback on the approach taken. (This used to be commit 40d5cae5ebbfe328e193eadb685df6a370730299) --- source4/include/includes.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b033d584f8..bf566a01d6 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -676,6 +676,11 @@ extern int errno; #include "libnet/libnet.h" #include "utils/net/net.h" +/* hmm, this really is getting ugly isn't it .... we probably need to + have some way to have subsystem includes without including it + globally */ +#include "ntvfs/posix/vfs_posix.h" + #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) #define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count) -- cgit From 930c32472fca7aeeffdf3406ac4114a3a99000f5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 22 Sep 2004 11:24:07 +0000 Subject: r2510: Make C++ compilers happy, use ifdef instead of if (This used to be commit 7c31998da148cca53e798e3d89b9b754de2e64ac) --- source4/include/includes.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index bf566a01d6..a5fd620049 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -374,25 +374,25 @@ #endif #endif -#if HAVE_KRB5_H +#ifdef HAVE_KRB5_H #include #else #undef HAVE_KRB5 #endif -#if HAVE_GSSAPI_H +#ifdef HAVE_GSSAPI_H #include #endif -#if HAVE_GSSAPI_GSSAPI_H +#ifdef HAVE_GSSAPI_GSSAPI_H #include #endif -#if HAVE_GSSAPI_GSSAPI_GENERIC_H +#ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H #include #endif -#if HAVE_COM_ERR_H +#ifdef HAVE_COM_ERR_H #include #endif -- cgit From 00e05a0b8ba4c6b16a53d20fa5a8eef8fbd6263a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 24 Sep 2004 04:49:45 +0000 Subject: r2582: Merge checks for xattr and acl libraries from Samba3 so the {get,set}ntacl programs can build on non-xattr machines. (This used to be commit daad76207dbb4060c231a58c99970e837e1e858f) --- source4/include/includes.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index a5fd620049..8b20ee9b4f 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -1057,5 +1057,16 @@ time_t timegm(struct tm *tm); #define VXFS_QUOTA #endif +#if HAVE_SYS_ATTRIBUTES_H +#include +#endif + +/* mutually exclusive (SuSE 8.2) */ +#if HAVE_ATTR_XATTR_H +#include +#elif HAVE_SYS_XATTR_H +#include +#endif + #endif /* _INCLUDES_H */ -- cgit From 797d80879c89cedce5992ec4a67b61d2711421a7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 25 Sep 2004 12:36:36 +0000 Subject: r2632: a new approach to handling const errors. We have had huge numbers of const warnings for a long time, and no real way to approach a solution. Some of them are unavoidable due to the way the C standard works (for example, any function that provides strchr() like functionality _must_ produce a const warning) I will be converting a bunch of places that currently produce const warnings to use the discard_const_p(). Some of these will be unavoidable const problems, some of them will be ones we will fix up over time. At least this change means we will no longer be swamped with const warnings, and we will easily be able to see when new problems emerge. (This used to be commit fec3288ad6ce58e8273e3f16e88037db49ecf046) --- source4/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 8b20ee9b4f..d29353cafc 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -1068,5 +1068,7 @@ time_t timegm(struct tm *tm); #include #endif +#define discard_const_p(type, ptr) (type *)discard_const(ptr) + #endif /* _INCLUDES_H */ -- cgit From 4f13ebef5d6711ac121b9c41e2fbbe2cd3b6da0e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 29 Sep 2004 06:31:14 +0000 Subject: r2744: ben elliston taught me about gcov today, which allows you to measure the % coverage in terms of lines of code of a test suite. I thought a good first place to start with gcov was the talloc test suite. When I started the test suite covered about 60% of all lines of code in talloc.c, and now it covers about 99%. The only lines not covered are talloc corruption errors, as that would cause smb_panic() to fire. It will be interesting to try gcov on the main Samba test suite for smbd. We won't achieve 100% coverage, but it would be nice to get to 90% or more. I also modified the talloc.c sources to be able to be build standalone, using: gcc -c -D_STANDALONE_ -Iinlcude lib/talloc.c that should make it much easier to re-use talloc in other projects (This used to be commit 8d4dc99b82efdf24b6811851c7bdd4af5a4c52c9) --- source4/include/includes.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index d29353cafc..06e9b91347 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -1068,7 +1068,9 @@ time_t timegm(struct tm *tm); #include #endif -#define discard_const_p(type, ptr) (type *)discard_const(ptr) +#define discard_const_p(type, ptr) ((type *)discard_const(ptr)) + +#define TALLOC_ABORT(reason) smb_panic(reason) #endif /* _INCLUDES_H */ -- cgit From 598e82e7ad9377138b5a899724083fc5d808a249 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 Oct 2004 01:03:27 +0000 Subject: r2900: rusty pointed out to me that discard_const() can be done via a macro on systems that have the intptr_t type, and for systems that don't have it, they also almost certainly won't have -Wcast-qual, so we can use a void* cast. (This used to be commit 2132d38f9c5ba59825558d5ba084a514ebc2626b) --- source4/include/includes.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 06e9b91347..94d15eff3f 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -1068,9 +1068,29 @@ time_t timegm(struct tm *tm); #include #endif -#define discard_const_p(type, ptr) ((type *)discard_const(ptr)) - #define TALLOC_ABORT(reason) smb_panic(reason) + +/* + this is a warning hack. The idea is to use this everywhere that we + get the "discarding const" warning from gcc. That doesn't actually + fix the problem of course, but it means that when we do get to + cleaning them up we can do it by searching the code for + discard_const. + + It also means that other error types aren't as swamped by the noise + of hundreds of const warnings, so we are more likely to notice when + we get new errors. + + Please only add more uses of this macro when you find it + _really_ hard to fix const warnings. Our aim is to eventually use + this function in only a very few places. + + Also, please call this via the discard_const_p() macro interface, as that + makes the return type safe. +*/ +#define discard_const(ptr) ((void *)((intptr_t)(ptr))) +#define discard_const_p(type, ptr) ((type *)discard_const(ptr)) + #endif /* _INCLUDES_H */ -- cgit From 0bd8d427d0ebe324ee40dfd18970a336b4740079 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Oct 2004 13:27:52 +0000 Subject: r2951: fixed the intptr_t test for discard_const() (This used to be commit 3318cf2722597e57d1731152b2607f6b167e45b9) --- source4/include/includes.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 94d15eff3f..86ddc81e57 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -1089,7 +1089,11 @@ time_t timegm(struct tm *tm); Also, please call this via the discard_const_p() macro interface, as that makes the return type safe. */ +#ifdef HAVE_INTPTR_T #define discard_const(ptr) ((void *)((intptr_t)(ptr))) +#else +#define discard_const(ptr) ((void *)(ptr)) +#endif #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) #endif /* _INCLUDES_H */ -- cgit From 12ea0fd34cec2d7b6d8c8374dfd95728112585b3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 16 Oct 2004 13:47:00 +0000 Subject: r3005: added talloc wrappers around tdb_open() and ldb_connect(), so that the caller doesn't have to worry about the constraint of only opening a database a single time in a process. These wrappers will ensure that only a single open is done, and will auto-close when the last instance is gone. When you are finished with a database pointer, use talloc_free() to close it. note that this code does not take account of the threads process model, and does not yet take account of symlinks or hard links to tdb files. (This used to be commit 04e1171996612ddb15f84134cadded68f0d173b2) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 86ddc81e57..85e4299efd 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -619,6 +619,7 @@ extern int errno; #include "lib/tdb/include/spinlock.h" #include "lib/tdb/include/tdbutil.h" #include "talloc.h" +#include "db_wrap.h" #include "nt_status.h" #include "interfaces.h" #include "trans2.h" -- cgit From 72093ce62f1e09db86452720fe8280ad66824cde Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 19 Oct 2004 12:06:01 +0000 Subject: r3064: - use UINT8_MAX and UINT16_MAX instead of hex values for idr_get_new() limits - change idr_get_new() to use > instead of >= in the limit check (This used to be commit 834b09929bcb8aabdd151b7c2306001497cabdb4) --- source4/include/includes.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 85e4299efd..0290f652ab 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -466,6 +466,14 @@ typedef int socklen_t; #define uint64 uint64_t #endif +#ifndef UINT8_MAX +#define UINT8_MAX 255 +#endif + +#ifndef UINT16_MAX +#define UINT16_MAX 65535 +#endif + /* * Types for devices, inodes and offsets. */ -- cgit From 7397361dae8424c9da24a04576c93bf8470041ee Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 25 Oct 2004 01:34:56 +0000 Subject: r3175: Add winbind back into includes.h (spotted by tpot) Andrew Bartlett (This used to be commit 2b0f04167d6512c7eaa44f8234f0be63c55f9582) --- source4/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 0290f652ab..9438b468f5 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -685,6 +685,8 @@ extern int errno; #include "libnet/libnet.h" #include "utils/net/net.h" +#include "nsswitch/winbind_client.h" + /* hmm, this really is getting ugly isn't it .... we probably need to have some way to have subsystem includes without including it globally */ -- cgit From feff2e9cbdd2e3e8e9db5d9b01b5d5cec42943c0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 30 Oct 2004 11:07:28 +0000 Subject: r3390: fixed schannel server side support. RPC-SCHANNEL now works against Samba4. (This used to be commit 01f5c1c72d9fc8f21029adc586154b0c54f76c9e) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 9438b468f5..9df5e23816 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -653,7 +653,6 @@ extern int errno; #include "libcli/auth/ntlmssp.h" #include "libcli/auth/credentials.h" -#include "libcli/auth/schannel.h" #include "libcli/auth/kerberos.h" #include "libcli/auth/gensec.h" #include "libcli/auth/spnego.h" -- cgit From 37fffa54cf7edb208dcb060c642f5b0acf11d4e6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 05:26:28 +0000 Subject: r3424: don't run mkproto.pl on pidl generated code, instead rely on pidl generating the prototypes itself (This used to be commit e694aeefe7c725d417abdd3c48d16ff1d932c223) --- source4/include/includes.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 9df5e23816..7ff466b7d7 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -651,13 +651,6 @@ extern int errno; #include "md5.h" #include "hmacmd5.h" -#include "libcli/auth/ntlmssp.h" -#include "libcli/auth/credentials.h" -#include "libcli/auth/kerberos.h" -#include "libcli/auth/gensec.h" -#include "libcli/auth/spnego.h" - -#include "auth/auth.h" #include "module.h" @@ -665,8 +658,21 @@ extern int errno; #include "mutex.h" +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/ndr_misc.h" +#include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" +#include "librpc/ndr/ndr_sec.h" +#include "librpc/gen_ndr/tables.h" + +#include "libcli/auth/ntlmssp.h" +#include "libcli/auth/credentials.h" +#include "libcli/auth/kerberos.h" +#include "libcli/auth/gensec.h" +#include "libcli/auth/spnego.h" +#include "auth/auth.h" +#include "smb_interfaces.h" #include "smbd/server.h" #include "smbd/service.h" #include "rpc_server/dcerpc_server.h" -- cgit From 90067934cd3195df80f8b1e614629d51fffcb38b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 10:30:34 +0000 Subject: r3428: switched to using minimal includes for the auto-generated RPC code. The thing that finally convinced me that minimal includes was worth pursuing for rpc was a compiler (tcc) that failed to build Samba due to reaching internal limits of the size of include files. Also the fact that includes.h.gch was 16MB, which really seems excessive. This patch brings it back to 12M, which is still too large, but better. Note that this patch speeds up compile times for both the pch and non-pch case. This change also includes the addition iof a "depends()" option in our IDL files, allowing you to specify that one IDL file depends on another. This capability was needed for the auto-includes generation. (This used to be commit b8f5fa8ac8e8725f3d321004f0aedf4246fc6b49) --- source4/include/includes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 7ff466b7d7..b61429edd6 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -658,11 +658,12 @@ extern int errno; #include "mutex.h" +#include "structs.h" #include "librpc/ndr/libndr.h" +#include "librpc/ndr/ndr_sec.h" #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" -#include "librpc/ndr/ndr_sec.h" #include "librpc/gen_ndr/tables.h" #include "libcli/auth/ntlmssp.h" -- cgit From 652b8b34f8b326f79771b03e039cfa3c6ba3427e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 20:21:54 +0000 Subject: r3441: some include file cleanups and general housekeeping (This used to be commit 73ea8ee6c268371d05cf74160f2ad451dd2ae699) --- source4/include/includes.h | 166 --------------------------------------------- 1 file changed, 166 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b61429edd6..374abc4c37 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -474,121 +474,10 @@ typedef int socklen_t; #define UINT16_MAX 65535 #endif -/* - * Types for devices, inodes and offsets. - */ - -#ifndef SMB_DEV_T -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_DEV64_T) -# define SMB_DEV_T dev64_t -# else -# define SMB_DEV_T dev_t -# endif -#endif - -/* - * Setup the correctly sized inode type. - */ - -#ifndef SMB_INO_T -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_INO64_T) -# define SMB_INO_T ino64_t -# else -# define SMB_INO_T ino_t -# endif -#endif - -#ifndef LARGE_SMB_INO_T -# if (defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_INO64_T)) || (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 -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) -# define SMB_OFF_T off64_t -# else -# define SMB_OFF_T off_t -# endif -#endif - -/* - * Set the define that tells us if we can do 64 bit - * NT SMB calls. - */ - -#ifndef LARGE_SMB_OFF_T -# if (defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T)) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)) -# define LARGE_SMB_OFF_T 1 -# endif -#endif - /* * Type for stat structure. */ -#ifndef SMB_STRUCT_STAT -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STAT64) && defined(HAVE_OFF64_T) -# define SMB_STRUCT_STAT struct stat64 -# else -# define SMB_STRUCT_STAT struct stat -# endif -#endif - -/* - * Type for dirent structure. - */ - -#ifndef SMB_STRUCT_DIRENT -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_DIRENT64) -# define smb_dirent dirent64 -# else -# define smb_dirent dirent -# endif -#endif - -/* - * Defines for 64 bit fcntl locks. - */ - -#ifndef SMB_STRUCT_FLOCK -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_STRUCT_FLOCK struct flock64 -# else -# define SMB_STRUCT_FLOCK struct flock -# endif -#endif - -#ifndef SMB_F_SETLKW -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_F_SETLKW F_SETLKW64 -# else -# define SMB_F_SETLKW F_SETLKW -# endif -#endif - -#ifndef SMB_F_SETLK -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_F_SETLK F_SETLK64 -# else -# define SMB_F_SETLK F_SETLK -# endif -#endif - -#ifndef SMB_F_GETLK -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_F_GETLK F_GETLK64 -# else -# define SMB_F_GETLK F_GETLK -# endif -#endif - #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif @@ -970,55 +859,12 @@ int vasprintf(char **ptr, const char *format, va_list ap); #define LOG_DEBUG 7 /* debug-level messages */ #endif -/* NetBSD doesn't have these */ -#ifndef SHM_R -#define SHM_R 0400 -#endif - -#ifndef SHM_W -#define SHM_W 0200 -#endif - -#if HAVE_KERNEL_SHARE_MODES -#ifndef LOCK_MAND -#define LOCK_MAND 32 /* This is a mandatory flock */ -#define LOCK_READ 64 /* ... Which allows concurrent read operations */ -#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ -#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ -#endif -#endif - extern int DEBUGLEVEL; -#define MAX_SEC_CTX_DEPTH 8 /* Maximum number of security contexts */ - - -#ifdef GLIBC_HACK_FCNTL64 -/* this is a gross hack. 64 bit locking is completely screwed up on - i386 Linux in glibc 2.1.95 (which ships with RedHat 7.0). This hack - "fixes" the problem with the current 2.4.0test kernels -*/ -#define fcntl fcntl64 -#undef F_SETLKW -#undef F_SETLK -#define F_SETLK 13 -#define F_SETLKW 14 -#endif - - -/* Needed for sys_dlopen/sys_dlsym/sys_dlclose */ -#ifndef RTLD_GLOBAL -#define RTLD_GLOBAL 0 -#endif - #ifndef RTLD_LAZY #define RTLD_LAZY 0 #endif -#ifndef RTLD_NOW -#define RTLD_NOW 0 -#endif - /* needed for some systems without iconv. Doesn't really matter what error code we use */ #ifndef EILSEQ @@ -1026,9 +872,6 @@ extern int DEBUGLEVEL; #endif /* add varargs prototypes with printf checking */ -int fdprintf(int , const char *, ...) PRINTF_ATTRIBUTE(2,3); -int d_printf(const char *, ...) PRINTF_ATTRIBUTE(1,2); -int d_fprintf(FILE *f, const char *, ...) PRINTF_ATTRIBUTE(2,3); #ifndef HAVE_SNPRINTF_DECL int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4); #endif @@ -1036,19 +879,10 @@ int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4); int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #endif -void sys_adminlog(int priority, const char *format_str, ...) PRINTF_ATTRIBUTE(2,3); - -int pstr_sprintf(pstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); -int fstr_sprintf(fstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); - -int d_vfprintf(FILE *f, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0); - -int smb_xvasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0); /* we used to use these fns, but now we have good replacements for snprintf and vsnprintf */ #define slprintf snprintf -#define vslprintf vsnprintf /* we need to use __va_copy() on some platforms */ -- cgit From 284349482f5293a9a23d0f72d7c2aab46b55843b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 22:48:25 +0000 Subject: r3443: the next stage in the include files re-organisation. I have created the include/system/ directory, which will contain the wrappers for the system includes for logical subsystems. So far I have created include/system/kerberos.h and include/system/network.h, which contain all the system includes for kerberos code and networking code. These are the included in subsystems that need kerberos or networking respectively. Note that this method avoids the mess of #ifdef HAVE_XXX_H in every C file, instead each C module includes the include/system/XXX.h file for the logical system support it needs, and the details are kept isolated in include/system/ This patch also creates a "struct ipv4_addr" which replaces "struct in_addr" in our code. That avoids every C file needing to import all the system networking headers. (This used to be commit 2e25c71853f8996f73755277e448e7d670810349) --- source4/include/includes.h | 78 ++++++---------------------------------------- 1 file changed, 9 insertions(+), 69 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 374abc4c37..a9198dbc1d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -83,6 +83,7 @@ #endif /* RELIANTUNIX */ #include +#include #ifdef TIME_WITH_SYS_TIME #include @@ -114,14 +115,6 @@ #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -#ifdef HAVE_UNIXSOCKET -#include -#endif - #ifdef HAVE_SYS_SYSCALL_H #include #elif HAVE_SYSCALL_H @@ -213,10 +206,6 @@ #include #endif -#include -#include -#include - #ifdef HAVE_SYSLOG_H #include #else @@ -227,27 +216,6 @@ #include -#ifdef HAVE_NETINET_TCP_H -#include -#endif - -/* - * The next three defines are needed to access the IPTOS_* options - * on some systems. - */ - -#ifdef HAVE_NETINET_IN_SYSTM_H -#include -#endif - -#ifdef HAVE_NETINET_IN_IP_H -#include -#endif - -#ifdef HAVE_NETINET_IP_H -#include -#endif - #if defined(HAVE_TERMIOS_H) /* POSIX terminal handling. */ #include @@ -280,11 +248,6 @@ #include #endif -#ifdef HAVE_NET_IF_H -#include -#endif - - #ifdef HAVE_SYS_MOUNT_H #include #endif @@ -374,28 +337,6 @@ #endif #endif -#ifdef HAVE_KRB5_H -#include -#else -#undef HAVE_KRB5 -#endif - -#ifdef HAVE_GSSAPI_H -#include -#endif - -#ifdef HAVE_GSSAPI_GSSAPI_H -#include -#endif - -#ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H -#include -#endif - -#ifdef HAVE_COM_ERR_H -#include -#endif - /* we support ADS if we want it and have krb5 and ldap libs */ #if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) #define HAVE_ADS @@ -466,6 +407,14 @@ typedef int socklen_t; #define uint64 uint64_t #endif +/* + we use struct ipv4_addr to avoid having to include all the + system networking headers everywhere +*/ +struct ipv4_addr { + uint32_t s_addr; +}; + #ifndef UINT8_MAX #define UINT8_MAX 255 #endif @@ -518,7 +467,6 @@ extern int errno; #include "talloc.h" #include "db_wrap.h" #include "nt_status.h" -#include "interfaces.h" #include "trans2.h" #include "ioctl.h" #include "nterr.h" @@ -557,7 +505,6 @@ extern int errno; #include "libcli/auth/ntlmssp.h" #include "libcli/auth/credentials.h" -#include "libcli/auth/kerberos.h" #include "libcli/auth/gensec.h" #include "libcli/auth/spnego.h" #include "auth/auth.h" @@ -721,13 +668,6 @@ unsigned long strtoul(const char *nptr, char **endptr, int base); int setenv(const char *name, const char *value, int overwrite); #endif -#if (defined(USE_SETRESUID) && !defined(HAVE_SETRESUID_DECL)) -/* stupid glibc */ -int setresuid(uid_t ruid, uid_t euid, uid_t suid); -#endif -#if (defined(USE_SETRESUID) && !defined(HAVE_SETRESGID_DECL)) -int setresgid(gid_t rgid, gid_t egid, gid_t sgid); -#endif #ifndef HAVE_VASPRINTF_DECL int vasprintf(char **ptr, const char *format, va_list ap); #endif -- cgit From f20f1f994ac375ab96cc8a38075b99aa20041b3f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 23:37:12 +0000 Subject: r3445: made the gtk tooks use minimal includes. This approximately halves the total include lines in compiling C files in Samba (the .gch file is now 5M instead of 12M) This also gets rid of the silly gtk compile warning for non-gtk code (This used to be commit 8ebd20cf551c8c1fad98ec723d91873fa202b85a) --- source4/include/includes.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index a9198dbc1d..192ec548fd 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -161,9 +161,6 @@ #include -#ifdef HAVE_SYS_WAIT_H -#include -#endif #ifdef HAVE_CTYPE_H #include #endif @@ -521,8 +518,6 @@ extern int errno; #include "registry.h" #include "rap.h" #include "ldap_server/ldap_server.h" -#include "gtk/common/gtk-smb.h" -#include "gtk/common/select.h" #include "libnet/libnet.h" #include "utils/net/net.h" -- cgit From 28785364baec1fbbf66de9ca38f397d7cc5c2c67 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 23:45:40 +0000 Subject: r3446: created include/system/iconv.h and include/system/shmem.h (This used to be commit 70055fb1f499cd40e996e56c7ba9ef8d2267b421) --- source4/include/includes.h | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 192ec548fd..914ec2f4ea 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -317,23 +317,6 @@ #endif -#if defined(HAVE_SYS_IPC_H) -#include -#endif /* HAVE_SYS_IPC_H */ - -#if defined(HAVE_SYS_SHM_H) -#include -#endif /* HAVE_SYS_SHM_H */ - -#ifdef HAVE_NATIVE_ICONV -#ifdef HAVE_ICONV -#include -#endif -#ifdef HAVE_GICONV -#include -#endif -#endif - /* we support ADS if we want it and have krb5 and ldap libs */ #if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) #define HAVE_ADS -- cgit From ead3508ac81ff3ed2a48753f3b5e23537ba6ec73 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 00:24:21 +0000 Subject: r3447: more include/system/XXX.h include files (This used to be commit 264ce9181089922547e8f6f67116f2d7277a5105) --- source4/include/includes.h | 156 --------------------------------------------- 1 file changed, 156 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 914ec2f4ea..24319cad06 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -72,37 +72,18 @@ /** Feel free to add definitions for other compilers here. */ #endif -#ifdef RELIANTUNIX -/* - * has to be included before any other to get - * large file support on Reliant UNIX. Yes, it's broken :-). - */ #ifdef HAVE_UNISTD_H #include #endif -#endif /* RELIANTUNIX */ #include #include -#ifdef TIME_WITH_SYS_TIME -#include -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif - #ifdef HAVE_SYS_RESOURCE_H #include #endif -#ifdef HAVE_UNISTD_H #include -#endif #include #include @@ -115,12 +96,6 @@ #include #endif -#ifdef HAVE_SYS_SYSCALL_H -#include -#elif HAVE_SYSCALL_H -#include -#endif - #ifdef HAVE_STRING_H #include #endif @@ -164,26 +139,9 @@ #ifdef HAVE_CTYPE_H #include #endif -#ifdef HAVE_GRP_H -#include -#endif -#ifdef HAVE_SYS_PRIV_H -#include -#endif -#ifdef HAVE_SYS_ID_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 @@ -191,132 +149,18 @@ #endif #endif -#ifdef HAVE_GLOB_H -#include -#endif - -#include - #ifdef HAVE_STDARG_H #include #else #include #endif -#ifdef HAVE_SYSLOG_H -#include -#else -#ifdef HAVE_SYS_SYSLOG_H -#include -#endif -#endif - #include -#if defined(HAVE_TERMIOS_H) -/* POSIX terminal handling. */ -#include -#elif defined(HAVE_TERMIO_H) -/* Older SYSV terminal handling - don't use if we can avoid it. */ -#include -#elif defined(HAVE_SYS_TERMIO_H) -/* Older SYSV terminal handling - don't use if we can avoid it. */ -#include -#endif - -#if HAVE_DIRENT_H -# include -# define NAMLEN(dirent) strlen((dirent)->d_name) -#else -# define dirent direct -# define NAMLEN(dirent) (dirent)->d_namlen -# if HAVE_SYS_NDIR_H -# include -# endif -# if HAVE_SYS_DIR_H -# include -# endif -# if HAVE_NDIR_H -# include -# endif -#endif - -#ifdef HAVE_SYS_MMAN_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_SYS_CAPABILITY_H - -#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) -#define _I386_STATFS_H -#define BROKEN_REDHAT_7_STATFS_WORKAROUND -#endif - -#include - -#ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND -#undef _I386_STATFS_H -#undef BROKEN_REDHAT_7_STATFS_WORKAROUND -#endif - -#endif - /* we support ADS if we want it and have krb5 and ldap libs */ #if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) #define HAVE_ADS -- cgit From 71107c0eb723545ef5807d58af2ab2f5d99d7206 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 00:30:45 +0000 Subject: r3448: some systems don't have stdint.h (This used to be commit 8afc2b3bc19c627f7b970ee6ce0480039ed5d3cb) --- source4/include/includes.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 24319cad06..c4926ee7c5 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -72,19 +72,18 @@ /** Feel free to add definitions for other compilers here. */ #endif -#ifdef HAVE_UNISTD_H #include -#endif #include +#ifdef HAVE_STDINT_H #include +#endif #ifdef HAVE_SYS_RESOURCE_H #include #endif #include - #include #include @@ -92,9 +91,7 @@ #include #endif -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_STRING_H #include -- cgit From 26c6b4c70bd85d8030a96651f2a255a4d48fcda1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 01:42:45 +0000 Subject: r3449: more include file reduction the ldb part isn't ideal, I will have to think of a better solution (This used to be commit 6b1f86aea8427a8e957b1aeb0ec2f507297f07cb) --- source4/include/includes.h | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index c4926ee7c5..a6a2354f67 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -73,26 +73,16 @@ #endif #include - #include -#ifdef HAVE_STDINT_H -#include -#endif - -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif - #include #include #include +#include -#ifdef HAVE_SYS_PARAM_H -#include +#ifdef HAVE_STDINT_H +#include #endif -#include - #ifdef HAVE_STRING_H #include #endif @@ -119,24 +109,12 @@ #include -#ifdef HAVE_LIMITS_H -#include -#endif - #ifdef HAVE_SYS_IOCTL_H #include #endif -#ifdef HAVE_SYS_FILIO_H -#include -#endif - #include -#ifdef HAVE_CTYPE_H -#include -#endif - #include #ifdef HAVE_SYS_MODE_H @@ -152,8 +130,6 @@ #include #endif -#include - #ifdef HAVE_STROPTS_H #include #endif @@ -281,11 +257,11 @@ extern int errno; /* Lists, trees, caching, database... */ #include "xfile.h" #include "dlinklist.h" +#include "talloc.h" #include "lib/ldb/include/ldb.h" #include "lib/tdb/include/tdb.h" #include "lib/tdb/include/spinlock.h" #include "lib/tdb/include/tdbutil.h" -#include "talloc.h" #include "db_wrap.h" #include "nt_status.h" #include "trans2.h" -- cgit From 452ddd94ba22bebe0fda5ee6a7ddceae2057fe40 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 02:01:04 +0000 Subject: r3450: portability fixes - fix rep_inet_ntoa() for IRIX - lib/signal.c needs system/wait.h - some systems define a macro "accept", which breaks the lib/socket/ structures. use fn_ as a prefix for the structure elements to avoid the problem (This used to be commit ced1a0fcdc8d8e47755ce4391c19f8b12862eb60) --- source4/include/includes.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index a6a2354f67..c38c0acc8b 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -379,10 +379,6 @@ typedef int (*comparison_fn_t)(const void *, const void *); #define PASSWORD_LENGTH 8 #endif -#ifdef REPLACE_INET_NTOA -#define inet_ntoa rep_inet_ntoa -#endif - #ifndef HAVE_PIPE #define SYNC_DNS 1 #endif -- cgit From edbfc0f6e70150e321822365bf0eead2821551bd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 02:57:18 +0000 Subject: r3453: - split out the auth and popt includes - tidied up some of the system includes - moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl knows about inter-IDL dependencies (This used to be commit 7b7477ac42d96faac1b0ff361525d2c63cedfc64) --- source4/include/includes.h | 165 +-------------------------------------------- 1 file changed, 1 insertion(+), 164 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index c38c0acc8b..f45665ad05 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -72,12 +72,10 @@ /** Feel free to add definitions for other compilers here. */ #endif -#include #include -#include #include -#include #include +#include #ifdef HAVE_STDINT_H #include @@ -87,53 +85,15 @@ #include #endif -#ifdef HAVE_STRINGS_H -#include -#endif - -#ifdef HAVE_MEMORY_H -#include -#endif - -#ifdef HAVE_MALLOC_H -#include -#endif - -#ifdef HAVE_FCNTL_H -#include -#else -#ifdef HAVE_SYS_FCNTL_H -#include -#endif -#endif - -#include - -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - #include - #include -#ifdef HAVE_SYS_MODE_H -/* apparently AIX needs this for S_ISLNK */ -#ifndef S_ISLNK -#include -#endif -#endif - #ifdef HAVE_STDARG_H #include #else #include #endif -#ifdef HAVE_STROPTS_H -#include -#endif - /* we support ADS if we want it and have krb5 and ldap libs */ #if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) #define HAVE_ADS @@ -220,10 +180,6 @@ struct ipv4_addr { #define UINT16_MAX 65535 #endif -/* - * Type for stat structure. - */ - #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif @@ -300,12 +256,6 @@ extern int errno; #include "librpc/rpc/dcerpc.h" #include "librpc/gen_ndr/tables.h" -#include "libcli/auth/ntlmssp.h" -#include "libcli/auth/credentials.h" -#include "libcli/auth/gensec.h" -#include "libcli/auth/spnego.h" -#include "auth/auth.h" - #include "smb_interfaces.h" #include "smbd/server.h" #include "smbd/service.h" @@ -491,105 +441,11 @@ int vasprintf(char **ptr, const char *format, va_list ap); #define MSG_WAITALL 0 #endif -/* 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 - /* Load header file for dynamic linking stuff */ - #ifdef HAVE_DLFCN_H #include #endif -/* dmalloc -- free heap debugger (dmalloc.org). This should be near - * the *bottom* of include files so as not to conflict. */ -#ifdef ENABLE_DMALLOC -# include -#endif - - -/* Some POSIX definitions for those without */ - -#ifndef S_IFDIR -#define S_IFDIR 0x4000 -#endif -#ifndef S_ISDIR -#define S_ISDIR(mode) ((mode & 0xF000) == S_IFDIR) -#endif -#ifndef S_IRWXU -#define S_IRWXU 00700 /* read, write, execute: owner */ -#endif -#ifndef S_IRUSR -#define S_IRUSR 00400 /* read permission: owner */ -#endif -#ifndef S_IWUSR -#define S_IWUSR 00200 /* write permission: owner */ -#endif -#ifndef S_IXUSR -#define S_IXUSR 00100 /* execute permission: owner */ -#endif -#ifndef S_IRWXG -#define S_IRWXG 00070 /* read, write, execute: group */ -#endif -#ifndef S_IRGRP -#define S_IRGRP 00040 /* read permission: group */ -#endif -#ifndef S_IWGRP -#define S_IWGRP 00020 /* write permission: group */ -#endif -#ifndef S_IXGRP -#define S_IXGRP 00010 /* execute permission: group */ -#endif -#ifndef S_IRWXO -#define S_IRWXO 00007 /* read, write, execute: other */ -#endif -#ifndef S_IROTH -#define S_IROTH 00004 /* read permission: other */ -#endif -#ifndef S_IWOTH -#define S_IWOTH 00002 /* write permission: other */ -#endif -#ifndef S_IXOTH -#define S_IXOTH 00001 /* execute permission: other */ -#endif - -/* For sys_adminlog(). */ -#ifndef LOG_EMERG -#define LOG_EMERG 0 /* system is unusable */ -#endif - -#ifndef LOG_ALERT -#define LOG_ALERT 1 /* action must be taken immediately */ -#endif - -#ifndef LOG_CRIT -#define LOG_CRIT 2 /* critical conditions */ -#endif - -#ifndef LOG_ERR -#define LOG_ERR 3 /* error conditions */ -#endif - -#ifndef LOG_WARNING -#define LOG_WARNING 4 /* warning conditions */ -#endif - -#ifndef LOG_NOTICE -#define LOG_NOTICE 5 /* normal but significant condition */ -#endif - -#ifndef LOG_INFO -#define LOG_INFO 6 /* informational */ -#endif - -#ifndef LOG_DEBUG -#define LOG_DEBUG 7 /* debug-level messages */ -#endif - extern int DEBUGLEVEL; #ifndef RTLD_LAZY @@ -631,25 +487,6 @@ time_t timegm(struct tm *tm); #define strlen(x) valgrind_strlen(x) #endif -/* - * Veritas File System. Often in addition to native. - * Quotas different. - */ -#if defined(HAVE_SYS_FS_VX_QUOTA_H) -#define VXFS_QUOTA -#endif - -#if HAVE_SYS_ATTRIBUTES_H -#include -#endif - -/* mutually exclusive (SuSE 8.2) */ -#if HAVE_ATTR_XATTR_H -#include -#elif HAVE_SYS_XATTR_H -#include -#endif - #define TALLOC_ABORT(reason) smb_panic(reason) -- cgit From 6148deca663f7b6504b044120b166d6c9ae28750 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 03:13:06 +0000 Subject: r3454: moved a few more things out if includes.h into the include/system/ include files. this brings us down to about 11k lines of headers included with includes.h, while still retaining the speed of building with pch (This used to be commit 10188869ef072309ca580b8b933e172571fcdda7) --- source4/include/includes.h | 55 ---------------------------------------------- 1 file changed, 55 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index f45665ad05..c511a5fb33 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -349,14 +349,6 @@ typedef int (*comparison_fn_t)(const void *, const void *); #define INADDR_NONE 0xffffffff #endif -#ifndef HAVE_CRYPT -#define crypt ufc_crypt -#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 @@ -369,14 +361,6 @@ char *strdup(const char *s); void *memmove(void *dest,const void *src,int size); #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 @@ -417,47 +401,8 @@ int vasprintf(char **ptr, const char *format, va_list ap); #define bzero(a,b) memset((a),'\0',(b)) #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) - -/* - * glibc on linux doesn't seem to have MSG_WAITALL - * defined. I think the kernel has it though.. - */ - -#ifndef MSG_WAITALL -#define MSG_WAITALL 0 -#endif - -/* Load header file for dynamic linking stuff */ -#ifdef HAVE_DLFCN_H -#include -#endif - extern int DEBUGLEVEL; -#ifndef RTLD_LAZY -#define RTLD_LAZY 0 -#endif - -/* needed for some systems without iconv. Doesn't really matter - what error code we use */ -#ifndef EILSEQ -#define EILSEQ EIO -#endif - /* add varargs prototypes with printf checking */ #ifndef HAVE_SNPRINTF_DECL int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4); -- cgit From f4ec1497a1047eab8a2077694c7629ca6bb9eaa4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 03:44:52 +0000 Subject: r3455: some more portability fixes. We nearly compile on solaris again now. (This used to be commit 4f33247f1ca60416415a61a7afac43c9dc8a61fd) --- source4/include/includes.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index c511a5fb33..ce8f81c539 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -172,14 +172,6 @@ struct ipv4_addr { uint32_t s_addr; }; -#ifndef UINT8_MAX -#define UINT8_MAX 255 -#endif - -#ifndef UINT16_MAX -#define UINT16_MAX 65535 -#endif - #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif -- cgit From 5011f901aa0140ed60a0b58e80ab0f14810ba432 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 03:58:27 +0000 Subject: r3457: s_addr is a macro on solaris, so we can't use it in structure names. arrgh. (This used to be commit 7842b23d01c53009259a2461600bd01159cecebf) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index ce8f81c539..dca1824b22 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -169,7 +169,7 @@ typedef int socklen_t; system networking headers everywhere */ struct ipv4_addr { - uint32_t s_addr; + uint32_t addr; }; #ifndef MIN -- cgit From 8692564e350db4dfa4a9ef4c4cb014d76b284d3b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 04:17:30 +0000 Subject: r3458: more solaris portability fixes, the main one being that we can't use a structure element called "open" as its a macro on solaris. (This used to be commit 4e92e15c4e396b1d8cd211192888fea68c2cf0f9) --- source4/include/includes.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index dca1824b22..cda7f976c3 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -189,16 +189,6 @@ extern char *sys_errlist[]; extern int errno; #endif -#ifdef HAVE_BROKEN_GETGROUPS -#define GID_T int -#else -#define GID_T gid_t -#endif - -#ifndef NGROUPS_MAX -#define NGROUPS_MAX 32 /* Guess... */ -#endif - /* Our own pstrings and fstrings */ #include "pstring.h" -- cgit From a1d0b97ed40fe6985bb45b1715309638e7faaffc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 06:14:15 +0000 Subject: r3462: separate out the crypto includes (This used to be commit 3f75117db921e493bb77a5dc14b8ce91a6288f30) --- source4/include/includes.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index cda7f976c3..58f8e80803 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -216,14 +216,9 @@ extern int errno; #include "lib/socket/socket.h" #include "libcli/ldap/ldap.h" #include "nameserv.h" -#include "secrets.h" #include "byteorder.h" -#include "md5.h" -#include "hmacmd5.h" - - #include "module.h" #include "asn_1.h" -- cgit From 3643fb11092e28a9538ef32cedce8ff21ad86a28 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 06:42:15 +0000 Subject: r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h) (This used to be commit b97e395c814762024336c1cf4d7c25be8da5813a) --- source4/include/includes.h | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 58f8e80803..0721ef4879 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -109,18 +109,6 @@ #define VOLATILE #endif -/* - * Define additional missing types - */ -#ifndef HAVE_SIG_ATOMIC_T_TYPE -typedef int sig_atomic_t; -#endif - -#ifndef HAVE_SOCKLEN_T_TYPE -typedef int socklen_t; -#endif - - /* Samba needs type definitions for int8_t, int16_t, int32_t, int64_t @@ -194,7 +182,6 @@ extern int errno; /* Lists, trees, caching, database... */ #include "xfile.h" -#include "dlinklist.h" #include "talloc.h" #include "lib/ldb/include/ldb.h" #include "lib/tdb/include/tdb.h" @@ -203,9 +190,7 @@ extern int errno; #include "db_wrap.h" #include "nt_status.h" #include "trans2.h" -#include "ioctl.h" #include "nterr.h" -#include "messages.h" #include "charset.h" #include "dynconfig.h" @@ -221,8 +206,6 @@ extern int errno; #include "module.h" -#include "asn_1.h" - #include "mutex.h" #include "structs.h" -- cgit From a42142439aee9e75796e25cdf05e042174926abf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 06:52:59 +0000 Subject: r3464: split out registry.h, rap.h and ldap_server.h (This used to be commit 70d2090f6bf2c7e0caf1e9c020f330de88871f8e) --- source4/include/includes.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 0721ef4879..86222679e4 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -225,9 +225,6 @@ extern int errno; #include "smb_server/smb_server.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" -#include "registry.h" -#include "rap.h" -#include "ldap_server/ldap_server.h" #include "libnet/libnet.h" #include "utils/net/net.h" -- cgit From aa34fcebf8aa0660574a7c6976b33b3f37985e27 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 07:18:24 +0000 Subject: r3466: split out request.h, signing.h, and smb_server.h (This used to be commit 7c4e6ebf05790dd6e29896dd316db0fff613aa4e) --- source4/include/includes.h | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 86222679e4..c58cf1a5c5 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -181,6 +181,8 @@ extern int errno; #include "pstring.h" /* Lists, trees, caching, database... */ +#include "dynconfig.h" +#include "version.h" #include "xfile.h" #include "talloc.h" #include "lib/ldb/include/ldb.h" @@ -192,50 +194,32 @@ extern int errno; #include "trans2.h" #include "nterr.h" #include "charset.h" -#include "dynconfig.h" - -#include "version.h" #include "rewrite.h" #include "smb.h" #include "ads.h" #include "lib/socket/socket.h" #include "libcli/ldap/ldap.h" #include "nameserv.h" - #include "byteorder.h" - #include "module.h" - #include "mutex.h" - -#include "structs.h" #include "librpc/ndr/libndr.h" #include "librpc/ndr/ndr_sec.h" #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" #include "librpc/gen_ndr/tables.h" - #include "smb_interfaces.h" #include "smbd/server.h" #include "smbd/service.h" #include "rpc_server/dcerpc_server.h" -#include "request.h" -#include "signing.h" -#include "smb_server/smb_server.h" +#include "structs.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" - #include "libnet/libnet.h" #include "utils/net/net.h" - #include "nsswitch/winbind_client.h" -/* hmm, this really is getting ugly isn't it .... we probably need to - have some way to have subsystem includes without including it - globally */ -#include "ntvfs/posix/vfs_posix.h" - #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) #define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count) -- cgit From c051779a0a34a9c40a5425fb1eb821983b8dc852 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 07:42:47 +0000 Subject: r3468: split out dcerpc_server.h (This used to be commit 729e0026e4408f74f140375537d4fe48c1fc3242) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index c58cf1a5c5..83f95f0a2b 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -212,7 +212,6 @@ extern int errno; #include "smb_interfaces.h" #include "smbd/server.h" #include "smbd/service.h" -#include "rpc_server/dcerpc_server.h" #include "structs.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" -- cgit From 6bd02aa5046b606171a680e6f8aefba31b744af1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 11:42:35 +0000 Subject: r3478: split out some more pieces of includes.h (This used to be commit 8e9212ecfc61c509f686363d8ec412ce54bc1c8d) --- source4/include/includes.h | 79 ---------------------------------------------- 1 file changed, 79 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 83f95f0a2b..78397faac6 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -28,31 +28,6 @@ #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 - -#ifdef SUNOS4 -/* on SUNOS4 termios.h conflicts with sys/ioctl.h */ -#undef HAVE_TERMIOS_H -#endif - -#ifndef DEFAULT_PRINTING -#define DEFAULT_PRINTING PRINT_BSD -#endif -#ifndef PRINTCAP_NAME -#define PRINTCAP_NAME "/etc/printcap" -#endif - #if (__GNUC__ >= 3) /** Use gcc attribute to check printf fns. a1 is the 1-based index of * the parameter containing the format, and a2 the index of the first @@ -215,8 +190,6 @@ extern int errno; #include "structs.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" -#include "libnet/libnet.h" -#include "utils/net/net.h" #include "nsswitch/winbind_client.h" #define malloc_p(type) (type *)malloc(sizeof(type)) @@ -245,54 +218,10 @@ typedef int (*comparison_fn_t)(const void *, const void *); #define QSORT_CAST (int (*)(const void *, const void *)) #endif -#ifndef SIGCLD -#define SIGCLD SIGCHLD -#endif - -#ifndef MAP_FILE -#define MAP_FILE 0 -#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 - -#if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID) -#define ULTRIX_AUTH 1 -#endif - #ifndef HAVE_STRDUP char *strdup(const char *s); #endif @@ -313,10 +242,6 @@ size_t strlcpy(char *d, const char *s, size_t bufsize); size_t strlcat(char *d, const char *s, size_t bufsize); #endif -#ifndef HAVE_FTRUNCATE -int ftruncate(int f,long l); -#endif - #ifndef HAVE_STRNDUP char *strndup(const char *s, size_t n); #endif @@ -364,10 +289,6 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #define VA_COPY(dest, src) (dest) = (src) #endif -#ifndef HAVE_TIMEGM -time_t timegm(struct tm *tm); -#endif - #if defined(VALGRIND) #define strlen(x) valgrind_strlen(x) #endif -- cgit From 6f214cc510a59b7a65ee9d4486baf14a3e579f73 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 3 Nov 2004 00:17:12 +0000 Subject: r3494: got rid of include/rewrite.h, and split out the dynconfig.h header (This used to be commit 558de54ec6432a4ae90aa14a585f32c6cd03ced2) --- source4/include/includes.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 78397faac6..9f2c233e73 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -127,6 +127,12 @@ #define uint64 uint64_t #endif +#define False (0) +#define True (1) +#define Auto (2) + +typedef int BOOL; + /* we use struct ipv4_addr to avoid having to include all the system networking headers everywhere @@ -152,11 +158,7 @@ extern char *sys_errlist[]; extern int errno; #endif -/* Our own pstrings and fstrings */ -#include "pstring.h" - /* Lists, trees, caching, database... */ -#include "dynconfig.h" #include "version.h" #include "xfile.h" #include "talloc.h" @@ -169,7 +171,12 @@ extern int errno; #include "trans2.h" #include "nterr.h" #include "charset.h" -#include "rewrite.h" +#include "debug.h" +#include "doserr.h" +#include "enums.h" +#include "pstring.h" +#include "smb_macros.h" +#include "rpc_secdes.h" #include "smb.h" #include "ads.h" #include "lib/socket/socket.h" -- cgit From 02785df1b06647f1adaaac3c93f363ec5070a941 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 3 Nov 2004 00:38:05 +0000 Subject: r3497: removed some include cruft, and split out librpc/gen_ndr/tables.h (This used to be commit 7dd3a5a6dadb0edc4fad56deba84f24b1e6dd2bc) --- source4/include/includes.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 9f2c233e73..f20292779f 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -141,14 +141,6 @@ struct ipv4_addr { uint32_t addr; }; -#ifndef MIN -#define MIN(a,b) ((a)<(b)?(a):(b)) -#endif - -#ifndef MAX -#define MAX(a,b) ((a)>(b)?(a):(b)) -#endif - #ifndef HAVE_STRERROR extern char *sys_errlist[]; #define strerror(i) sys_errlist[i] @@ -190,7 +182,6 @@ extern int errno; #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" -#include "librpc/gen_ndr/tables.h" #include "smb_interfaces.h" #include "smbd/server.h" #include "smbd/service.h" -- cgit From 6d3c74a67b935f348777feb3fac7653a9c4277a8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 3 Nov 2004 20:32:28 +0000 Subject: r3513: Add (the infrastructure for) DCOM support. Contents: - Support for sending over the object UUID in DCERPC calls - Simple torture test for the DCOM "Simple" object - Generate extra argument for "object" interfaces in pidl - Some stubs for common DCOM functions (This used to be commit c052f2e1edd816206d8974af3140cec7ef97a70c) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index f20292779f..ee14b37220 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -182,6 +182,7 @@ extern int errno; #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" +#include "lib/dcom/common/dcom.h" #include "smb_interfaces.h" #include "smbd/server.h" #include "smbd/service.h" -- cgit From 695677f4bb078291c683931d5017f339811abf90 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 4 Nov 2004 01:09:43 +0000 Subject: r3515: Fix RemoteActivation correctly this time (-: Thanks to tridge for some help on this one! (This used to be commit 1104667190aa144e2c7d79ece9a55502b98d0351) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index ee14b37220..9d2aacd3b2 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -182,6 +182,7 @@ extern int errno; #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" +#include "librpc/gen_ndr/ndr_dcom.h" #include "lib/dcom/common/dcom.h" #include "smb_interfaces.h" #include "smbd/server.h" -- cgit From d4f667c37761c5b633a522340282684977cc6cda Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 4 Nov 2004 03:21:44 +0000 Subject: r3520: minor portability fix (for struct timeval) (This used to be commit ea1ad5897d7023f00931a3102edf9d3393cc216e) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 9d2aacd3b2..d815e8c424 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -51,6 +51,7 @@ #include #include #include +#include #ifdef HAVE_STDINT_H #include -- cgit From 485df40bf96abbd80d69ff2a9fdca86516a4eae7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 7 Nov 2004 16:47:46 +0000 Subject: r3601: Lots of smaller DCOM updates and fixes. Adds oxid tables, proper use of contexts. (This used to be commit 93eb3cd99c4fb065a69eabcead0c33804259c976) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index d815e8c424..c7cc1338f5 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -183,8 +183,8 @@ extern int errno; #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" -#include "librpc/gen_ndr/ndr_dcom.h" #include "lib/dcom/common/dcom.h" +#include "librpc/gen_ndr/ndr_dcom.h" #include "smb_interfaces.h" #include "smbd/server.h" #include "smbd/service.h" -- cgit From 8a18778286a16423d7d6e483fdb308a91e294efe Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 16 Nov 2004 09:00:52 +0000 Subject: r3783: - don't use make proto for ldb anymore - split ldh.h out of samba's includes.h - make ldb_context and ldb_module private to the subsystem - use ltdb_ prefix for all ldb_tdb functions metze (This used to be commit f5ee40d6ce8224e280070975efc9911558fe675c) --- source4/include/includes.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index c7cc1338f5..10516f8989 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -155,12 +155,12 @@ extern int errno; #include "version.h" #include "xfile.h" #include "talloc.h" -#include "lib/ldb/include/ldb.h" +#include "nt_status.h" +#include "structs.h" #include "lib/tdb/include/tdb.h" #include "lib/tdb/include/spinlock.h" #include "lib/tdb/include/tdbutil.h" #include "db_wrap.h" -#include "nt_status.h" #include "trans2.h" #include "nterr.h" #include "charset.h" @@ -188,7 +188,6 @@ extern int errno; #include "smb_interfaces.h" #include "smbd/server.h" #include "smbd/service.h" -#include "structs.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "nsswitch/winbind_client.h" -- cgit From 012be92f0a771d8437f783dc8ed14f38c669893c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 18 Nov 2004 01:41:43 +0000 Subject: r3830: unified the query/set security descriptor code with the rest of the queryfileinfo/setfileinfo logic, so querying/setting a security descriptor is treated as just another file query/set operation. This will allow NTVFS backends to see the query/set security descriptor operations as RAW_FILEINFO_SEC_DESC and RAW_SFILEINFO_SEC_DESC operations. (This used to be commit f68a6b6b915c37e48c42390c1e74c2d1c2636fa9) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 10516f8989..c5842f84da 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -179,7 +179,6 @@ extern int errno; #include "module.h" #include "mutex.h" #include "librpc/ndr/libndr.h" -#include "librpc/ndr/ndr_sec.h" #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" -- cgit From fdc9f417d89fdf9dd6afbc22843d70585e195c9d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Nov 2004 04:33:27 +0000 Subject: r4011: get rid of rpc_secdes.h and replace it with a single sane set of definitions for security access masks, in security.idl The previous definitions were inconsistently named, and contained many duplicate and misleading entries. I kept finding myself tripping up while using them. (This used to be commit 01c0fa722f80ceeb3f81f01987de95f365a2ed3d) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index c5842f84da..6335780b89 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -169,7 +169,6 @@ extern int errno; #include "enums.h" #include "pstring.h" #include "smb_macros.h" -#include "rpc_secdes.h" #include "smb.h" #include "ads.h" #include "lib/socket/socket.h" -- cgit From 2f9e170f45e128eb6ab6bd97c9c8b40dcd9a97fa Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 4 Dec 2004 09:30:38 +0000 Subject: r4058: added a type safe version of smb_xmalloc() (This used to be commit 1235afa5fe3a396cd7a180cbc500834a30fbaa80) --- source4/include/includes.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 6335780b89..ad24ff676d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -321,3 +321,8 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #endif /* _INCLUDES_H */ +/* + type safe varient of smb_xmalloc() +*/ +#define smb_xmalloc_p(type) (type *)smb_xmalloc(sizeof(type)) + -- cgit From 65f96eba32b93ced0717c2639007bba59da55fa4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 2 Jan 2005 07:47:34 +0000 Subject: r4473: - moved talloc into its own lib/talloc/ area - added gcov flags to Makefile.talloc - expanded talloc testsuite to add a test for realloc with a child ptr - fixed a bug in talloc_realloc() with realloc of a ptr that has child ptrs (This used to be commit 98b5f73c1ba34d7576c5995069b485c1c5ede324) --- source4/include/includes.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index ad24ff676d..2666d59f89 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -154,7 +154,7 @@ extern int errno; /* Lists, trees, caching, database... */ #include "version.h" #include "xfile.h" -#include "talloc.h" +#include "lib/talloc/talloc.h" #include "nt_status.h" #include "structs.h" #include "lib/tdb/include/tdb.h" @@ -291,8 +291,10 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #define strlen(x) valgrind_strlen(x) #endif +#if 0 +/* darn, we can't do this now that we don't link the ldb tools to all the smb libs */ #define TALLOC_ABORT(reason) smb_panic(reason) - +#endif /* this is a warning hack. The idea is to use this everywhere that we -- cgit From 11ce2cfd70df264c5c91b4daaa9a01c5abc673b0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 7 Jan 2005 04:39:16 +0000 Subject: r4591: - converted the other _p talloc functions to not need _p - added #if TALLOC_DEPRECATED around the _p functions - fixes the code that broke from the above while doing this I fixed quite a number of places that were incorrectly using the non type-safe talloc functions to use the type safe ones. Some were even doing multiplies for array allocation, which is potentially unsafe. (This used to be commit 6e7754abd0c225527fb38363996a6e241b87b37e) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 2666d59f89..4d49a3b1ff 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -154,6 +154,7 @@ extern int errno; /* Lists, trees, caching, database... */ #include "version.h" #include "xfile.h" +#define TALLOC_DEPRECATED 1 #include "lib/talloc/talloc.h" #include "nt_status.h" #include "structs.h" -- cgit From d9d41b57e95a941f038d2c3a0c9261e1027a6dcc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 12 Jan 2005 22:06:52 +0000 Subject: r4717: fixed our usage of VA_COPY to be more standards compliant (This used to be commit 48b52584ab7db747feaf7ad4382bd3877935ee26) --- source4/include/includes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 4d49a3b1ff..cc03607e91 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -281,8 +281,9 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #define slprintf snprintf -/* we need to use __va_copy() on some platforms */ #ifdef HAVE_VA_COPY +#define VA_COPY(dest, src) va_copy(dest, src) +#elif defined(HAVE___VA_COPY) #define VA_COPY(dest, src) __va_copy(dest, src) #else #define VA_COPY(dest, src) (dest) = (src) -- cgit From 7b0f375a86a593004acc768b48fd3881ec46fa6a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 16 Jan 2005 20:20:15 +0000 Subject: r4780: tolower() requires ctype.h (This used to be commit e22bfa8ae295db009158292b87fe389afa13717e) --- source4/include/includes.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index cc03607e91..b6f49ed827 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -53,6 +53,10 @@ #include #include +#ifdef HAVE_CTYPE_H +#include +#endif + #ifdef HAVE_STDINT_H #include #endif -- cgit From 5dbebbe2add359da8c416634e3ec2d8e2569478a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 16 Jan 2005 20:48:53 +0000 Subject: r4781: the tolower() in schema.c is a premature optimisation. I suspect the "distinguishedName" checking in that module is incorrect and should be removed, but meanwhile, lets not make it slow down the compile of every other module. (This used to be commit 6534ce650bef7405e0926c9b75b185943429ed18) --- source4/include/includes.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b6f49ed827..cc03607e91 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -53,10 +53,6 @@ #include #include -#ifdef HAVE_CTYPE_H -#include -#endif - #ifdef HAVE_STDINT_H #include #endif -- cgit From 8451b2658ca0f44f2683bf8045a9232a4a8c9660 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 18 Jan 2005 09:30:43 +0000 Subject: r4817: ccache was being made ineffective on all the build farm machines because the version number was being auto-updated and included in all C files. With this change it is only included where needed. (This used to be commit 520cff73c6dc62ba1050cf7ca5145d50b5f2bb4e) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index cc03607e91..cae45435c5 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -152,7 +152,6 @@ extern int errno; #endif /* Lists, trees, caching, database... */ -#include "version.h" #include "xfile.h" #define TALLOC_DEPRECATED 1 #include "lib/talloc/talloc.h" -- cgit From cda0a7e76e1862f403cd827e36f3e5624f5d6fa8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 21 Jan 2005 11:23:11 +0000 Subject: r4892: we don't need nameserv.h any more (This used to be commit 1c83c80ef2b7e5f9eb5cd2242e37d136aed181b8) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index cae45435c5..a87161af80 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -173,7 +173,6 @@ extern int errno; #include "ads.h" #include "lib/socket/socket.h" #include "libcli/ldap/ldap.h" -#include "nameserv.h" #include "byteorder.h" #include "module.h" #include "mutex.h" -- cgit From 51f3a6a5e86ab648365a03d3188002ffc94afd41 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 21 Jan 2005 13:29:24 +0000 Subject: r4900: build fix for IRIX 6.5 (This used to be commit f6ff9e6f39efdb312384ebb651b8e0f01e9e8df1) --- source4/include/includes.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index a87161af80..8c2e96b62e 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -321,10 +321,14 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #endif #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) -#endif /* _INCLUDES_H */ +#ifndef UINT16_MAX +#define UINT16_MAX 65535 +#endif /* type safe varient of smb_xmalloc() */ #define smb_xmalloc_p(type) (type *)smb_xmalloc(sizeof(type)) +#endif /* _INCLUDES_H */ + -- cgit From 3dd17f128831e09c230a8d56e34495d3b31dbacb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 27 Jan 2005 06:16:59 +0000 Subject: r5034: - added a type mapping function in pidl, so the type names in our IDL files don't need to match the type names in the generated headers - with this type mapping we no longer need definitions for the deprecated "int32", "uint8" etc form of types. We can now force everyone to use the standard types int32_t, uint8_t etc. - fixed all the code that used the deprecated types - converted the IDL types "int64" and "uint64" to "dlong" and "udlong". These are the 4 byte aligned 64 bit integers that Microsoft internally define as two 32 bit integers in a structure. After discussions with Ronnie Sahlberg we decided that calling these "int64" was confusing, as it implied a true 8 byte aligned type - fixed all the cases where we incorrectly used things like "NTTIME_hyper" in our C code. The generated API now uses a NTTIME for those. The fact that it is hyper-aligned on the wire is not relevant to the API, and should remain just a IDL property (This used to be commit f86521677d7ff16bdc4815f9524e5286026f10f3) --- source4/include/includes.h | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 8c2e96b62e..68e369a77b 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -85,49 +85,6 @@ #define VOLATILE #endif -/* - Samba needs type definitions for - int8_t, int16_t, int32_t, int64_t - uint8_t, uint16_t, uint32_t and uint64_t. - - Normally these are signed and unsigned 8, 16, 32 and 64 bit integers, but - they actually only need to be at least 8, 16, 32 and 64 bits - respectively. Thus if your word size is 8 bytes just defining them - as signed and unsigned int will work. -*/ - -#if !defined(int8) -#define int8 int8_t -#endif - -#if !defined(uint8) -#define uint8 uint8_t -#endif - -#if !defined(int16) -#define int16 int16_t -#endif - -#if !defined(uint16) -#define uint16 uint16_t -#endif - -#if !defined(int32) -#define int32 int32_t -#endif - -#if !defined(uint32) -#define uint32 uint32_t -#endif - -#if !defined(int64) -#define int64 int64_t -#endif - -#if !defined(uint64) -#define uint64 uint64_t -#endif - #define False (0) #define True (1) #define Auto (2) -- cgit From 759da3b915e2006d4c87b5ace47f399accd9ce91 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 27 Jan 2005 07:08:20 +0000 Subject: r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 68e369a77b..70e06e2a58 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -110,7 +110,6 @@ extern int errno; /* Lists, trees, caching, database... */ #include "xfile.h" -#define TALLOC_DEPRECATED 1 #include "lib/talloc/talloc.h" #include "nt_status.h" #include "structs.h" -- cgit From 55d4d36993293fee914a009f1d8f05810e347f2b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 30 Jan 2005 00:54:57 +0000 Subject: r5102: This is a major simplification of the logic for controlling top level servers in smbd. The old code still contained a fairly bit of legacy from the time when smbd was only handling SMB connection. The new code gets rid of all of the smb_server specific code in smbd/, and creates a much simpler infrastructures for new server code. Major changes include: - simplified the process model code a lot. - got rid of the top level server and service structures completely. The top level context is now the event_context. This got rid of service.h and server.h completely (they were the most confusing parts of the old code) - added service_stream.[ch] for the helper functions that are specific to stream type services (services that handle streams, and use a logically separate process per connection) - got rid of the builtin idle_handler code in the service logic, as none of the servers were using it, and it can easily be handled by a server in future by adding its own timed_event to the event context. - fixed some major memory leaks in the rpc server code. - added registration of servers, rather than hard coding our list of possible servers. This allows for servers as modules in the future. - temporarily disabled the winbind code until I add the helper functions for that type of server - added error checking on service startup. If a configured server fails to startup then smbd doesn't startup. - cleaned up the command line handling in smbd, removing unused options (This used to be commit cf6a46c3cbde7b1eb1b86bd3882b953a2de3a42e) --- source4/include/includes.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 70e06e2a58..ce24525158 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -139,8 +139,6 @@ extern int errno; #include "lib/dcom/common/dcom.h" #include "librpc/gen_ndr/ndr_dcom.h" #include "smb_interfaces.h" -#include "smbd/server.h" -#include "smbd/service.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "nsswitch/winbind_client.h" -- cgit From ca3f70256ac0430e2db846d0293a7750a6d3ef6b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 31 Jan 2005 17:16:45 +0000 Subject: r5145: define struct ipv4_addr in misc.idl, so we can use it in nbt.idl and get a nicer debug output metze (This used to be commit abacbc9192646f6f3c720758ab65889b82b9ae7b) --- source4/include/includes.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index ce24525158..a185669abd 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -91,14 +91,6 @@ typedef int BOOL; -/* - we use struct ipv4_addr to avoid having to include all the - system networking headers everywhere -*/ -struct ipv4_addr { - uint32_t addr; -}; - #ifndef HAVE_STRERROR extern char *sys_errlist[]; #define strerror(i) sys_errlist[i] @@ -126,7 +118,6 @@ extern int errno; #include "pstring.h" #include "smb_macros.h" #include "smb.h" -#include "ads.h" #include "lib/socket/socket.h" #include "libcli/ldap/ldap.h" #include "byteorder.h" @@ -142,6 +133,7 @@ extern int errno; #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "nsswitch/winbind_client.h" +#include "ads.h" #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) -- cgit From 9b9c23b19be5a90821e1075a76f8b94fdb2424e2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 1 Feb 2005 04:12:44 +0000 Subject: r5155: define ipv4address as a based IDL type, mapped to a "const char *" in the header, and defined on the wire as a 4 byte network byte order IP. This means the calling code doesn't have to worry about network byte order conversions. (This used to be commit 72048e37179dd5b9ada0c5280d2f0d8c23d1a17d) --- source4/include/includes.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index a185669abd..7d1ee5afc7 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -91,6 +91,14 @@ typedef int BOOL; +/* + we use struct ipv4_addr to avoid having to include all the + system networking headers everywhere +*/ +struct ipv4_addr { + uint32_t addr; +}; + #ifndef HAVE_STRERROR extern char *sys_errlist[]; #define strerror(i) sys_errlist[i] -- cgit From fedf0b0d91fdf2a6ae0ef47acd4047f662bd3374 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Feb 2005 03:48:43 +0000 Subject: r5296: - only include the tdb headers where they are needed - removed the u32 hack in events.c as I think this was only needed as tdb.h defines u32. Metze, can you check that this hack is indeed no longer needed on your suse system? (This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a) --- source4/include/includes.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 7d1ee5afc7..cef5e982c7 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -113,9 +113,6 @@ extern int errno; #include "lib/talloc/talloc.h" #include "nt_status.h" #include "structs.h" -#include "lib/tdb/include/tdb.h" -#include "lib/tdb/include/spinlock.h" -#include "lib/tdb/include/tdbutil.h" #include "db_wrap.h" #include "trans2.h" #include "nterr.h" -- cgit From e82aad1ce39a6b7a2e51b9e2cb494d74ec70e158 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Feb 2005 05:09:35 +0000 Subject: r5298: - got rid of pstring.h from includes.h. This at least makes it a bit less likely that anyone will use pstring for new code - got rid of winbind_client.h from includes.h. This one triggered a huge change, as winbind_client.h was including system/filesys.h and defining the old uint32 and uint16 types, as well as its own pstring and fstring. (This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f) --- source4/include/includes.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index cef5e982c7..890491f884 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -120,7 +120,6 @@ extern int errno; #include "debug.h" #include "doserr.h" #include "enums.h" -#include "pstring.h" #include "smb_macros.h" #include "smb.h" #include "lib/socket/socket.h" @@ -137,7 +136,6 @@ extern int errno; #include "smb_interfaces.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" -#include "nsswitch/winbind_client.h" #include "ads.h" #define malloc_p(type) (type *)malloc(sizeof(type)) -- cgit From bed7c9ec32b7d4083ba4ed2abbf3b6126bee7a25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Feb 2005 06:59:29 +0000 Subject: r5304: removed lib/socket/socket.h from includes.h (This used to be commit b902ea546d2d1327b23f40ddaeeaa8e7e3662454) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 890491f884..cfc0a26260 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -122,7 +122,6 @@ extern int errno; #include "enums.h" #include "smb_macros.h" #include "smb.h" -#include "lib/socket/socket.h" #include "libcli/ldap/ldap.h" #include "byteorder.h" #include "module.h" -- cgit From 501379431c7fc6c9a78e74eca43b208184debce6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Feb 2005 07:08:40 +0000 Subject: r5305: removed libcli/ldap/ldap.h from includes.h (This used to be commit 0df3fdd8178085c40f9cd776cc3e1486ca559c8e) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index cfc0a26260..b31ba4d840 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -122,7 +122,6 @@ extern int errno; #include "enums.h" #include "smb_macros.h" #include "smb.h" -#include "libcli/ldap/ldap.h" #include "byteorder.h" #include "module.h" #include "mutex.h" -- cgit From 6aa6dce3f7c4303d184b3098fbf4619e49a27e45 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Feb 2005 07:18:00 +0000 Subject: r5306: removed all the unused mutex functions from mutex.c. When (if?) we decide to reinstate the mutex code for the threads process model, I'd like to do it a little differently. At least this gets it out of includes.h for now. (This used to be commit cfee0fb02e10add22b6c436bdfa95d1a8f5f3def) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b31ba4d840..3387102393 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -124,7 +124,6 @@ extern int errno; #include "smb.h" #include "byteorder.h" #include "module.h" -#include "mutex.h" #include "librpc/ndr/libndr.h" #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" -- cgit From a5bd1ccadab723c531963c219a1ac2b6b0c8b845 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Feb 2005 07:22:25 +0000 Subject: r5307: removed db_wrap.h from includes.h (This used to be commit 826baec7b348814a7bbdcdbec8c8526514f25da1) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 3387102393..32a1946e51 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -113,7 +113,6 @@ extern int errno; #include "lib/talloc/talloc.h" #include "nt_status.h" #include "structs.h" -#include "db_wrap.h" #include "trans2.h" #include "nterr.h" #include "charset.h" -- cgit From a0e6f6c05b438765c8bbb6f8e7f7e6478dc67293 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Feb 2005 07:43:39 +0000 Subject: r5309: removed ads.h from includes.h (This used to be commit 196c45b834c39f293b9533cec5cfe5a77382d4e2) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 32a1946e51..2e04e365eb 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -132,7 +132,6 @@ extern int errno; #include "smb_interfaces.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" -#include "ads.h" #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) -- cgit From c8ca613e935b44488435a269957a68b48d2af90f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 11 Feb 2005 10:15:56 +0000 Subject: r5330: Remove #include from includes.h. Add #include "system/time.h" back (it was removed in some of these places because the definitions were provided by on tridge's platform.) Andrew Bartlett (This used to be commit 34b1da730304bed7fee5bae7cbde7fbccecb6af5) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 2e04e365eb..8675ad0ba6 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -51,7 +51,6 @@ #include #include #include -#include #ifdef HAVE_STDINT_H #include -- cgit From 6f01a68faa5cf17b41f15f55e97620acfee59025 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 11 Feb 2005 10:50:54 +0000 Subject: r5334: Bah, it's all to hard... Andrew Bartlett (This used to be commit a28ca320dc604fcffe89e9096a643bb4740a1da2) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 8675ad0ba6..2e04e365eb 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -51,6 +51,7 @@ #include #include #include +#include #ifdef HAVE_STDINT_H #include -- cgit From 80d3047333fceb3805ccd10a08cdf95021f57ff4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 21 Feb 2005 14:30:49 +0000 Subject: r5490: The big (D)COM commit! :-) Contains most of the changes described in the DCOM paper in lorikeet. This is the result of 1.5 months work (mainly figuring out how things *really* work) at the end of 2004. In general: - Clearer distinction between COM and DCOM. DCOM is now merely the glue between DCE/RPC+ORPC and COM. COM can also work without DCOM now. This makes the code a lot clearer. - Clearer distinction between NDR and DCOM. Before, NDR had a couple of "if"s to cope with DCOM, which are now gone. - Use "real" arguments rather then structures for function arguments in COM, mainly because most of these calls are local so packing/unpacking data for every call is too much overhead (both speed- and code-wise) - Support several mechanisms to load class objects: - from memory (e.g. part of the current executable, registered at start-up) - from shared object files - remotely - Most things are now also named COM rather then DCOM because that's what it really is. After an object is created, it no longer matters whether it was created locally or remotely. There is a very simple example class that contains both a class factory and a class that implements the IStream interface. It can be tested (locally only, remotely is broken at the moment) by running the COM-SIMPLE smbtorture test. Still to-do: - Autogenerate parts of the class implementation code (using the coclass definitions in IDL) - Test server-side - Implement some of the common classes, add definitions for common interfaces. (This used to be commit 71fd3e5c3aac5f0002001ab29d2248e6c6842d6f) --- source4/include/includes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 2e04e365eb..be100c6390 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -127,11 +127,11 @@ extern int errno; #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" -#include "lib/dcom/common/dcom.h" -#include "librpc/gen_ndr/ndr_dcom.h" #include "smb_interfaces.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" +#include "lib/com/com.h" +#include "lib/dcom/common/dcom.h" #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) -- cgit From 77ec3f684dc8563965ae5118ef5549925ea81d0f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 6 Mar 2005 21:43:54 +0000 Subject: r5674: - Re-enable DCOM support. - Always put IID in vtables (useful for asserts) - Add table to keep track of DCOM proxy classes - Bunch of smaller bug fixes (This used to be commit 26d5a0b92c66bc86d0c26f687f83fa712342ac32) --- source4/include/includes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index be100c6390..9a802aebd0 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -126,12 +126,13 @@ extern int errno; #include "librpc/ndr/libndr.h" #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" +#include "librpc/ndr/ndr_orpc.h" +#include "librpc/gen_ndr/ndr_orpc.h" #include "librpc/rpc/dcerpc.h" #include "smb_interfaces.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "lib/com/com.h" -#include "lib/dcom/common/dcom.h" #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) -- cgit From 02075be0bbc2095073f8898350fded64a7c97c79 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 21 Mar 2005 02:08:38 +0000 Subject: r5917: First step in using the new cli_credentials structure. This patch puts support for it into popt_common, adds a few utility functions (in lib/credentials.c) and the callback functions for the command-line (lib/cmdline/credentials.c). Comments are welcome :-) (This used to be commit 1d49b57c50fe8c2683ea23e9df41ce8ad774db98) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 9a802aebd0..ce78e14d7d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -123,6 +123,7 @@ extern int errno; #include "smb.h" #include "byteorder.h" #include "module.h" +#include "credentials.h" #include "librpc/ndr/libndr.h" #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" -- cgit From 85e9412c4786ede6f94d879185d493756d37eebe Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 1 May 2005 19:29:00 +0000 Subject: r6565: Cludge, cludge, cludge... We need to pass the 'secure channel type' to the NETLOGON layer, which must match the account type. (Yes, jelmer objects to this inclusion of the kitchen sink ;-) Andrew Bartlett (This used to be commit 8ee208a926d2b15fdc42753b1f9ee586564c6248) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index ce78e14d7d..65cbd1b777 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -123,7 +123,6 @@ extern int errno; #include "smb.h" #include "byteorder.h" #include "module.h" -#include "credentials.h" #include "librpc/ndr/libndr.h" #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" @@ -134,6 +133,7 @@ extern int errno; #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "lib/com/com.h" +#include "credentials.h" #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) -- cgit From 15a8f0ff0ad6104505f5275a901cf0cf8eb8f9b9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 12 May 2005 10:46:57 +0000 Subject: r6752: Patch by Steven Edwards to improve portability to mingw32 (This used to be commit 8d63cd33a223cccb21d808747e9c97da53629fbc) --- source4/include/includes.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 65cbd1b777..a72a961495 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -70,6 +70,14 @@ #include #endif +#ifdef HAVE_WINSOCK2_H +#include +#endif + +#ifdef HAVE_WINDOWS_H +#include +#endif + /* we support ADS if we want it and have krb5 and ldap libs */ #if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) #define HAVE_ADS -- cgit From bce8cda06123648c377fbef92526f1f56121e513 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 7 Jun 2005 07:22:25 +0000 Subject: r7352: the internal heimdal build change. This changes quite a few things: - if you want kerberos now, you need to unpack a lorikeet heimdal tree in source/heimdal/. If source/heimdal/ does not exist at configure time then all kerberos features are disabled. You cannot use an external kerberos library for now. That may change later. - moved lib/replace/ config stuff to lib/replace/ and create a lib/replace/replace.h. That allows the heimdal build to use our portability layer, and prevenets duplicate definitions of functions like strlcat() - if you do enable heimdal, then you will need to do 'make HEIMDAL_EXTERNAL' before you build Samba. That should be fixed once I explain the problem to jelmer (the problem is the inability to set a depend without also dragging in the object list of the dependency. We need this for building the heimdal asn1 compiler and et compiler. - disabled all of the m4 checks for external kerberos libraries. I left them in place in auth/kerberos/, but disabled it in configure.in some of the heimdal_build/ code is still very rough, for example I don't correctly detect the correct awk, flex, bison replacements for heimdal_build/build_external.sh. I expect to fix that stuff up over the next few days. (This used to be commit d4648249b2c7fc8b5e7c0fc8d8f92ae043b5691f) --- source4/include/includes.h | 91 ++-------------------------------------------- 1 file changed, 3 insertions(+), 88 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index a72a961495..9ecfd20422 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -87,12 +87,6 @@ * Define VOLATILE if needed. */ -#if defined(HAVE_VOLATILE) -#define VOLATILE volatile -#else -#define VOLATILE -#endif - #define False (0) #define True (1) #define Auto (2) @@ -143,14 +137,13 @@ extern int errno; #include "lib/com/com.h" #include "credentials.h" +#include "lib/replace/replace.h" + + #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) #define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count) -#ifndef HAVE_COMPARISON_FN_T -typedef int (*comparison_fn_t)(const void *, const void *); -#endif - /***** automatically generated prototypes *****/ #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "proto.h" @@ -161,86 +154,12 @@ typedef int (*comparison_fn_t)(const void *, const void *); #include "safe_string.h" -#ifdef __COMPAR_FN_T -#define QSORT_CAST (__compar_fn_t) -#endif - -#ifndef QSORT_CAST -#define QSORT_CAST (int (*)(const void *, const void *)) -#endif - #ifndef HAVE_PIPE #define SYNC_DNS 1 #endif -#ifndef HAVE_STRDUP -char *strdup(const char *s); -#endif - -#ifndef HAVE_MEMMOVE -void *memmove(void *dest,const void *src,int size); -#endif - -#ifndef HAVE_MKTIME -time_t mktime(struct tm *t); -#endif - -#ifndef HAVE_STRLCPY -size_t strlcpy(char *d, const char *s, size_t bufsize); -#endif - -#ifndef HAVE_STRLCAT -size_t strlcat(char *d, const char *s, size_t bufsize); -#endif - -#ifndef HAVE_STRNDUP -char *strndup(const char *s, size_t n); -#endif - -#ifndef HAVE_STRNLEN -size_t strnlen(const char *s, size_t n); -#endif - -#ifndef HAVE_STRTOUL -unsigned long strtoul(const char *nptr, char **endptr, int base); -#endif - -#ifndef HAVE_SETENV -int setenv(const char *name, const char *value, int overwrite); -#endif - -#ifndef HAVE_VASPRINTF_DECL -int vasprintf(char **ptr, const char *format, va_list ap); -#endif - -#if !defined(HAVE_BZERO) && defined(HAVE_MEMSET) -#define bzero(a,b) memset((a),'\0',(b)) -#endif - extern int DEBUGLEVEL; -/* add varargs prototypes with printf checking */ -#ifndef HAVE_SNPRINTF_DECL -int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4); -#endif -#ifndef HAVE_ASPRINTF_DECL -int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); -#endif - - -/* we used to use these fns, but now we have good replacements - for snprintf and vsnprintf */ -#define slprintf snprintf - - -#ifdef HAVE_VA_COPY -#define VA_COPY(dest, src) va_copy(dest, src) -#elif defined(HAVE___VA_COPY) -#define VA_COPY(dest, src) __va_copy(dest, src) -#else -#define VA_COPY(dest, src) (dest) = (src) -#endif - #if defined(VALGRIND) #define strlen(x) valgrind_strlen(x) #endif @@ -275,10 +194,6 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #endif #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) -#ifndef UINT16_MAX -#define UINT16_MAX 65535 -#endif - /* type safe varient of smb_xmalloc() */ -- cgit From 44a04d74cdcc4b4dc75312a40b34d60e1d9a001b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 17 Jun 2005 02:48:48 +0000 Subject: r7668: - setup HAVE_ILDAP to enable the ildap backend in ldb - fixed a bug in socket_connect_ev() (This used to be commit 3f77b879a035929a843e02b798d54eba6625bde7) --- source4/include/includes.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 9ecfd20422..85a023338a 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -83,6 +83,9 @@ #define HAVE_ADS #endif +/* tell ldb we have the internal ldap code */ +#define HAVE_ILDAP 1 + /* * Define VOLATILE if needed. */ -- cgit From 76478d7eb145880e213ed8a399ce2171f43e18a4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 Jul 2005 02:34:23 +0000 Subject: r8306: some more heimdal configure checks (This used to be commit 575413fc863147ee46e1ff658af1d74093fc7686) --- source4/include/includes.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 85a023338a..d87820d788 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -197,6 +197,10 @@ extern int DEBUGLEVEL; #endif #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) +#ifndef HAVE_SSIZE_T +#define ssize_t int +#endif + /* type safe varient of smb_xmalloc() */ -- cgit From 54ffd4fdbf470cb71cbf9a9c9e5aa37f73acc559 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 Jul 2005 04:17:54 +0000 Subject: r8313: moved PRINTF_ATTRIBUTE to replace.h to try to get irix building with heimdal (This used to be commit 7d4e309f02cfcef661ebf3bbe9c227938318077c) --- source4/include/includes.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index d87820d788..3fe3b78c90 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -28,16 +28,6 @@ #include "local.h" -#if (__GNUC__ >= 3) -/** Use gcc attribute to check printf fns. a1 is the 1-based index of - * the parameter containing the format, and a2 the index of the first - * argument. Note that some gcc 2.x versions don't handle this - * properly **/ -#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) -#else -#define PRINTF_ATTRIBUTE(a1, a2) -#endif - #ifdef __GNUC__ /** gcc attribute used on function parameters so that it does not emit * warnings about them being unused. **/ @@ -113,6 +103,8 @@ extern char *sys_errlist[]; extern int errno; #endif +#include "lib/replace/replace.h" + /* Lists, trees, caching, database... */ #include "xfile.h" #include "lib/talloc/talloc.h" @@ -140,7 +132,6 @@ extern int errno; #include "lib/com/com.h" #include "credentials.h" -#include "lib/replace/replace.h" #define malloc_p(type) (type *)malloc(sizeof(type)) -- cgit From 2ea372afd98b133144ad897250bd89d2c2855b16 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Jul 2005 11:17:32 +0000 Subject: r8420: slowly getting my way through some more heimdal portability fixes (This used to be commit 59c3de6ca8b8e153e5cfd67da5f2afc2e23d36db) --- source4/include/includes.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 3fe3b78c90..5a86aa7218 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -192,6 +192,10 @@ extern int DEBUGLEVEL; #define ssize_t int #endif +#ifndef UINT16_MAX +#define UINT16_MAX 65535 +#endif + /* type safe varient of smb_xmalloc() */ -- cgit From 84db0662071a6ab61ae21a5da35317d8aed55d75 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 13 Jul 2005 20:44:46 +0000 Subject: r8434: Win32 portability updates from Steven Edwards : - undefine anything in the win32 api or PSDK headers that Samba already defines - map BSD error codes to Winsock Error codes (This used to be commit d2ea6191259a28a32a1f4ffdff067b1a80e8dcc9) --- source4/include/includes.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 5a86aa7218..00054b985d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -68,6 +68,10 @@ #include #endif +#if defined(_MSC_VER) || defined(__MINGW32__) +#include "lib/replace/win32/replace.h" +#endif + /* we support ADS if we want it and have krb5 and ldap libs */ #if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) #define HAVE_ADS -- cgit From 2483f979d178ca39c52f5ded3cad33c3f042a566 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 13 Jul 2005 22:11:52 +0000 Subject: r8438: - More win32 portability fixes. Now fails on socketwrapper (because unix domain sockets are not available on win32) - Update howto (This used to be commit c88ee6b61b290806064993dba3fc27ea9e59cc63) --- source4/include/includes.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 00054b985d..cedd51b6f3 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -64,6 +64,10 @@ #include #endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + #ifdef HAVE_WINDOWS_H #include #endif -- cgit From c84512f0e1c1dd6ac0cb3e9b5e2fbb2f3c0d4eb1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Jul 2005 21:27:39 +0000 Subject: r8690: Code cleanups, improvements necessary for dependencies (not added yet) (This used to be commit 7384b3c4a1450ad63356dcf586e3a7e7335f8e6d) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index cedd51b6f3..88ee4af3b0 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -148,7 +148,7 @@ extern int errno; /***** automatically generated prototypes *****/ #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) -#include "proto.h" +#include "include/proto.h" #undef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2) -- cgit From a33c02612ad12b27ba2da1d3b9be0fb9bb339367 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 22 Jul 2005 11:16:32 +0000 Subject: r8713: Experiment to try and fix warnings on 64-bit machines without breaking 32-bit ones. Yes, this weird looking macros are part of C99. (This used to be commit 7b316f119b8486b75ebe63b185c50fab82313e58) --- source4/include/includes.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 88ee4af3b0..58799d9b86 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -47,6 +47,10 @@ #include #endif +#ifdef HAVE_INTTYPES_H +#include +#endif + #ifdef HAVE_STRING_H #include #endif -- cgit From 5b94a9583f5fa167729fc6e425ae748c740a1ae1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 27 Jul 2005 21:09:16 +0000 Subject: r8806: Move data representation-independent data into seperate header (This used to be commit 26e1fdf63007e28468a05b18bede1e69981edc12) --- source4/include/includes.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 58799d9b86..7b6b2014e6 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -133,10 +133,10 @@ extern int errno; #include "byteorder.h" #include "module.h" #include "librpc/ndr/libndr.h" -#include "librpc/gen_ndr/ndr_misc.h" -#include "librpc/gen_ndr/ndr_dcerpc.h" +#include "librpc/gen_ndr/misc.h" +#include "librpc/gen_ndr/dcerpc.h" #include "librpc/ndr/ndr_orpc.h" -#include "librpc/gen_ndr/ndr_orpc.h" +#include "librpc/gen_ndr/orpc.h" #include "librpc/rpc/dcerpc.h" #include "smb_interfaces.h" #include "ntvfs/ntvfs.h" -- cgit From f30eba52225df456e341beac380ab05469bde76b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 2 Aug 2005 20:12:31 +0000 Subject: r8940: Add TDR (Trivial Data Representation). The aim is to use this later for NBT/WINS/etc rather then having to depend on NDR. (This used to be commit 5ee7af26dd220de06f1764cd1683abedeeda5131) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 7b6b2014e6..ea7abb0c9b 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -132,6 +132,7 @@ extern int errno; #include "smb.h" #include "byteorder.h" #include "module.h" +#include "lib/tdr/tdr.h" #include "librpc/ndr/libndr.h" #include "librpc/gen_ndr/misc.h" #include "librpc/gen_ndr/dcerpc.h" -- cgit From 24186a80eb4887b5fb3e72e4b877b456cbe8e35f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 29 Aug 2005 04:30:22 +0000 Subject: r9728: A *major* update to the credentials system, to incorporate the Kerberos CCACHE into the system. This again allows the use of the system ccache when no username is specified, and brings more code in common between gensec_krb5 and gensec_gssapi. It also has a side-effect that may (or may not) be expected: If there is a ccache, even if it is not used (perhaps the remote server didn't want kerberos), it will change the default username. Andrew Bartlett (This used to be commit 6202267f6ec1446d6bd11d1d37d05a977bc8d315) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index ea7abb0c9b..94b88d37b2 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -115,6 +115,7 @@ extern char *sys_errlist[]; extern int errno; #endif + #include "lib/replace/replace.h" /* Lists, trees, caching, database... */ -- cgit From f3b412fbd6dd94d64eb6a63d88baef2816891c29 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 23 Sep 2005 00:38:22 +0000 Subject: r10438: Move portability functions to lib/replace/; replace now simply ensures that a given set of (working) POSIX functions are available (without prefixes to their names, etc). See lib/replace/README for a list. Functions that behave different from their POSIX specification (such as sys_select, sys_read, etc) have kept the sys_ prefix. (This used to be commit 29919a71059b29fa27a49b1f5b84bb8881de65fc) --- source4/include/includes.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 94b88d37b2..3636dec58d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -76,10 +76,6 @@ #include #endif -#if defined(_MSC_VER) || defined(__MINGW32__) -#include "lib/replace/win32/replace.h" -#endif - /* we support ADS if we want it and have krb5 and ldap libs */ #if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) #define HAVE_ADS @@ -106,15 +102,6 @@ struct ipv4_addr { uint32_t addr; }; -#ifndef HAVE_STRERROR -extern char *sys_errlist[]; -#define strerror(i) sys_errlist[i] -#endif - -#ifndef HAVE_ERRNO_DECL -extern int errno; -#endif - #include "lib/replace/replace.h" -- cgit From f801ad359290c51d3216c755fb2a8344babb484f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 26 Sep 2005 15:59:43 +0000 Subject: r10510: Decrease the amount of data included by includes.h a bit (This used to be commit 03647e1321cf6c9bd6ced3945265f635e9468973) --- source4/include/includes.h | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 3636dec58d..882c8e6277 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -64,18 +64,6 @@ #include #endif -#ifdef HAVE_WINSOCK2_H -#include -#endif - -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -#ifdef HAVE_WINDOWS_H -#include -#endif - /* we support ADS if we want it and have krb5 and ldap libs */ #if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) #define HAVE_ADS @@ -131,9 +119,6 @@ struct ipv4_addr { #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "lib/com/com.h" -#include "credentials.h" - - #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) @@ -189,10 +174,6 @@ extern int DEBUGLEVEL; #endif #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) -#ifndef HAVE_SSIZE_T -#define ssize_t int -#endif - #ifndef UINT16_MAX #define UINT16_MAX 65535 #endif @@ -203,4 +184,3 @@ extern int DEBUGLEVEL; #define smb_xmalloc_p(type) (type *)smb_xmalloc(sizeof(type)) #endif /* _INCLUDES_H */ - -- cgit From 49839f356f493d0de1b719c8c3bfdee4713c0728 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 26 Sep 2005 16:57:08 +0000 Subject: r10513: Reduce some use of pstring. The main reason some parts of the code still use pstring is next_token() now. (This used to be commit a5b88bcd420eb7ae42283293541519e142be36e3) --- source4/include/includes.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 882c8e6277..41452578ee 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -64,11 +64,6 @@ #include #endif -/* we support ADS if we want it and have krb5 and ldap libs */ -#if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) -#define HAVE_ADS -#endif - /* tell ldb we have the internal ldap code */ #define HAVE_ILDAP 1 -- cgit From 675f81eed3086682faeca34e56d441c6e38bd800 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 27 Sep 2005 03:11:08 +0000 Subject: r10525: change from AC_CHECK_TYPES() to AC_CHECK_TYPE() for intptr_t, so the type is always available, which means we need less #ifdefs (This used to be commit d4af4b11ae69a63fa3b2048e6d576055d86d2bb4) --- source4/include/includes.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 41452578ee..78481ac679 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -162,11 +162,7 @@ extern int DEBUGLEVEL; Also, please call this via the discard_const_p() macro interface, as that makes the return type safe. */ -#ifdef HAVE_INTPTR_T #define discard_const(ptr) ((void *)((intptr_t)(ptr))) -#else -#define discard_const(ptr) ((void *)(ptr)) -#endif #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) #ifndef UINT16_MAX -- cgit From 42b81d7c3e8ac9ad4c35d5377decbdd5ab18ffbb Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Sep 2005 10:00:27 +0000 Subject: r10528: Add credentials.h back into includes.h as some compilers don't seem to be able to handle incomplete enum types. (This used to be commit 540155fad3c8e3d79fb631bb3f14273f82130a73) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 78481ac679..ee1ac6d96e 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -114,6 +114,7 @@ struct ipv4_addr { #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "lib/com/com.h" +#include "credentials.h" #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) -- cgit From 4abb4797613868e518baafb5f3618e78f67ac05c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 28 Sep 2005 19:56:21 +0000 Subject: r10588: Remove more unused files, macros (This used to be commit d2f80c0457f7404b2cac9df59a400130e9ad025f) --- source4/include/includes.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index ee1ac6d96e..b7acae9019 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -102,7 +102,6 @@ struct ipv4_addr { #include "smb_macros.h" #include "smb.h" #include "byteorder.h" -#include "module.h" #include "lib/tdr/tdr.h" #include "librpc/ndr/libndr.h" #include "librpc/gen_ndr/misc.h" @@ -116,10 +115,6 @@ struct ipv4_addr { #include "lib/com/com.h" #include "credentials.h" -#define malloc_p(type) (type *)malloc(sizeof(type)) -#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) -#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count) - /***** automatically generated prototypes *****/ #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "include/proto.h" @@ -170,9 +165,4 @@ extern int DEBUGLEVEL; #define UINT16_MAX 65535 #endif -/* - type safe varient of smb_xmalloc() -*/ -#define smb_xmalloc_p(type) (type *)smb_xmalloc(sizeof(type)) - #endif /* _INCLUDES_H */ -- cgit From 2c6ecae4e62a5bb7acac2872450148fb4521cf3e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 14 Oct 2005 04:04:52 +0000 Subject: r10982: Move credentials.h into auth/credentials, and add flags needed by previous patch. Andrew Bartlett (This used to be commit 2c537d47ba99885c6462016342b1cc29df4c54c5) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b7acae9019..f2da31eed6 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -113,7 +113,7 @@ struct ipv4_addr { #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "lib/com/com.h" -#include "credentials.h" +#include "auth/credentials/credentials.h" /***** automatically generated prototypes *****/ #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) -- cgit From efe67458c17ffa52b48f979505caf11c2ac52c4e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 13 Dec 2005 19:38:12 +0000 Subject: r12216: Couple of small fixes: reduce include/includes.h a bit, simplify headers in build/smb_build/, remove unused pstring macros (This used to be commit 432296207400636dd81d0929ec7b1b4cebbcaa62) --- source4/include/includes.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index f2da31eed6..18fc38031c 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -112,7 +112,6 @@ struct ipv4_addr { #include "smb_interfaces.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" -#include "lib/com/com.h" #include "auth/credentials/credentials.h" /***** automatically generated prototypes *****/ @@ -161,8 +160,4 @@ extern int DEBUGLEVEL; #define discard_const(ptr) ((void *)((intptr_t)(ptr))) #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) -#ifndef UINT16_MAX -#define UINT16_MAX 65535 -#endif - #endif /* _INCLUDES_H */ -- cgit From 52728b7d416f7837fc3460a9e131355094649b15 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 23 Dec 2005 12:29:13 +0000 Subject: r12446: Merge mkproto.sh's functionality into mkproto.pl Allow specifying the _PUBLIC_ keyword on functions to indicate a function is public. Public prototypes can now be written to a seperate header, although this functionality is not used yet. (This used to be commit e3466df6dfb62bbf8bee3acfa92996945054c2dd) --- source4/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 18fc38031c..9f5679fa80 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -160,4 +160,6 @@ extern int DEBUGLEVEL; #define discard_const(ptr) ((void *)((intptr_t)(ptr))) #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) +#define _PUBLIC_ + #endif /* _INCLUDES_H */ -- cgit From 448483199fb436309735f5203b3282fca2c517ec Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 26 Dec 2005 16:46:55 +0000 Subject: r12494: Support loading modules from .so files for most subsystems. We now use a different system for initializing the modules for a subsystem. Most subsystems now have an init function that looks something like this: init_module_fn static_init[] = STATIC_AUTH_MODULES; init_module_fn *shared_init = load_samba_modules(NULL, "auth"); run_init_functions(static_init); run_init_functions(shared_init); talloc_free(shared_init); I hope to eliminate the other init functions later on (the init_programname_subsystems; defines). (This used to be commit b6d2ad4ce0a91c4be790dd258820c492ff1787ea) --- source4/include/includes.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 9f5679fa80..fdd155b0ee 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -23,7 +23,6 @@ #ifndef NO_CONFIG_H /* for some tests */ #include "config.h" -#include "smb_build.h" #endif #include "local.h" @@ -114,6 +113,10 @@ struct ipv4_addr { #include "cli_context.h" #include "auth/credentials/credentials.h" +#ifndef NO_CONFIG_H +#include "smb_build.h" +#endif + /***** automatically generated prototypes *****/ #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "include/proto.h" -- cgit From 6aafed9600a3fa05932668c70fc0e20f3724dab6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 26 Dec 2005 18:48:23 +0000 Subject: r12499: Move smb_build.h out of includes.h (This used to be commit c92ace494f92084ddf178626cdf392d151043bc7) --- source4/include/includes.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index fdd155b0ee..2222b4ff43 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -113,10 +113,6 @@ struct ipv4_addr { #include "cli_context.h" #include "auth/credentials/credentials.h" -#ifndef NO_CONFIG_H -#include "smb_build.h" -#endif - /***** automatically generated prototypes *****/ #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "include/proto.h" -- cgit From 0a3c167f6bcf08b2204ca49831ca49eef73dcbf4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Dec 2005 22:51:30 +0000 Subject: r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server. (This used to be commit 87f665a1d5ba74289974bf9d8f9441c162e6f1b1) --- source4/include/includes.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 2222b4ff43..a8aecc3610 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -101,7 +101,6 @@ struct ipv4_addr { #include "smb_macros.h" #include "smb.h" #include "byteorder.h" -#include "lib/tdr/tdr.h" #include "librpc/ndr/libndr.h" #include "librpc/gen_ndr/misc.h" #include "librpc/gen_ndr/dcerpc.h" @@ -109,13 +108,13 @@ struct ipv4_addr { #include "librpc/gen_ndr/orpc.h" #include "librpc/rpc/dcerpc.h" #include "smb_interfaces.h" -#include "ntvfs/ntvfs.h" #include "cli_context.h" #include "auth/credentials/credentials.h" /***** automatically generated prototypes *****/ #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "include/proto.h" +#include "basic.h" #undef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2) -- cgit From 2cd5ca7d25f12aa9198bf8c2deb6aea282f573ee Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 28 Dec 2005 15:38:36 +0000 Subject: r12542: Move some more prototypes out to seperate headers (This used to be commit 0aca5fd5130d980d07398f3291d294202aefe3c2) --- source4/include/includes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index a8aecc3610..b6d074f8b2 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -85,6 +85,7 @@ struct ipv4_addr { }; +#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "lib/replace/replace.h" /* Lists, trees, caching, database... */ @@ -102,7 +103,6 @@ struct ipv4_addr { #include "smb.h" #include "byteorder.h" #include "librpc/ndr/libndr.h" -#include "librpc/gen_ndr/misc.h" #include "librpc/gen_ndr/dcerpc.h" #include "librpc/ndr/ndr_orpc.h" #include "librpc/gen_ndr/orpc.h" @@ -110,9 +110,9 @@ struct ipv4_addr { #include "smb_interfaces.h" #include "cli_context.h" #include "auth/credentials/credentials.h" +#include "libcli/nbt/libnbt.h" /***** automatically generated prototypes *****/ -#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "include/proto.h" #include "basic.h" #undef _PRINTF_ATTRIBUTE -- cgit From 25bb00fbcd409572e1c19c05fdc42c883936780b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 3 Jan 2006 13:41:17 +0000 Subject: r12693: Move core data structures out of smb.h into core.h torture prototypes in seperate header (This used to be commit 73610639b23ca3743077193fa0b1de7c7f65944d) --- source4/include/includes.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b6d074f8b2..849850daa6 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -66,16 +66,6 @@ /* tell ldb we have the internal ldap code */ #define HAVE_ILDAP 1 -/* - * Define VOLATILE if needed. - */ - -#define False (0) -#define True (1) -#define Auto (2) - -typedef int BOOL; - /* we use struct ipv4_addr to avoid having to include all the system networking headers everywhere @@ -84,7 +74,6 @@ struct ipv4_addr { uint32_t addr; }; - #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "lib/replace/replace.h" @@ -95,12 +84,13 @@ struct ipv4_addr { #include "structs.h" #include "trans2.h" #include "nterr.h" +#include "core.h" +#include "smb.h" #include "charset.h" #include "debug.h" #include "doserr.h" #include "enums.h" #include "smb_macros.h" -#include "smb.h" #include "byteorder.h" #include "librpc/ndr/libndr.h" #include "librpc/gen_ndr/dcerpc.h" -- cgit From 78c50015bb8bd5a1d831a6e7ec796b3367c73145 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 3 Jan 2006 15:40:05 +0000 Subject: r12694: Move some headers to the directory of the subsystem they belong to. (This used to be commit c722f665c90103f3ed57621c460e32ad33e7a8a3) --- source4/include/includes.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 849850daa6..dd4f19009a 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -84,9 +84,8 @@ struct ipv4_addr { #include "structs.h" #include "trans2.h" #include "nterr.h" +#include "charset/charset.h" #include "core.h" -#include "smb.h" -#include "charset.h" #include "debug.h" #include "doserr.h" #include "enums.h" @@ -98,7 +97,6 @@ struct ipv4_addr { #include "librpc/gen_ndr/orpc.h" #include "librpc/rpc/dcerpc.h" #include "smb_interfaces.h" -#include "cli_context.h" #include "auth/credentials/credentials.h" #include "libcli/nbt/libnbt.h" -- cgit From 5c8447773f306e302c7182611e4fc03978c340b6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 9 Jan 2006 21:44:30 +0000 Subject: r12801: Some more include/ cleanups (remove unused macros + move files to specific dirs) (This used to be commit 243cf760b077e155f5ac508aeebf819f7708a84e) --- source4/include/includes.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index dd4f19009a..fae9a29a9c 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -36,6 +36,18 @@ /** Feel free to add definitions for other compilers here. */ #endif +#ifndef PRINTF_ATTRIBUTE +#if !defined(NO_PRINTF_ATTRIBUTE) && (__GNUC__ >= 3) +/** Use gcc attribute to check printf fns. a1 is the 1-based index of + * the parameter containing the format, and a2 the index of the first + * argument. Note that some gcc 2.x versions don't handle this + * properly **/ +#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) +#else +#define PRINTF_ATTRIBUTE(a1, a2) +#endif +#endif + #include #include #include @@ -79,7 +91,7 @@ struct ipv4_addr { /* Lists, trees, caching, database... */ #include "xfile.h" -#include "lib/talloc/talloc.h" +#include "talloc/talloc.h" #include "nt_status.h" #include "structs.h" #include "trans2.h" -- cgit From 720041d07894080080c12d17b49524a0a184b1f4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 10 Jan 2006 16:55:15 +0000 Subject: r12832: make it possible to pass -D_PUBLIC_... to the compiler metze (This used to be commit 5540509f10e3fee4c653081a3bc56213d40869df) --- source4/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index fae9a29a9c..29c868ff39 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -158,6 +158,8 @@ extern int DEBUGLEVEL; #define discard_const(ptr) ((void *)((intptr_t)(ptr))) #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) +#ifndef _PUBLIC_ #define _PUBLIC_ +#endif #endif /* _INCLUDES_H */ -- cgit From aecd9827c61cb5bc2c1f3dab784066c0d010d1d7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 18 Jan 2006 21:52:19 +0000 Subject: r13019: Again protect us against format string mismatches, with the new split out proto headers. The reason this is done in this way is that the attribute must be on the prototype, not the actual function defintion. Hence the macros which expand to nothing in the C file, but expand to an __attribute__ in the prototype header. Andrew Bartlett (This used to be commit a88933668f908a398bb0d8bc7dc39c96cee40de6) --- source4/include/includes.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 29c868ff39..ed8de0607d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -112,12 +112,13 @@ struct ipv4_addr { #include "auth/credentials/credentials.h" #include "libcli/nbt/libnbt.h" -/***** automatically generated prototypes *****/ -#include "include/proto.h" -#include "basic.h" #undef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2) +/***** automatically generated prototypes *****/ +#include "basic.h" +#include "include/proto.h" + /* String routines */ #include "safe_string.h" -- cgit From 10d88a02d727ae16336eec8f696a94b76c1132cd Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 23 Feb 2006 11:29:01 +0000 Subject: r13652: Move some more stuff out off include/ (This used to be commit 26bf2a393b90acc098be0b30886dbba34d348a01) --- source4/include/includes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index ed8de0607d..3babb4eef5 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -95,11 +95,11 @@ struct ipv4_addr { #include "nt_status.h" #include "structs.h" #include "trans2.h" -#include "nterr.h" +#include "libcli/util/nterr.h" #include "charset/charset.h" #include "core.h" #include "debug.h" -#include "doserr.h" +#include "libcli/util/doserr.h" #include "enums.h" #include "smb_macros.h" #include "byteorder.h" -- cgit From d3bcaf66a8568fc19a3013f9dc974fb08ee3a39a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 23 Feb 2006 12:44:21 +0000 Subject: r13654: Move some more stuff out of include/ (This used to be commit 2ec7bba03a2edf713004941e9ed74798f5cf8d32) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 3babb4eef5..444feab6fc 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -108,7 +108,7 @@ struct ipv4_addr { #include "librpc/ndr/ndr_orpc.h" #include "librpc/gen_ndr/orpc.h" #include "librpc/rpc/dcerpc.h" -#include "smb_interfaces.h" +#include "libcli/raw/interfaces.h" #include "auth/credentials/credentials.h" #include "libcli/nbt/libnbt.h" -- cgit From dfc517b05395d925a4d7b1ce9633a849f9468e70 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 23 Feb 2006 15:52:24 +0000 Subject: r13658: More moving around of files: - Collect the generic utility functions into a lib/util/ (a la GLib is for the GNOME folks) - Remove even more files from include/ (This used to be commit ba62880f5b05c2a505dc7f54676b231197a7e707) --- source4/include/includes.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 444feab6fc..8bede51721 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -86,28 +86,31 @@ struct ipv4_addr { uint32_t addr; }; +/* protocol types. It assumes that higher protocols include lower protocols + as subsets. FIXME: Move to one of the smb-specific headers */ +enum protocol_types {PROTOCOL_NONE,PROTOCOL_CORE,PROTOCOL_COREPLUS,PROTOCOL_LANMAN1,PROTOCOL_LANMAN2,PROTOCOL_NT1}; + +/* passed to br lock code. FIXME: Move to one of the smb-specific headers */ +enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_READ_LOCK, PENDING_WRITE_LOCK}; + #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "lib/replace/replace.h" /* Lists, trees, caching, database... */ -#include "xfile.h" -#include "talloc/talloc.h" #include "nt_status.h" +#include "talloc/talloc.h" +#include "core.h" +#include "charset/charset.h" #include "structs.h" -#include "trans2.h" +#include "util/util.h" #include "libcli/util/nterr.h" -#include "charset/charset.h" -#include "core.h" -#include "debug.h" #include "libcli/util/doserr.h" -#include "enums.h" -#include "smb_macros.h" -#include "byteorder.h" #include "librpc/ndr/libndr.h" #include "librpc/gen_ndr/dcerpc.h" #include "librpc/ndr/ndr_orpc.h" #include "librpc/gen_ndr/orpc.h" #include "librpc/rpc/dcerpc.h" +#include "libcli/raw/trans2.h" #include "libcli/raw/interfaces.h" #include "auth/credentials/credentials.h" #include "libcli/nbt/libnbt.h" @@ -116,12 +119,11 @@ struct ipv4_addr { #define _PRINTF_ATTRIBUTE(a1, a2) /***** automatically generated prototypes *****/ -#include "basic.h" #include "include/proto.h" /* String routines */ -#include "safe_string.h" +#include "util/safe_string.h" #ifndef HAVE_PIPE #define SYNC_DNS 1 -- cgit From f2ab61b129f425b09d61842f2744c17139701d17 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 3 Mar 2006 08:08:46 +0000 Subject: r13808: remove unused define metze (This used to be commit b639b814d912891d32c31f0995df7c06d6a10522) --- source4/include/includes.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 8bede51721..7c724ef2e8 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -125,10 +125,6 @@ enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_READ_LOCK, PENDING_WRITE_LOCK}; #include "util/safe_string.h" -#ifndef HAVE_PIPE -#define SYNC_DNS 1 -#endif - extern int DEBUGLEVEL; #if defined(VALGRIND) -- cgit From 2debfc918cc19e798f996f64dc5fe079b0c538cf Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 3 Mar 2006 08:15:29 +0000 Subject: r13809: move ldb specific define metze (This used to be commit 6f47fcbd44ae83e7268aedf91ac56fff4189c763) --- source4/include/includes.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 7c724ef2e8..dc71696ac7 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -75,9 +75,6 @@ #include #endif -/* tell ldb we have the internal ldap code */ -#define HAVE_ILDAP 1 - /* we use struct ipv4_addr to avoid having to include all the system networking headers everywhere -- cgit From e0f691b1e135fd39f7a68a6d8244573d038c8485 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 3 Mar 2006 08:17:55 +0000 Subject: r13810: global data types are defined in core.h now... metze (This used to be commit c6137a1af982bd77e4b24d05e82c8621b36d0fac) --- source4/include/includes.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index dc71696ac7..2d685b8ba7 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -75,14 +75,6 @@ #include #endif -/* - we use struct ipv4_addr to avoid having to include all the - system networking headers everywhere -*/ -struct ipv4_addr { - uint32_t addr; -}; - /* protocol types. It assumes that higher protocols include lower protocols as subsets. FIXME: Move to one of the smb-specific headers */ enum protocol_types {PROTOCOL_NONE,PROTOCOL_CORE,PROTOCOL_COREPLUS,PROTOCOL_LANMAN1,PROTOCOL_LANMAN2,PROTOCOL_NT1}; -- cgit From 4dcab29f51ef3cab1019550853d186085d535894 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 3 Mar 2006 08:21:11 +0000 Subject: r13811: nicer format... metze (This used to be commit 89f7a2b93f7b69339baddff2ac30e648d7b2f8b9) --- source4/include/includes.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 2d685b8ba7..83bc9569cb 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -77,10 +77,22 @@ /* protocol types. It assumes that higher protocols include lower protocols as subsets. FIXME: Move to one of the smb-specific headers */ -enum protocol_types {PROTOCOL_NONE,PROTOCOL_CORE,PROTOCOL_COREPLUS,PROTOCOL_LANMAN1,PROTOCOL_LANMAN2,PROTOCOL_NT1}; +enum protocol_types { + PROTOCOL_NONE, + PROTOCOL_CORE, + PROTOCOL_COREPLUS, + PROTOCOL_LANMAN1, + PROTOCOL_LANMAN2, + PROTOCOL_NT1 +}; /* passed to br lock code. FIXME: Move to one of the smb-specific headers */ -enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_READ_LOCK, PENDING_WRITE_LOCK}; +enum brl_type { + READ_LOCK, + WRITE_LOCK, + PENDING_READ_LOCK, + PENDING_WRITE_LOCK +}; #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "lib/replace/replace.h" -- cgit From 8ef42b1fab5e7608a8f90f303ec4c1d3524627d9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 5 Mar 2006 18:28:33 +0000 Subject: r13847: Fix some portability issues with the visibility attribute. (This used to be commit fe5eae0e983d1c8634dd9b7caf19cd103c641223) --- source4/include/includes.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 83bc9569cb..32dda4a302 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -36,6 +36,12 @@ /** Feel free to add definitions for other compilers here. */ #endif +#ifdef HAVE_VISIBILITY_ATTR +# define _PUBLIC_ __attribute__((visibility("default"))) +#else +# define _PUBLIC_ +#endif + #ifndef PRINTF_ATTRIBUTE #if !defined(NO_PRINTF_ATTRIBUTE) && (__GNUC__ >= 3) /** Use gcc attribute to check printf fns. a1 is the 1-based index of @@ -158,8 +164,4 @@ extern int DEBUGLEVEL; #define discard_const(ptr) ((void *)((intptr_t)(ptr))) #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) -#ifndef _PUBLIC_ -#define _PUBLIC_ -#endif - #endif /* _INCLUDES_H */ -- cgit From 4d8fe47f7fcfa1b0f479faf72d7d3fe15f799be5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 5 Mar 2006 20:45:18 +0000 Subject: r13849: More improvements to the libutil docs. (This used to be commit eed16ac3b7f7062a34f09f602db0f828cac7f246) --- source4/include/includes.h | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 32dda4a302..02f67662f1 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -132,36 +132,9 @@ enum brl_type { #include "util/safe_string.h" -extern int DEBUGLEVEL; - -#if defined(VALGRIND) -#define strlen(x) valgrind_strlen(x) -#endif - #if 0 /* darn, we can't do this now that we don't link the ldb tools to all the smb libs */ #define TALLOC_ABORT(reason) smb_panic(reason) #endif -/* - this is a warning hack. The idea is to use this everywhere that we - get the "discarding const" warning from gcc. That doesn't actually - fix the problem of course, but it means that when we do get to - cleaning them up we can do it by searching the code for - discard_const. - - It also means that other error types aren't as swamped by the noise - of hundreds of const warnings, so we are more likely to notice when - we get new errors. - - Please only add more uses of this macro when you find it - _really_ hard to fix const warnings. Our aim is to eventually use - this function in only a very few places. - - Also, please call this via the discard_const_p() macro interface, as that - makes the return type safe. -*/ -#define discard_const(ptr) ((void *)((intptr_t)(ptr))) -#define discard_const_p(type, ptr) ((type *)discard_const(ptr)) - #endif /* _INCLUDES_H */ -- cgit From d8503c6ba120172e9aae737c5510e547e8dea4a5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 6 Mar 2006 14:19:11 +0000 Subject: r13860: - add support for SMB2 ("SMB 2.001") negotiation in SMB negprot requests - the default max protocol is still NT1 metze (This used to be commit d1bae931b327dda28e648efc473e0462cf036f7c) --- source4/include/includes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 02f67662f1..058eb267a8 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -89,7 +89,8 @@ enum protocol_types { PROTOCOL_COREPLUS, PROTOCOL_LANMAN1, PROTOCOL_LANMAN2, - PROTOCOL_NT1 + PROTOCOL_NT1, + PROTOCOL_SMB2 }; /* passed to br lock code. FIXME: Move to one of the smb-specific headers */ -- cgit From ba564a901e519b0f2cf2b7651bd260f618506b5c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 6 Mar 2006 23:28:18 +0000 Subject: r13903: Don't generate prototypes for modules and binaries in include/proto.h by default. (This used to be commit c80a8f1102caf744b66c13bebde38fba74983dc4) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 058eb267a8..60e3fb034b 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -111,6 +111,7 @@ enum brl_type { #include "charset/charset.h" #include "structs.h" #include "util/util.h" +#include "param/param.h" #include "libcli/util/nterr.h" #include "libcli/util/doserr.h" #include "librpc/ndr/libndr.h" -- cgit From 4ac2be99588b48b0652a524bf12fb1aa9c3f5fbb Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 7 Mar 2006 11:07:23 +0000 Subject: r13924: Split more prototypes out of include/proto.h + initial work on header file dependencies (This used to be commit 122835876748a3eaf5e8d31ad1abddab9acb8781) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 60e3fb034b..adf4d37016 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -105,7 +105,7 @@ enum brl_type { #include "lib/replace/replace.h" /* Lists, trees, caching, database... */ -#include "nt_status.h" +#include "libcli/util/nt_status.h" #include "talloc/talloc.h" #include "core.h" #include "charset/charset.h" -- cgit From 17ae598141b44142ad52a66cc4767029e3a73d6c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 7 Mar 2006 13:36:26 +0000 Subject: r13938: Around round of splitups (This used to be commit 2d655f05285a86bb1bbb882e4dd843def15c9dfa) --- source4/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index adf4d37016..89d586b75c 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -123,6 +123,7 @@ enum brl_type { #include "libcli/raw/interfaces.h" #include "auth/credentials/credentials.h" #include "libcli/nbt/libnbt.h" +#include "libcli/util/proto.h" #undef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2) -- cgit From 32b0bb64bcb91a3f08fcaea72b89bf6409d0e67c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 11 Mar 2006 10:25:59 +0000 Subject: r14205: move smb specific stuff out of includes.h (finally!!!:-) all this changes really help ccache to speed up the samba4 build:-) metze (This used to be commit 180a79d1036e54fc0c50572b820818e9aafa28e9) --- source4/include/includes.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 89d586b75c..71fa67c251 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -119,8 +119,6 @@ enum brl_type { #include "librpc/ndr/ndr_orpc.h" #include "librpc/gen_ndr/orpc.h" #include "librpc/rpc/dcerpc.h" -#include "libcli/raw/trans2.h" -#include "libcli/raw/interfaces.h" #include "auth/credentials/credentials.h" #include "libcli/nbt/libnbt.h" #include "libcli/util/proto.h" -- cgit From 8fd131a9d4411280622683ac11a6e30783b2ac07 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 13 Mar 2006 05:01:34 +0000 Subject: r14294: conditionally define _PUBLIC_, so you can disable it easily with -D_PUBLIC_= (This used to be commit 6c6bd77ec2eb7d47e1f2c54f939d479e7d0fd7d9) --- source4/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 71fa67c251..fb3bf44bf4 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -36,11 +36,13 @@ /** Feel free to add definitions for other compilers here. */ #endif +#ifndef _PUBLIC_ #ifdef HAVE_VISIBILITY_ATTR # define _PUBLIC_ __attribute__((visibility("default"))) #else # define _PUBLIC_ #endif +#endif #ifndef PRINTF_ATTRIBUTE #if !defined(NO_PRINTF_ATTRIBUTE) && (__GNUC__ >= 3) -- cgit From 7a121583b496a8fc0c1fcf44504d814700273e40 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 13 Mar 2006 22:36:07 +0000 Subject: r14349: Kill proto.h! Prototypes are now spread over multiple headers, usually one per subsystem. This change is required to allow proper header dependencies later on, without recompiling Samba each time the mtime of any source file changes. (This used to be commit 3da79bf909f801386a52e6013db399c384d0401c) --- source4/include/includes.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index fb3bf44bf4..68d4d0e4a2 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -125,12 +125,19 @@ enum brl_type { #include "libcli/nbt/libnbt.h" #include "libcli/util/proto.h" +/* These headers are used by the NDR parsers. They are globally + * included at the moment, but will be included by the autogenerated + * NDR parsers later on and removed from here. */ +#include "libcli/nbt/nbtname.h" +#include "librpc/ndr/ndr_sec.h" +#include "librpc/ndr/ndr_drsuapi.h" +#include "librpc/ndr/ndr_spoolss_buf.h" +#include "librpc/ndr/ndr_krb5pac.h" +#include "librpc/ndr/ndr_compression.h" + #undef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2) -/***** automatically generated prototypes *****/ -#include "include/proto.h" - /* String routines */ #include "util/safe_string.h" -- cgit From 9865048bf41acff37d021a0773347d36bcac3798 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 14 Mar 2006 00:12:58 +0000 Subject: r14361: Support 'helper' attribute in pidl and use it. Remove some headers from include/includes.h (they're now only included in the file they are used) (This used to be commit 7213b7498eacac2c2cd03cf6aace376ce153cc7c) --- source4/include/includes.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 68d4d0e4a2..b613a18633 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -125,14 +125,7 @@ enum brl_type { #include "libcli/nbt/libnbt.h" #include "libcli/util/proto.h" -/* These headers are used by the NDR parsers. They are globally - * included at the moment, but will be included by the autogenerated - * NDR parsers later on and removed from here. */ -#include "libcli/nbt/nbtname.h" -#include "librpc/ndr/ndr_sec.h" -#include "librpc/ndr/ndr_drsuapi.h" -#include "librpc/ndr/ndr_spoolss_buf.h" -#include "librpc/ndr/ndr_krb5pac.h" +/* FIXME: This header should be included by pidl where necessary */ #include "librpc/ndr/ndr_compression.h" #undef _PRINTF_ATTRIBUTE -- cgit From 227a789351acd600d4cde15df9e6b3d106e862c1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 14 Mar 2006 00:37:05 +0000 Subject: r14362: Only include ndr_compression.h when necessary. (This used to be commit 4fced6dbbdc06233e5cf69f90c099fafee9baa34) --- source4/include/includes.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b613a18633..81105d227d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -125,9 +125,6 @@ enum brl_type { #include "libcli/nbt/libnbt.h" #include "libcli/util/proto.h" -/* FIXME: This header should be included by pidl where necessary */ -#include "librpc/ndr/ndr_compression.h" - #undef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2) -- cgit From 3f16241a1d3243447d0244ebac05b447aec94df8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 14 Mar 2006 01:29:56 +0000 Subject: r14363: Remove credentials.h from the global includes. (This used to be commit 98c4c3051391c6f89df5d133665f51bef66b1563) --- source4/include/includes.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 81105d227d..4ff67791f9 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -117,11 +117,8 @@ enum brl_type { #include "libcli/util/nterr.h" #include "libcli/util/doserr.h" #include "librpc/ndr/libndr.h" -#include "librpc/gen_ndr/dcerpc.h" #include "librpc/ndr/ndr_orpc.h" -#include "librpc/gen_ndr/orpc.h" #include "librpc/rpc/dcerpc.h" -#include "auth/credentials/credentials.h" #include "libcli/nbt/libnbt.h" #include "libcli/util/proto.h" -- cgit From e3f2414cf9e582a4e4deecc662b64a7bb2679a34 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 14 Mar 2006 15:03:25 +0000 Subject: r14380: Reduce the size of structs.h (This used to be commit 1a16a6f1dfa66499af43a6b88b3ea69a6a75f1fe) --- source4/include/includes.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 4ff67791f9..1a2ff68359 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -122,11 +122,7 @@ enum brl_type { #include "libcli/nbt/libnbt.h" #include "libcli/util/proto.h" -#undef _PRINTF_ATTRIBUTE -#define _PRINTF_ATTRIBUTE(a1, a2) - /* String routines */ - #include "util/safe_string.h" #if 0 -- cgit From 61933e159cc2a8399f8bb1fa53844a67f8bba55b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 14 Mar 2006 15:22:36 +0000 Subject: r14381: Kill structs.h (This used to be commit 1ffb82a7596f989c90df69573083a2c2e28f8808) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 1a2ff68359..43e07ad482 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -111,7 +111,6 @@ enum brl_type { #include "talloc/talloc.h" #include "core.h" #include "charset/charset.h" -#include "structs.h" #include "util/util.h" #include "param/param.h" #include "libcli/util/nterr.h" -- cgit From e5ea1d369120734f7a5355469e9e767c6e92ff53 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 14 Mar 2006 16:21:34 +0000 Subject: r14384: Remove orpc code from includes.h (This used to be commit 206d182cfb78ec2258ceca1be2dd5e3c06649312) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 43e07ad482..f7504dcf5d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -116,7 +116,6 @@ enum brl_type { #include "libcli/util/nterr.h" #include "libcli/util/doserr.h" #include "librpc/ndr/libndr.h" -#include "librpc/ndr/ndr_orpc.h" #include "librpc/rpc/dcerpc.h" #include "libcli/nbt/libnbt.h" #include "libcli/util/proto.h" -- cgit From 055861925433147a9b0f07f399c4ab345f9bef65 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 15 Mar 2006 02:40:08 +0000 Subject: r14411: mark smb_panic() as a noreturn function using gcc attributes, which tells static analysers that it behaves like abort() (This used to be commit 3cde18beaed736a48e195550c7e423bccc95c820) --- source4/include/includes.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index f7504dcf5d..f4642cecb9 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -56,6 +56,18 @@ #endif #endif +#ifndef NORETURN_ATTRIBUTE +#if (__GNUC__ >= 3) +#define NORETURN_ATTRIBUTE __attribute__ ((noreturn)) +#else +#define NORETURN_ATTRIBUTE +#endif +#endif + +/* mark smb_panic() as noreturn, so static analysers know that it is + used like abort */ +_PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; + #include #include #include -- cgit From 83d8fd3dcfb326354173b585905c4438405d2a74 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 16 Mar 2006 17:51:04 +0000 Subject: r14484: Install more headers (This used to be commit 430c6516d383bfd7f27287394bf8eef9f174b3e6) --- source4/include/includes.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index f4642cecb9..22dc922d1b 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -95,31 +95,10 @@ _PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; #include #endif -/* protocol types. It assumes that higher protocols include lower protocols - as subsets. FIXME: Move to one of the smb-specific headers */ -enum protocol_types { - PROTOCOL_NONE, - PROTOCOL_CORE, - PROTOCOL_COREPLUS, - PROTOCOL_LANMAN1, - PROTOCOL_LANMAN2, - PROTOCOL_NT1, - PROTOCOL_SMB2 -}; - -/* passed to br lock code. FIXME: Move to one of the smb-specific headers */ -enum brl_type { - READ_LOCK, - WRITE_LOCK, - PENDING_READ_LOCK, - PENDING_WRITE_LOCK -}; - #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "lib/replace/replace.h" /* Lists, trees, caching, database... */ -#include "libcli/util/nt_status.h" #include "talloc/talloc.h" #include "core.h" #include "charset/charset.h" -- cgit From 35349a58df5b69446607fbd742a05f57f3515319 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 18 Mar 2006 15:42:57 +0000 Subject: r14542: Remove librpc, libndr and libnbt from includes.h (This used to be commit 51b4270513752d2eafbe77f9de598de16ef84a1f) --- source4/include/includes.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 22dc922d1b..b87e6acff7 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -106,9 +106,9 @@ _PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; #include "param/param.h" #include "libcli/util/nterr.h" #include "libcli/util/doserr.h" -#include "librpc/ndr/libndr.h" -#include "librpc/rpc/dcerpc.h" -#include "libcli/nbt/libnbt.h" +#include "librpc/gen_ndr/misc.h" + +struct smbcli_tree; #include "libcli/util/proto.h" /* String routines */ -- cgit From 935af3eb1963761b4c8fd9e0e9902ad592f948bf Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 25 Mar 2006 18:47:47 +0000 Subject: r14724: Rearrange some source files, install more headers. (This used to be commit 7146c1600f29c349e5bb78f810e7e170b535dd37) --- source4/include/includes.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b87e6acff7..b8aebf2f14 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -104,12 +104,10 @@ _PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; #include "charset/charset.h" #include "util/util.h" #include "param/param.h" -#include "libcli/util/nterr.h" -#include "libcli/util/doserr.h" #include "librpc/gen_ndr/misc.h" struct smbcli_tree; -#include "libcli/util/proto.h" +#include "libcli/util/error.h" /* String routines */ #include "util/safe_string.h" -- cgit From c50125f6ef127db020bc0fcfdca8ed0b24e4f018 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 31 Mar 2006 23:28:18 +0000 Subject: r14844: Support a stdbool.h replacement in lib/replace/ (This used to be commit bccfddcafa1fdb56392e2301bbd404964ad9f7c3) --- source4/include/includes.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b8aebf2f14..a79a48f377 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -74,14 +74,6 @@ _PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; #include #include -#ifdef HAVE_STDINT_H -#include -#endif - -#ifdef HAVE_INTTYPES_H -#include -#endif - #ifdef HAVE_STRING_H #include #endif -- cgit From 4a61e4901ebc751fea57880424f9045e3bdf238e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Apr 2006 16:05:21 +0000 Subject: r14999: Remove more unused autoconf code Simplify va_copy() replacement code a bit (This used to be commit a5c87360a7f14a90b831ea372277f4f89ee4c5f1) --- source4/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index a79a48f377..77f0b02010 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -64,6 +64,8 @@ #endif #endif +#define _GNU_SOURCE /* Use GNU extensions */ + /* mark smb_panic() as noreturn, so static analysers know that it is used like abort */ _PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; -- cgit From 847e80dee9c405f021c67d5ffb09804751ea2be7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Apr 2006 22:50:19 +0000 Subject: r15224: Check whether -MT is actually supported by the compiler before using automatic dependencies (This used to be commit 6598efc6b302984d0b26b0c76a4b7107f5feba21) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 77f0b02010..6252a59c2f 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -45,7 +45,7 @@ #endif #ifndef PRINTF_ATTRIBUTE -#if !defined(NO_PRINTF_ATTRIBUTE) && (__GNUC__ >= 3) +#if __GNUC__ >= 3 /** Use gcc attribute to check printf fns. a1 is the 1-based index of * the parameter containing the format, and a2 the index of the first * argument. Note that some gcc 2.x versions don't handle this -- cgit From b7477fb3881ac4490da040b054094a865128b951 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Sep 2006 00:35:29 +0000 Subject: r18117: first steps in making samba4 use libreplace (This used to be commit c079cedb084d621c5a0aac59310b237ba375df20) --- source4/include/includes.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 6252a59c2f..37661aaaa8 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -22,7 +22,7 @@ */ #ifndef NO_CONFIG_H /* for some tests */ -#include "config.h" +#include "replace.h" #endif #include "local.h" @@ -90,7 +90,6 @@ _PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; #endif #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) -#include "lib/replace/replace.h" /* Lists, trees, caching, database... */ #include "talloc/talloc.h" -- cgit From 3953c21202cb9c947a8e2a508ef26a2245f1f142 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Sep 2006 00:42:19 +0000 Subject: r18118: its the job of libreplace to handle things like this (This used to be commit fa47301c0ea482612f9f452b027aa2787b3f93a7) --- source4/include/includes.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 37661aaaa8..007d130379 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -83,12 +83,6 @@ _PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; #include #include -#ifdef HAVE_STDARG_H -#include -#else -#include -#endif - #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) /* Lists, trees, caching, database... */ -- cgit From a59706f721c70e9a4f78eb2296bb746b912ce9d0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 6 Sep 2006 01:36:02 +0000 Subject: r18121: Simplify m4 code, hopefully fix Samba4 build problems. (This used to be commit 1adf65b4d7c5d2d4f65d4b28575bdf2368a42139) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 007d130379..5eb49b7f75 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -22,7 +22,7 @@ */ #ifndef NO_CONFIG_H /* for some tests */ -#include "replace.h" +#include "lib/replace/replace.h" #endif #include "local.h" -- cgit From f64b2474be0d4f0f5ad20c511400f02b1cb981f0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 9 Sep 2006 01:49:38 +0000 Subject: r18278: move more header checks and _GNU_SOURCE into libreplace (This used to be commit 77c442cd469ba881215e025c87ce632c876eb617) --- source4/include/includes.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 5eb49b7f75..dc7db5d3bb 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -64,24 +64,12 @@ #endif #endif -#define _GNU_SOURCE /* Use GNU extensions */ - /* mark smb_panic() as noreturn, so static analysers know that it is used like abort */ _PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; -#include -#include -#include -#include -#include - -#ifdef HAVE_STRING_H -#include -#endif - -#include -#include +#include "system/time.h" +#include "system/wait.h" #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) -- cgit From a57133c56e9ba5553b6183691e8087a03adb461a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Sep 2006 09:23:05 +0000 Subject: r18447: make sure we bail out if the config.h is not generated by samba's configure. this could happen when you have done a standalone build in lib/replace/, lib/talloc, ... metze (This used to be commit d8e88386748d3952c6a82726c9d36cad870992fd) --- source4/include/includes.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index dc7db5d3bb..5850103145 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -23,8 +23,15 @@ #ifndef NO_CONFIG_H /* for some tests */ #include "lib/replace/replace.h" + +/* make sure we have included the correct config.h */ +#ifndef CONFIG_H_IS_FROM_SAMBA +#warn "make sure you have removed all config.h files from standalone builds!" +#error "the included config.h isn't from samba!" #endif +#endif /* NO_CONFIG_H */ + #include "local.h" #ifdef __GNUC__ -- cgit From c447b8a199cc61221b99f4582d714bac3774ae1b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Sep 2006 09:27:33 +0000 Subject: r18448: this gives nicer output... metze (This used to be commit 6bdb329da5771b4be792d8889d3ece8f93a495b0) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 5850103145..c4ee86b3b9 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -26,7 +26,7 @@ /* make sure we have included the correct config.h */ #ifndef CONFIG_H_IS_FROM_SAMBA -#warn "make sure you have removed all config.h files from standalone builds!" +#error "make sure you have removed all config.h files from standalone builds!" #error "the included config.h isn't from samba!" #endif -- cgit From b6582987fe25ef3d54034f2f27a052664a298f3e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 11 Oct 2006 11:52:49 +0000 Subject: r19242: merge from samba3: handle NO_CONFIG_H in libreplace metze (This used to be commit 909d736a4bf5a7adfcd64eecf6bb2a92211c6f96) --- source4/include/includes.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index c4ee86b3b9..a2c8b3472d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -21,17 +21,16 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef NO_CONFIG_H /* for some tests */ #include "lib/replace/replace.h" /* make sure we have included the correct config.h */ +#ifndef NO_CONFIG_H /* for some tests */ #ifndef CONFIG_H_IS_FROM_SAMBA #error "make sure you have removed all config.h files from standalone builds!" #error "the included config.h isn't from samba!" #endif - #endif /* NO_CONFIG_H */ - + #include "local.h" #ifdef __GNUC__ -- cgit From 253c1bec462de467a923f7a8951598f7abbe163e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Dec 2006 01:51:35 +0000 Subject: r20298: Fix pidl tests (missing symlink..). (This used to be commit ab3d57394630cefc1fefe859c8bd3d56f6e63695) --- source4/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index a2c8b3472d..f1188e2aaf 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -77,7 +77,9 @@ _PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; #include "system/time.h" #include "system/wait.h" +#ifndef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) +#endif /* Lists, trees, caching, database... */ #include "talloc/talloc.h" -- cgit From c2781df0d5477be58c3189c6d3c17b261d7b8b89 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 1 Jun 2007 12:01:53 +0000 Subject: r23289: Provide support for GCC attributes _PURE_, _NONNULL_, _DEPRECATED_, _NORETURN_ and _WARN_UNUSED_RESULT_. (This used to be commit 44248f662f0b609dad6a7b437948f12d661a28f7) --- source4/include/includes.h | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index f1188e2aaf..1022b65545 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -62,17 +62,45 @@ #endif #endif -#ifndef NORETURN_ATTRIBUTE -#if (__GNUC__ >= 3) -#define NORETURN_ATTRIBUTE __attribute__ ((noreturn)) +#ifndef _DEPRECATED_ +#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) +#define _DEPRECATED_ __attribute__ ((deprecated)) #else -#define NORETURN_ATTRIBUTE +#define _DEPRECATED_ #endif #endif -/* mark smb_panic() as noreturn, so static analysers know that it is - used like abort */ -_PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE; +#ifndef _WARN_UNUSED_RESULT_ +#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) +#define _WARN_UNUSED_RESULT_ __attribute__ ((warn_unused_result)) +#else +#define _WARN_UNUSED_RESULT_ +#endif +#endif + +#ifndef _NORETURN_ +#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) +#define _NORETURN_ __attribute__ ((noreturn)) +#else +#define _NORETURN_ +#endif +#endif + +#ifndef _PURE_ +#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1) +#define _PURE_ __attribute__((pure)) +#else +#define _PURE_ +#endif +#endif + +#ifndef NONNULL +#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1) +#define NONNULL(param) param __attribute__((nonnull)) +#else +#define NONNULL(param) param +#endif +#endif #include "system/time.h" #include "system/wait.h" -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/include/includes.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 1022b65545..54f6fe9385 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -8,7 +8,7 @@ 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 + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -17,8 +17,7 @@ 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. + along with this program. If not, see . */ #include "lib/replace/replace.h" -- cgit From 61ffa08f4c95e29d301de9fbabd6e71c2dbc1056 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 27 Aug 2007 18:10:19 +0000 Subject: r24712: No longer expose the 'BOOL' data type in any interfaces. (This used to be commit 1ce32673d960c8b05b6c1b1b99e1976a402417ae) --- source4/include/includes.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 54f6fe9385..ac6204921c 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -111,11 +111,17 @@ /* Lists, trees, caching, database... */ #include "talloc/talloc.h" #include "core.h" +#include #include "charset/charset.h" #include "util/util.h" #include "param/param.h" #include "librpc/gen_ndr/misc.h" +typedef bool BOOL; + +#define False false +#define True true + struct smbcli_tree; #include "libcli/util/error.h" -- cgit From 82037a75eae9deaf6ec80b5ecc3bb89aab6e6dd8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 30 Aug 2007 23:15:12 +0000 Subject: r24814: Fix headers, trim core.h even more. (This used to be commit 9647f860bdd5c0a74583e886182bd041a45e7655) --- source4/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index ac6204921c..d8503fe47a 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -109,7 +109,7 @@ #endif /* Lists, trees, caching, database... */ -#include "talloc/talloc.h" +#include #include "core.h" #include #include "charset/charset.h" -- cgit From 8d182d881d189e9855165b3a423f2d545a97fae8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 31 Aug 2007 00:31:32 +0000 Subject: r24816: Move the rest of the contents of core.h to more appropriate places. include/ now only contains build system related headers, all other headers are now near the source code they're related to. (This used to be commit 6890a01dbfc6d8041a88ef5c6be52dfcd046fe80) --- source4/include/includes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index d8503fe47a..40cb306eb2 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -109,9 +109,10 @@ #endif /* Lists, trees, caching, database... */ -#include -#include "core.h" +#include #include +#include +#include "libcli/util/nt_status.h" #include "charset/charset.h" #include "util/util.h" #include "param/param.h" -- cgit From ffeee68e4b72dd94fee57366bd8d38b8c284c3d4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Sep 2007 12:42:09 +0000 Subject: r25026: Move param/param.h out of includes.h (This used to be commit abe8349f9b4387961ff3665d8c589d61cd2edf31) --- source4/include/includes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 40cb306eb2..340d0c360f 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -115,7 +115,6 @@ #include "libcli/util/nt_status.h" #include "charset/charset.h" #include "util/util.h" -#include "param/param.h" #include "librpc/gen_ndr/misc.h" typedef bool BOOL; -- cgit From 6a167124cdad339814ec6499aab30094e8cc43a6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 21 Sep 2007 00:09:13 +0000 Subject: r25265: Move attribute definitions to lib/util. (This used to be commit 5bb9f041f47a1b7e03c3dc02e38546bc43bcc856) --- source4/include/includes.h | 57 ---------------------------------------------- 1 file changed, 57 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 340d0c360f..b93a3faf29 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -32,23 +32,6 @@ #include "local.h" -#ifdef __GNUC__ -/** gcc attribute used on function parameters so that it does not emit - * warnings about them being unused. **/ -# define UNUSED(param) param __attribute__ ((unused)) -#else -# define UNUSED(param) param -/** Feel free to add definitions for other compilers here. */ -#endif - -#ifndef _PUBLIC_ -#ifdef HAVE_VISIBILITY_ATTR -# define _PUBLIC_ __attribute__((visibility("default"))) -#else -# define _PUBLIC_ -#endif -#endif - #ifndef PRINTF_ATTRIBUTE #if __GNUC__ >= 3 /** Use gcc attribute to check printf fns. a1 is the 1-based index of @@ -61,46 +44,6 @@ #endif #endif -#ifndef _DEPRECATED_ -#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) -#define _DEPRECATED_ __attribute__ ((deprecated)) -#else -#define _DEPRECATED_ -#endif -#endif - -#ifndef _WARN_UNUSED_RESULT_ -#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) -#define _WARN_UNUSED_RESULT_ __attribute__ ((warn_unused_result)) -#else -#define _WARN_UNUSED_RESULT_ -#endif -#endif - -#ifndef _NORETURN_ -#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) -#define _NORETURN_ __attribute__ ((noreturn)) -#else -#define _NORETURN_ -#endif -#endif - -#ifndef _PURE_ -#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1) -#define _PURE_ __attribute__((pure)) -#else -#define _PURE_ -#endif -#endif - -#ifndef NONNULL -#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1) -#define NONNULL(param) param __attribute__((nonnull)) -#else -#define NONNULL(param) param -#endif -#endif - #include "system/time.h" #include "system/wait.h" -- cgit From f415ba5bcfdbf22571526ce4e5e103d1eebab5c5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 21 Sep 2007 02:00:50 +0000 Subject: r25267: Move PRINTF_ATTRIBUTE to lib/util as well. (This used to be commit 72b9d6c03661d72e83a5d60d43b75bb9bd5f5285) --- source4/include/includes.h | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index b93a3faf29..d78f297aa6 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -32,30 +32,17 @@ #include "local.h" -#ifndef PRINTF_ATTRIBUTE -#if __GNUC__ >= 3 -/** Use gcc attribute to check printf fns. a1 is the 1-based index of - * the parameter containing the format, and a2 the index of the first - * argument. Note that some gcc 2.x versions don't handle this - * properly **/ -#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) -#else -#define PRINTF_ATTRIBUTE(a1, a2) -#endif -#endif - #include "system/time.h" #include "system/wait.h" -#ifndef _PRINTF_ATTRIBUTE -#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) -#endif - /* Lists, trees, caching, database... */ #include #include #include #include "libcli/util/nt_status.h" +#ifndef _PRINTF_ATTRIBUTE +#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) +#endif #include "charset/charset.h" #include "util/util.h" #include "librpc/gen_ndr/misc.h" -- cgit From 9b009c900987517359485799be8be4167494b376 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 23 Sep 2007 21:35:03 +0000 Subject: r25301: Merge my includes.h cleanups. (This used to be commit 37425495f392a2d0122a93aa2c42758eab7dab5a) --- source4/include/includes.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index d78f297aa6..93527b564b 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -39,20 +39,16 @@ #include #include #include -#include "libcli/util/nt_status.h" #ifndef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #endif -#include "charset/charset.h" #include "util/util.h" -#include "librpc/gen_ndr/misc.h" typedef bool BOOL; #define False false #define True true -struct smbcli_tree; #include "libcli/util/error.h" /* String routines */ -- cgit From da6d24c459e73d5052f7415082031d11535c4319 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 6 Oct 2007 22:42:39 +0000 Subject: r25555: Remove support for BOOL, True and False. (This used to be commit 18a2bcfa9e7d4718648f401821259d1dbf5a3ff4) --- source4/include/includes.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 93527b564b..1a92e46657 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -44,11 +44,6 @@ #endif #include "util/util.h" -typedef bool BOOL; - -#define False false -#define True true - #include "libcli/util/error.h" /* String routines */ -- cgit From 310875e637fd237752770027b28675ed970352dd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 17 Jun 2008 13:11:29 +1000 Subject: Change our module code to not use the special symbol name init_module() Current glibc libraries include a function called init_module(). If we use the same name, then a dlsym() can find the glibc function if the module doesn't have an initialisation function. In ldb, none of our modules have an init_module(), so we end up calling the libc functions with bogus arguments. (This used to be commit 1b0621068998590e7b1e9528b78744dcd2cd5909) --- source4/include/includes.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 1a92e46657..df0d8f7713 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -54,4 +54,10 @@ #define TALLOC_ABORT(reason) smb_panic(reason) #endif +/* this needs to be a string which is not in the C library. We + previously used "init_module", but that meant that modules which + did not define this function ended up calling the C library + function init_module() which makes a system call */ +#define SAMBA_INIT_MODULE "samba_init_module" + #endif /* _INCLUDES_H */ -- cgit