Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/include/includes.h

    r414 r745  
    2323#include "../replace/replace.h"
    2424
     25#if _SAMBA_BUILD_ == 4
     26# undef _SAMBA_BUILD_
     27# define _SAMBA_BUILD_ 3
     28#endif
     29
    2530/* make sure we have included the correct config.h */
    2631#ifndef NO_CONFIG_H /* for some tests */
     
    3540   still have comflicts with their header files (e.g. IRIX 6.4) */
    3641
    37 #if !defined(__cplusplus) && defined(DEVELOPER)
     42#if !defined(__cplusplus) && defined(DEVELOPER) && defined(__linux__)
    3843#define class #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
    3944#define private #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
     
    4954#include "local.h"
    5055
    51 #ifdef AIX
    52 #define DEFAULT_PRINTING PRINT_AIX
    53 #define PRINTCAP_NAME "/etc/qconfig"
    54 #endif
    55 
    56 #ifdef HPUX
    57 #define DEFAULT_PRINTING PRINT_HPUX
    58 #endif
    59 
    60 #ifdef QNX
    61 #define DEFAULT_PRINTING PRINT_QNX
    62 #endif
    63 
    6456#ifdef SUNOS4
    6557/* on SUNOS4 termios.h conflicts with sys/ioctl.h */
     
    7769#endif /* RELIANTUNIX */
    7870
    79 #include "system/capability.h"
    8071#include "system/dir.h"
    81 #include "system/filesys.h"
    82 #include "system/glob.h"
    83 #include "system/iconv.h"
    8472#include "system/locale.h"
    85 #include "system/network.h"
    86 #include "system/passwd.h"
    87 #include "system/readline.h"
    88 #include "system/select.h"
    89 #include "system/shmem.h"
    90 #include "system/syslog.h"
    91 #include "system/terminal.h"
    9273#include "system/time.h"
    9374#include "system/wait.h"
     
    146127#endif
    147128
    148 #if HAVE_LBER_H
    149 #include <lber.h>
    150 #if defined(HPUX) && !defined(_LBER_TYPES_H)
    151 /* Define ber_tag_t and ber_int_t for using
    152  * HP LDAP-UX Integration products' LDAP libraries.
    153 */
    154 #ifndef ber_tag_t
    155 typedef unsigned long ber_tag_t;
    156 typedef int ber_int_t;
    157 #endif
    158 #endif /* defined(HPUX) && !defined(_LBER_TYPES_H) */
    159 #ifndef LBER_USE_DER
    160 #define LBER_USE_DER 0x01
    161 #endif
    162 #endif
    163 
    164 #if HAVE_LDAP_H
    165 #include <ldap.h>
    166 #ifndef LDAP_CONST
    167 #define LDAP_CONST const
    168 #endif
    169 #ifndef LDAP_OPT_SUCCESS
    170 #define LDAP_OPT_SUCCESS 0
    171 #endif
    172 /* Solaris 8 and maybe other LDAP implementations spell this "..._INPROGRESS": */
    173 #if defined(LDAP_SASL_BIND_INPROGRESS) && !defined(LDAP_SASL_BIND_IN_PROGRESS)
    174 #define LDAP_SASL_BIND_IN_PROGRESS LDAP_SASL_BIND_INPROGRESS
    175 #endif
    176 /* Solaris 8 defines SSL_LDAP_PORT, not LDAPS_PORT and it only does so if
    177    LDAP_SSL is defined - but SSL is not working. We just want the
    178    port number! Let's just define LDAPS_PORT correct. */
    179 #if !defined(LDAPS_PORT)
    180 #define LDAPS_PORT 636
    181 #endif
    182 #else
     129#ifndef HAVE_LDAP_H
    183130#undef HAVE_LDAP
    184 #endif
    185 
    186 #if HAVE_GSSAPI_GSSAPI_H
    187 #include <gssapi/gssapi.h>
    188 #elif HAVE_GSSAPI_GSSAPI_GENERIC_H
    189 #include <gssapi/gssapi_generic.h>
    190 #elif HAVE_GSSAPI_H
    191 #include <gssapi.h>
    192 #endif
    193 
    194 #if HAVE_COM_ERR_H
    195 #include <com_err.h>
    196131#endif
    197132
     
    237172#if defined(HAVE_AIO_H) && defined(WITH_AIO)
    238173#include <aio.h>
    239 #endif
    240 
    241 #ifdef WITH_MADVISE_PROTECTED
    242 #include <sys/mman.h>
    243174#endif
    244175
     
    252183#endif
    253184
    254 /* If we have --enable-developer and the valgrind header is present,
    255  * then we're OK to use it.  Set a macro so this logic can be done only
    256  * once. */
    257 #if defined(DEVELOPER)
    258 #if (HAVE_VALGRIND_H || HAVE_VALGRIND_VALGRIND_H)
    259 #define VALGRIND
    260 #endif
    261 #endif
    262 
    263 
    264185/* we support ADS if we want it and have krb5 and ldap libs */
    265186#if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP)
     
    384305
    385306#ifdef LARGE_SMB_INO_T
    386 #define SINO_T_VAL(p, ofs, v) (SIVAL((p),(ofs),(v)&0xFFFFFFFF), SIVAL((p),(ofs)+4,(v)>>32))
    387 #define INO_T_VAL(p, ofs) ((SMB_INO_T)(((uint64_t)(IVAL(p,ofs)))| (((uint64_t)(IVAL(p,(ofs)+4))) << 32)))
     307#define SINO_T_VAL(p, ofs, v) SBVAL(p, ofs, v)
     308#define INO_T_VAL(p, ofs) ((SMB_INO_T)BVAL(p, ofs))
    388309#else
    389 #define SINO_T_VAL(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0))
     310#define SINO_T_VAL(p, ofs, v) SBVAL(p, ofs, ((uint64_t)(v)) & UINT32_MAX)
    390311#define INO_T_VAL(p, ofs) ((SMB_INO_T)(IVAL((p),(ofs))))
    391312#endif
     
    399320#endif
    400321
    401 #define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32))
    402 #define BIG_UINT(p, ofs) ((((uint64_t) IVAL(p,(ofs)+4))<<32)|IVAL(p,ofs))
    403 #define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((uint64_t)(IVAL((buf),(off)))) & ((uint64_t)0xFFFFFFFF)) | \
    404                 (( ((uint64_t)(IVAL((buf),(off+4)))) & ((uint64_t)0xFFFFFFFF) ) << 32 ) )
    405 
     322/* TODO: remove this macros */
     323#define SBIG_UINT(p, ofs, v) SBVAL(p, ofs, v)
     324#define BIG_UINT(p, ofs) BVAL(p, ofs)
     325#define IVAL2_TO_SMB_BIG_UINT(p, ofs) BVAL(p, ofs)
    406326
    407327/* this should really be a 64 bit type if possible */
     
    553473#endif
    554474
    555 #ifndef HAVE_STRUCT_TIMESPEC
    556 struct timespec {
    557         time_t tv_sec;            /* Seconds.  */
    558         long tv_nsec;           /* Nanoseconds.  */
    559 };
    560 #endif
    561 
    562475enum timestamp_set_resolution {
    563476        TIMESTAMP_SET_SECONDS = 0,
     
    565478        TIMESTAMP_SET_NT_OR_BETTER
    566479};
    567 
    568 #ifdef HAVE_BROKEN_GETGROUPS
    569 #define GID_T int
    570 #else
    571 #define GID_T gid_t
    572 #endif
    573 
    574 #ifndef NGROUPS_MAX
    575 #define NGROUPS_MAX 32 /* Guess... */
    576 #endif
    577480
    578481/* Our own fstrings */
     
    600503#endif
    601504
    602 /* Samba 3 doesn't use iconv_convenience: */
    603 extern void *cmdline_lp_ctx;
    604 struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
    605 
    606505/* Lists, trees, caching, database... */
    607506#include "../lib/util/util.h"
     
    610509#include "../lib/util/memory.h"
    611510#include "../lib/util/attr.h"
    612 #include "intl.h"
     511#include "../lib/util/tsort.h"
    613512#include "../lib/util/dlinklist.h"
    614 #include "tdb.h"
    615 #include "util_tdb.h"
    616 
    617 #include "talloc.h"
     513
     514#include <talloc.h>
    618515
    619516#include "event.h"
    620 #include "../lib/util/tevent_unix.h"
    621 #include "../lib/util/tevent_ntstatus.h"
    622 #include "../lib/tsocket/tsocket.h"
    623517
    624518#include "../lib/util/data_blob.h"
    625519#include "../lib/util/time.h"
    626 #include "../lib/util/asn1.h"
    627 
    628 #include "ads.h"
    629 #include "ads_dns.h"
    630 #include "interfaces.h"
    631 #include "trans2.h"
     520#include "../lib/util/debug.h"
     521#include "../lib/util/debug_s3.h"
     522
     523#include "../libcli/util/ntstatus.h"
    632524#include "../libcli/util/error.h"
    633 #include "ntioctl.h"
    634525#include "../lib/util/charset/charset.h"
    635526#include "dynconfig.h"
    636 #include "util_getent.h"
    637 #include "debugparse.h"
    638 #include "privileges.h"
    639 #include "messages.h"
    640527#include "locking.h"
    641528#include "smb_perfcount.h"
    642 #include "smb_signing.h"
    643529#include "smb.h"
    644 #include "nameserv.h"
    645 #include "secrets.h"
    646530#include "../lib/util/byteorder.h"
    647 #include "privileges.h"
    648 #include "rpc_misc.h"
    649 #include "rpc_dce.h"
    650 #include "../librpc/gen_ndr/schannel.h"
    651 #include "mapping.h"
    652 #include "passdb.h"
    653 #include "rpc_secdes.h"
    654 #include "../libgpo/gpo.h"
    655 #include "msdfs.h"
    656 #include "rap.h"
    657 #include "../lib/crypto/md5.h"
    658 #include "../lib/crypto/md4.h"
    659 #include "../lib/crypto/arcfour.h"
    660 #include "../lib/crypto/crc32.h"
    661 #include "../lib/crypto/hmacmd5.h"
    662 #include "ntlmssp.h"
    663 #include "auth.h"
    664 #include "ntdomain.h"
    665 #include "reg_objects.h"
    666 #include "reg_db.h"
    667 #include "librpc/gen_ndr/perfcount.h"
    668 #include "librpc/gen_ndr/notify.h"
    669 #include "librpc/gen_ndr/xattr.h"
    670 #include "librpc/gen_ndr/messaging.h"
    671 #include "librpc/gen_ndr/ndr_nbt.h"
    672 #include "librpc/rpc/dcerpc.h"
    673 #include "nt_printing.h"
    674 #include "idmap.h"
    675 #include "client.h"
    676 
    677 #include "session.h"
    678 #include "popt.h"
    679 #include "mangle.h"
     531
    680532#include "module.h"
    681 #include "nsswitch/winbind_client.h"
    682 #include "dbwrap.h"
    683 #include "packet.h"
    684 #include "ctdbd_conn.h"
    685533#include "../lib/util/talloc_stack.h"
    686 #include "memcache.h"
    687 #include "async_smb.h"
    688 #include "../lib/async_req/async_sock.h"
    689 #include "talloc_dict.h"
    690 #include "services.h"
    691 #include "eventlog.h"
    692534#include "../lib/util/smb_threads.h"
    693535#include "../lib/util/smb_threads_internal.h"
    694 #include "tldap.h"
    695 #include "tldap_util.h"
    696 
    697 #include "lib/smbconf/smbconf.h"
    698 #include "lib/smbconf/smbconf_init.h"
    699 #include "lib/smbconf/smbconf_reg.h"
    700 #include "lib/smbconf/smbconf_txt.h"
    701 
    702 /* Defines for wisXXX functions. */
    703 #define UNI_UPPER    0x1
    704 #define UNI_LOWER    0x2
    705 #define UNI_DIGIT    0x4
    706 #define UNI_XDIGIT   0x8
    707 #define UNI_SPACE    0x10
    708 
    709 #include "nsswitch/winbind_nss.h"
    710 
    711 /* forward declaration from printing.h to get around
    712    header file dependencies */
    713 
    714 struct printjob;
    715 
    716 /* forward declarations from smbldap.c */
    717 
    718 #include "smbldap.h"
    719 
    720 /*
    721  * Reasons for cache flush.
    722  */
    723 
    724 enum flush_reason_enum {
    725     SEEK_FLUSH,
    726     READ_FLUSH,
    727     WRITE_FLUSH,
    728     READRAW_FLUSH,
    729     OPLOCK_RELEASE_FLUSH,
    730     CLOSE_FLUSH,
    731     SYNC_FLUSH,
    732     SIZECHANGE_FLUSH,
    733     /* NUM_FLUSH_REASONS must remain the last value in the enumeration. */
    734     NUM_FLUSH_REASONS};
    735 
    736 #include "nss_info.h"
    737 #include "modules/nfs4_acls.h"
    738 #include "nsswitch/libwbclient/wbclient.h"
    739536
    740537/***** prototypes *****/
     
    742539#include "proto.h"
    743540#endif
    744 #include "libcli/security/secace.h"
    745 #include "libcli/security/secacl.h"
    746 #include "libcli/security/security_descriptor.h"
    747 
    748 #if defined(HAVE_POSIX_ACLS)
    749 #include "modules/vfs_posixacl.h"
    750 #endif
    751 
    752 #if defined(HAVE_TRU64_ACLS)
    753 #include "modules/vfs_tru64acl.h"
    754 #endif
    755 
    756 #if defined(HAVE_SOLARIS_ACLS) || defined(HAVE_UNIXWARE_ACLS)
    757 #include "modules/vfs_solarisacl.h"
    758 #endif
    759 
    760 #if defined(HAVE_HPUX_ACLS)
    761 #include "modules/vfs_hpuxacl.h"
    762 #endif
    763 
    764 #if defined(HAVE_IRIX_ACLS)
    765 #include "modules/vfs_irixacl.h"
    766 #endif
    767 
    768 #ifdef HAVE_LDAP
    769 #include "ads_protos.h"
    770 #endif
    771 
    772 /* We need this after proto.h to reference GetTimeOfDay(). */
    773 #include "smbprofile.h"
    774541
    775542/* String routines */
     
    778545#include "safe_string.h"
    779546
    780 /* prototypes from lib/util_transfer_file.c */
    781 #include "transfer_file.h"
    782 
    783 #ifndef DEFAULT_PRINTING
    784 #ifdef HAVE_CUPS
    785 #define DEFAULT_PRINTING PRINT_CUPS
    786 #define PRINTCAP_NAME "cups"
    787 #elif defined(SYSV)
    788 #define DEFAULT_PRINTING PRINT_SYSV
    789 #define PRINTCAP_NAME "lpstat"
    790 #else
    791 #define DEFAULT_PRINTING PRINT_BSD
    792 #define PRINTCAP_NAME "/etc/printcap"
    793 #endif
    794 #endif
    795 
    796 #ifndef PRINTCAP_NAME
    797 #define PRINTCAP_NAME "/etc/printcap"
    798 #endif
    799 
    800547#ifndef SIGCLD
    801548#define SIGCLD SIGCHLD
     
    806553#endif
    807554
    808 #ifndef MAP_FILE
    809 #define MAP_FILE 0
    810 #endif
    811 
    812555#if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS)
    813556#define OSF1_ENH_SEC 1
    814 #endif
    815 
    816 #ifndef ALLOW_CHANGE_PASSWORD
    817 #if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
    818 #define ALLOW_CHANGE_PASSWORD 1
    819 #endif
    820 #endif
    821 
    822 /* what is the longest significant password available on your system?
    823  Knowing this speeds up password searches a lot */
    824 #ifndef PASSWORD_LENGTH
    825 #define PASSWORD_LENGTH 8
    826 #endif
    827 
    828 #ifndef HAVE_PIPE
    829 #define SYNC_DNS 1
    830557#endif
    831558
     
    851578#endif
    852579
    853 
    854 #if HAVE_KERNEL_SHARE_MODES
    855 #ifndef LOCK_MAND
    856 #define LOCK_MAND       32      /* This is a mandatory flock */
    857 #define LOCK_READ       64      /* ... Which allows concurrent read operations */
    858 #define LOCK_WRITE      128     /* ... Which allows concurrent write operations */
    859 #define LOCK_RW         192     /* ... Which allows concurrent read & write ops */
    860 #endif
    861 #endif
    862 
    863 extern int DEBUGLEVEL;
    864580
    865581#define MAX_SEC_CTX_DEPTH 8    /* Maximum number of security contexts */
     
    879595
    880596
    881 /* needed for some systems without iconv. Doesn't really matter
    882    what error code we use */
    883 #ifndef EILSEQ
    884 #define EILSEQ EIO
    885 #endif
    886 
    887597/* add varargs prototypes with printf checking */
    888598/*PRINTFLIKE2 */
     
    922632#endif
    923633
    924 #ifdef HAVE_LDAP
    925 
    926 /* function declarations not included in proto.h */
    927 LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);
    928 
    929 #endif  /* HAVE_LDAP */
    930 
    931 #if defined(HAVE_LINUX_READAHEAD) && ! defined(HAVE_READAHEAD_DECL)
    932 ssize_t readahead(int fd, off64_t offset, size_t count);
    933 #endif
    934 
    935634#ifdef TRUE
    936635#undef TRUE
     
    960659void exit_server_fault(void) _NORETURN_;
    961660
    962 #ifdef HAVE_LIBNSCD
    963 #include "libnscd.h"
    964 #endif
    965 
    966 #if defined(HAVE_IPV6)
    967 void in6_addr_to_sockaddr_storage(struct sockaddr_storage *ss,
    968                                   struct in6_addr ip);
    969 #endif
    970 
    971661/* samba3 doesn't use uwrap yet */
    972662#define uwrap_enabled() 0
    973663
     664#define BASE_RID (0x000003E8L)
     665
    974666#endif /* _INCLUDES_H */
Note: See TracChangeset for help on using the changeset viewer.