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.
155
typedef unsigned long ber_tag_t;
156
typedef int ber_int_t;
158
#endif /* defined(HPUX) && !defined(_LBER_TYPES_H) */
160
#define LBER_USE_DER 0x01
167
#define LDAP_CONST const
169
#ifndef LDAP_OPT_SUCCESS
170
#define LDAP_OPT_SUCCESS 0
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
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
186
#if HAVE_GSSAPI_GSSAPI_H
187
#include <gssapi/gssapi.h>
188
#elif HAVE_GSSAPI_GSSAPI_GENERIC_H
189
#include <gssapi/gssapi_generic.h>
198
133
#if HAVE_SYS_ATTRIBUTES_H
199
134
#include <sys/attributes.h>
385
306
#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))
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)
390
311
#define INO_T_VAL(p, ofs) ((SMB_INO_T)(IVAL((p),(ofs))))
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 ) )
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)
407
327
/* this should really be a 64 bit type if possible */
408
328
typedef uint64_t br_off;
599
502
typedef char fstring[FSTRING_LEN];
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);
606
505
/* Lists, trees, caching, database... */
607
506
#include "../lib/util/util.h"
608
507
#include "../lib/util/util_net.h"
609
508
#include "../lib/util/xfile.h"
610
509
#include "../lib/util/memory.h"
611
510
#include "../lib/util/attr.h"
511
#include "../lib/util/tsort.h"
613
512
#include "../lib/util/dlinklist.h"
615
#include "util_tdb.h"
619
516
#include "event.h"
620
#include "../lib/util/tevent_unix.h"
621
#include "../lib/util/tevent_ntstatus.h"
622
#include "../lib/tsocket/tsocket.h"
624
518
#include "../lib/util/data_blob.h"
625
519
#include "../lib/util/time.h"
626
#include "../lib/util/asn1.h"
520
#include "../lib/util/debug.h"
521
#include "../lib/util/debug_s3.h"
630
#include "interfaces.h"
523
#include "../libcli/util/ntstatus.h"
632
524
#include "../libcli/util/error.h"
634
525
#include "../lib/util/charset/charset.h"
635
526
#include "dynconfig.h"
636
#include "util_getent.h"
637
#include "debugparse.h"
638
#include "privileges.h"
639
#include "messages.h"
640
527
#include "locking.h"
641
528
#include "smb_perfcount.h"
642
#include "smb_signing.h"
644
#include "nameserv.h"
646
530
#include "../lib/util/byteorder.h"
647
#include "privileges.h"
648
#include "rpc_misc.h"
650
#include "../librpc/gen_ndr/schannel.h"
653
#include "rpc_secdes.h"
654
#include "../libgpo/gpo.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"
664
#include "ntdomain.h"
665
#include "reg_objects.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"
680
532
#include "module.h"
681
#include "nsswitch/winbind_client.h"
684
#include "ctdbd_conn.h"
685
533
#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"
692
534
#include "../lib/util/smb_threads.h"
693
535
#include "../lib/util/smb_threads_internal.h"
695
#include "tldap_util.h"
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"
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
709
#include "nsswitch/winbind_nss.h"
711
/* forward declaration from printing.h to get around
712
header file dependencies */
716
/* forward declarations from smbldap.c */
721
* Reasons for cache flush.
724
enum flush_reason_enum {
729
OPLOCK_RELEASE_FLUSH,
733
/* NUM_FLUSH_REASONS must remain the last value in the enumeration. */
736
#include "nss_info.h"
737
#include "modules/nfs4_acls.h"
738
#include "nsswitch/libwbclient/wbclient.h"
740
537
/***** prototypes *****/
741
538
#ifndef NO_PROTO_H
742
539
#include "proto.h"
744
#include "libcli/security/secace.h"
745
#include "libcli/security/secacl.h"
746
#include "libcli/security/security_descriptor.h"
748
#if defined(HAVE_POSIX_ACLS)
749
#include "modules/vfs_posixacl.h"
752
#if defined(HAVE_TRU64_ACLS)
753
#include "modules/vfs_tru64acl.h"
756
#if defined(HAVE_SOLARIS_ACLS) || defined(HAVE_UNIXWARE_ACLS)
757
#include "modules/vfs_solarisacl.h"
760
#if defined(HAVE_HPUX_ACLS)
761
#include "modules/vfs_hpuxacl.h"
764
#if defined(HAVE_IRIX_ACLS)
765
#include "modules/vfs_irixacl.h"
769
#include "ads_protos.h"
772
/* We need this after proto.h to reference GetTimeOfDay(). */
773
#include "smbprofile.h"
775
542
/* String routines */
777
544
#include "srvstr.h"
778
545
#include "safe_string.h"
780
/* prototypes from lib/util_transfer_file.c */
781
#include "transfer_file.h"
783
#ifndef DEFAULT_PRINTING
785
#define DEFAULT_PRINTING PRINT_CUPS
786
#define PRINTCAP_NAME "cups"
788
#define DEFAULT_PRINTING PRINT_SYSV
789
#define PRINTCAP_NAME "lpstat"
791
#define DEFAULT_PRINTING PRINT_BSD
792
#define PRINTCAP_NAME "/etc/printcap"
796
#ifndef PRINTCAP_NAME
797
#define PRINTCAP_NAME "/etc/printcap"
801
548
#define SIGCLD SIGCHLD