prefer gssapi header files from subdirectory
[samba.git] / source / include / includes.h
index b9e77010de0146e70311edb3b347885348748ba6..ccdb8868db8c6d4bf888b4a83dc4e3a0bc118b2c 100644 (file)
 #include "system/locale.h"
 #include "system/network.h"
 #include "system/passwd.h"
-#include "system/printing.h"
 #include "system/readline.h"
 #include "system/select.h"
 #include "system/shmem.h"
@@ -208,12 +207,12 @@ typedef int ber_int_t;
 #undef HAVE_LDAP
 #endif
 
-#if HAVE_GSSAPI_H
-#include <gssapi.h>
-#elif HAVE_GSSAPI_GSSAPI_H
+#if HAVE_GSSAPI_GSSAPI_H
 #include <gssapi/gssapi.h>
 #elif HAVE_GSSAPI_GSSAPI_GENERIC_H
 #include <gssapi/gssapi_generic.h>
+#elif HAVE_GSSAPI_H
+#include <gssapi.h>
 #endif
 
 #if HAVE_COM_ERR_H
@@ -251,6 +250,10 @@ typedef int ber_int_t;
 #include <langinfo.h>
 #endif
 
+#if HAVE_NETGROUP_H
+#include <netgroup.h>
+#endif
+
 #if defined(HAVE_AIO_H) && defined(WITH_AIO)
 #include <aio.h>
 #endif
@@ -618,8 +621,29 @@ struct timespec {
 #define NGROUPS_MAX 32 /* Guess... */
 #endif
 
-/* Our own pstrings and fstrings */
-#include "pstring.h"
+/* Our own fstrings */
+
+/*
+                  --------------
+                 /              \
+                /      REST      \
+               /        IN        \
+              /       PEACE        \
+             /                      \
+             | The infamous pstring |
+             |                      |
+             |                      |
+             |      7 December      |
+             |                      |
+             |         2007         |
+            *|     *  *  *          | *
+   _________)/\\_//(\/(/\)/\//\/\///|_)_______
+*/
+
+#ifndef FSTRING_LEN
+#define FSTRING_LEN 256
+typedef char fstring[FSTRING_LEN];
+#endif
 
 /* Lists, trees, caching, database... */
 #include "xfile.h"
@@ -649,7 +673,6 @@ struct timespec {
 #include "messages.h"
 #include "locking.h"
 #include "smb.h"
-#include "ads_cldap.h"
 #include "nameserv.h"
 #include "secrets.h"
 #include "byteorder.h"
@@ -671,17 +694,14 @@ struct timespec {
 #include "rpc_svcctl.h"
 #include "rpc_ntsvcs.h"
 #include "rpc_lsa.h"
-#include "rpc_netlogon.h"
 #include "reg_objects.h"
 #include "reg_db.h"
-#include "rpc_samr.h"
-#include "rpc_srvsvc.h"
 #include "rpc_spoolss.h"
 #include "rpc_eventlog.h"
-#include "rpc_ds.h"
 #include "rpc_perfcount.h"
 #include "rpc_perfcount_defs.h"
 #include "librpc/gen_ndr/notify.h"
+#include "librpc/gen_ndr/xattr.h"
 #include "nt_printing.h"
 #include "idmap.h"
 #include "client.h"
@@ -699,29 +719,11 @@ struct timespec {
 #include "packet.h"
 #include "ctdbd_conn.h"
 #include "talloc_stack.h"
+#include "memcache.h"
+#include "async_req.h"
+#include "async_smb.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;
+#include "lib/smbconf/smbconf.h"
 
 /* used in net.c */
 struct functable {
@@ -755,6 +757,20 @@ struct printjob;
 
 #include "smb_ldap.h"
 
+struct dns_reg_state;
+
+void dns_register_smbd(struct dns_reg_state ** dns_state_ptr,
+               unsigned port,
+               int *maxfd,
+               fd_set *listen_set,
+               struct timeval *timeout);
+
+void dns_register_close(struct dns_reg_state ** dns_state_ptr);
+
+
+bool dns_register_smbd_reply(struct dns_reg_state *dns_state,
+               fd_set *lfds, struct timeval *timeout);
+
 /*
  * Reasons for cache flush.
  */
@@ -772,6 +788,8 @@ enum flush_reason_enum {
     NUM_FLUSH_REASONS};
 
 #include "nss_info.h"
+#include "modules/nfs4_acls.h"
+#include "nsswitch/libwbclient/wbclient.h"
 
 /* generated rpc server implementation functions */
 #include "librpc/gen_ndr/srv_echo.h"
@@ -798,6 +816,9 @@ enum flush_reason_enum {
 #include "srvstr.h"
 #include "safe_string.h"
 
+/* prototypes from lib/util_transfer_file.c */
+#include "transfer_file.h"
+
 #ifdef __COMPAR_FN_T
 #define QSORT_CAST (__compar_fn_t)
 #endif
@@ -892,7 +913,7 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
  * defined.
  */
 #ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 254
+#define MAXHOSTNAMELEN 255
 #endif
 
 /* yuck, I'd like a better way of doing this */
@@ -1057,8 +1078,6 @@ int d_fprintf(FILE *f, const char *, ...) PRINTF_ATTRIBUTE(2,3);
 /* PRINTFLIKE2 */
 void sys_adminlog(int priority, const char *format_str, ...) PRINTF_ATTRIBUTE(2,3);
 
-/* PRINTFLIKE2 */
-int pstr_sprintf(pstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 /* PRINTFLIKE2 */
 int fstr_sprintf(fstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
@@ -1066,6 +1085,9 @@ 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);
 
+int asprintf_strupper_m(char **strp, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
+char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
+
 /* we used to use these fns, but now we have good replacements
    for snprintf and vsnprintf */
 #define slprintf snprintf
@@ -1090,6 +1112,14 @@ int smb_xvasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE(
 #define VXFS_QUOTA
 #endif
 
+#ifndef XATTR_CREATE
+#define XATTR_CREATE  0x1       /* set value, fail if attr already exists */
+#endif
+
+#ifndef XATTR_REPLACE
+#define XATTR_REPLACE 0x2       /* set value, fail if attr does not exist */
+#endif
+
 #if defined(HAVE_KRB5)
 
 krb5_error_code smb_krb5_parse_name(krb5_context context,
@@ -1141,15 +1171,15 @@ bool kerberos_compatible_enctypes(krb5_context context, krb5_enctype enctype1, k
 void kerberos_free_data_contents(krb5_context context, krb5_data *pdata);
 NTSTATUS decode_pac_data(TALLOC_CTX *mem_ctx,
                         DATA_BLOB *pac_data_blob,
-                        krb5_context context, 
+                        krb5_context context,
                         krb5_keyblock *service_keyblock,
                         krb5_const_principal client_principal,
                         time_t tgs_authtime,
-                        PAC_DATA **pac_data);
+                        struct PAC_DATA **pac_data_out);
 void smb_krb5_checksum_from_pac_sig(krb5_checksum *cksum, 
-                                   PAC_SIGNATURE_DATA *sig);
+                                   struct PAC_SIGNATURE_DATA *sig);
 krb5_error_code smb_krb5_verify_checksum(krb5_context context,
-                                        krb5_keyblock *keyblock,
+                                        const krb5_keyblock *keyblock,
                                         krb5_keyusage usage,
                                         krb5_checksum *cksum,
                                         uint8 *data,
@@ -1177,7 +1207,6 @@ bool smb_krb5_principal_compare_any_realm(krb5_context context,
                                          krb5_const_principal princ2);
 int cli_krb5_get_ticket(const char *principal, time_t time_offset, 
                        DATA_BLOB *ticket, DATA_BLOB *session_key_krb5, uint32 extra_ap_opts, const char *ccname, time_t *tgs_expire);
-PAC_LOGON_INFO *get_logon_info_from_pac(PAC_DATA *pac_data);
 krb5_error_code smb_krb5_renew_ticket(const char *ccache_string, const char *client_string, const char *service_string, time_t *expire_time);
 krb5_error_code kpasswd_err_to_krb5_err(krb5_error_code res_code);
 krb5_error_code smb_krb5_gen_netbios_krb5_address(smb_krb5_addresses **kerb_addr);
@@ -1260,4 +1289,9 @@ void exit_server_fault(void) NORETURN_ATTRIBUTE ;
 #include "libnscd.h"
 #endif
 
+#if defined(HAVE_IPV6)
+void in6_addr_to_sockaddr_storage(struct sockaddr_storage *ss,
+                                 struct in6_addr ip);
+#endif
+
 #endif /* _INCLUDES_H */