summaryrefslogtreecommitdiffstats
path: root/source/include
diff options
context:
space:
mode:
Diffstat (limited to 'source/include')
-rw-r--r--source/include/client.h1
-rw-r--r--source/include/debug.h2
-rw-r--r--source/include/includes.h5
-rw-r--r--source/include/local.h5
-rw-r--r--source/include/rpc_dce.h3
-rw-r--r--source/include/rpc_netlogon.h42
-rw-r--r--source/include/rpc_samr.h15
-rw-r--r--source/include/safe_string.h2
-rw-r--r--source/include/smb.h65
-rw-r--r--source/include/smbldap.h3
10 files changed, 107 insertions, 36 deletions
diff --git a/source/include/client.h b/source/include/client.h
index 968b73f0b41..52a6c76299d 100644
--- a/source/include/client.h
+++ b/source/include/client.h
@@ -153,6 +153,7 @@ struct cli_state {
BOOL (*oplock_handler)(struct cli_state *cli, int fnum, unsigned char level);
BOOL force_dos_errors;
+ BOOL case_sensitive; /* False by default. */
/* was this structure allocated by cli_initialise? If so, then
free in cli_shutdown() */
diff --git a/source/include/debug.h b/source/include/debug.h
index 52e06b9360b..05a9a3f0c52 100644
--- a/source/include/debug.h
+++ b/source/include/debug.h
@@ -33,7 +33,7 @@
* diffferent prototype declarations), so we must do these by hand.
*/
/* I know the __attribute__ stuff is ugly, but it does ensure we get the
- arguemnts to DEBUG() right. We have got them wrong too often in the
+ arguments to DEBUG() right. We have got them wrong too often in the
past.
The PRINTFLIKE comment does the equivalent for SGI MIPSPro.
*/
diff --git a/source/include/includes.h b/source/include/includes.h
index ea8eb1a3043..7657984bfb1 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -1239,6 +1239,7 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
#define snprintf smb_snprintf
+#define vsnprintf smb_vsnprintf
#endif
void sys_adminlog(int priority, const char *format_str, ...) PRINTF_ATTRIBUTE(2,3);
@@ -1293,6 +1294,10 @@ krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype
krb5_error_code krb5_auth_con_setuseruserkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock *keyblock);
#endif
+#ifndef HAVE_KRB5_FREE_UNPARSED_NAME
+void krb5_free_unparsed_name(krb5_context ctx, char *val);
+#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);
diff --git a/source/include/local.h b/source/include/local.h
index 540365047a2..7ac2e256120 100644
--- a/source/include/local.h
+++ b/source/include/local.h
@@ -230,4 +230,9 @@
/* size of listen() backlog in smbd */
#define SMBD_LISTEN_BACKLOG 50
+/* Number of microseconds to wait before a sharing violation. */
+#define SHARING_VIOLATION_USEC_WAIT 950000
+
+#define MAX_LDAP_REPLICATION_SLEEP_TIME 5000 /* In milliseconds. */
+
#endif
diff --git a/source/include/rpc_dce.h b/source/include/rpc_dce.h
index 0df903109db..57b1184bd96 100644
--- a/source/include/rpc_dce.h
+++ b/source/include/rpc_dce.h
@@ -71,7 +71,8 @@ enum RPC_PKT_TYPE
to NT4. Actually, anything other than 1ff would seem to do... */
#define NETLOGON_NEG_AUTH2_FLAGS 0x000701ff
-#define NETLOGON_NEG_SCHANNEL 0x40000000
+#define NETLOGON_NEG_SCHANNEL 0x40000000
+#define NETLOGON_NEG_DOMAIN_TRUST_ACCOUNT 0x2010b000
enum netsec_direction
{
diff --git a/source/include/rpc_netlogon.h b/source/include/rpc_netlogon.h
index a5b93b0238a..44beb2b8c82 100644
--- a/source/include/rpc_netlogon.h
+++ b/source/include/rpc_netlogon.h
@@ -68,6 +68,11 @@
#define SAM_DATABASE_BUILTIN 0x01 /* BUILTIN users and groups */
#define SAM_DATABASE_PRIVS 0x02 /* Privileges */
+#define NETLOGON_CONTROL_REDISCOVER 0x5
+#define NETLOGON_CONTROL_TC_QUERY 0x6
+#define NETLOGON_CONTROL_TRANSPORT_NOTIFY 0x7
+#define NETLOGON_CONTROL_SET_DBFLAG 0xfffe
+
#if 0
/* I think this is correct - it's what gets parsed on the wire. JRA. */
/* NET_USER_INFO_2 */
@@ -204,7 +209,7 @@ typedef struct netlogon_2_info
uint32 flags; /* 0x0 - undocumented */
uint32 pdc_status; /* 0x0 - undocumented */
uint32 ptr_trusted_dc_name; /* pointer to trusted domain controller name */
- uint32 tc_status; /* 0x051f - ERROR_NO_LOGON_SERVERS */
+ uint32 tc_status;
UNISTR2 uni_trusted_dc_name; /* unicode string - trusted dc name */
} NETLOGON_INFO_2;
@@ -255,6 +260,26 @@ typedef struct net_r_logon_ctrl_info
NTSTATUS status;
} NET_R_LOGON_CTRL;
+
+typedef struct ctrl_data_info_5
+{
+ uint32 function_code;
+
+ uint32 ptr_domain;
+ UNISTR2 domain;
+
+} CTRL_DATA_INFO_5;
+
+typedef struct ctrl_data_info_6
+{
+ uint32 function_code;
+
+ uint32 ptr_domain;
+ UNISTR2 domain;
+
+} CTRL_DATA_INFO_6;
+
+
/********************************************************
Logon Control2 Query
@@ -266,13 +291,16 @@ typedef struct net_r_logon_ctrl_info
/* NET_Q_LOGON_CTRL2 - LSA Netr Logon Control 2 */
typedef struct net_q_logon_ctrl2_info
{
- uint32 ptr; /* undocumented buffer pointer */
- UNISTR2 uni_server_name; /* server name, starting with two '\'s */
+ uint32 ptr; /* undocumented buffer pointer */
+ UNISTR2 uni_server_name; /* server name, starting with two '\'s */
+
+ uint32 function_code;
+ uint32 query_level;
+ union {
+ CTRL_DATA_INFO_5 info5;
+ CTRL_DATA_INFO_6 info6;
+ } info;
- uint32 function_code; /* 0x1 */
- uint32 query_level; /* 0x1, 0x3 */
- uint32 switch_value; /* 0x1 */
-
} NET_Q_LOGON_CTRL2;
/*******************************************************
diff --git a/source/include/rpc_samr.h b/source/include/rpc_samr.h
index 089941de3aa..ae603c9cd93 100644
--- a/source/include/rpc_samr.h
+++ b/source/include/rpc_samr.h
@@ -1068,6 +1068,14 @@ typedef struct samr_group_info1
} GROUP_INFO1;
+typedef struct samr_group_info2
+{
+ uint16 level;
+ UNIHDR hdr_acct_name;
+ UNISTR2 uni_acct_name;
+
+} GROUP_INFO2;
+
typedef struct samr_group_info3
{
uint32 unknown_1; /* 0x0000 0003 - number of group members? */
@@ -1090,6 +1098,7 @@ typedef struct group_info_ctr
union
{
GROUP_INFO1 info1;
+ GROUP_INFO2 info2;
GROUP_INFO3 info3;
GROUP_INFO4 info4;
@@ -1734,11 +1743,7 @@ typedef struct q_samr_get_dom_pwinfo
typedef struct r_samr_get_dom_pwinfo
{
/*
- * Previously this was 3 uint16's. However, after some tests
- * it appears that the data len for the signing needs to be 16.
- * Not sure how 3 unit16's ever worked since the length always
- * turned out to 12. 3 uint32's + NT_STATUS == 16 bytes. Tested
- * using NT and 2k. --jerry
+ * See Samba4 IDL
*/
uint16 unk_0;
uint32 unk_1;
diff --git a/source/include/safe_string.h b/source/include/safe_string.h
index b22c5efcc99..d278e29aca5 100644
--- a/source/include/safe_string.h
+++ b/source/include/safe_string.h
@@ -59,7 +59,7 @@
#ifdef strncasecmp
#undef strncasecmp
#endif
-#define strncasecmp __ERROR__XX__NEVER_USE_STRCASECMP__;
+#define strncasecmp __ERROR__XX__NEVER_USE_STRNCASECMP__;
#endif /* !_SPLINT_ */
diff --git a/source/include/smb.h b/source/include/smb.h
index 54a69d1433a..a802e962266 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -584,6 +584,24 @@ struct interface
struct in_addr nmask;
};
+/* struct used by share mode violation error processing */
+typedef struct {
+ pid_t pid;
+ uint16 mid;
+ struct timeval time;
+ SMB_DEV_T dev;
+ SMB_INO_T inode;
+ uint16 port;
+} deferred_open_entry;
+
+/* Internal message queue for deferred opens. */
+struct pending_message_list {
+ struct pending_message_list *next, *prev;
+ struct timeval msg_time; /* The timeout time */
+ DATA_BLOB buf;
+ DATA_BLOB private_data;
+};
+
/* struct returned by get_share_modes */
typedef struct {
pid_t pid;
@@ -663,28 +681,14 @@ struct locking_key {
SMB_INO_T inode;
};
-struct locking_data {
- union {
- int num_share_mode_entries;
- share_mode_entry dummy; /* Needed for alignment. */
- } u;
- /* the following two entries are implicit
- share_mode_entry modes[num_share_mode_entries];
- char file_name[];
- */
-};
-
-
/* the following are used by loadparm for option lists */
-typedef enum
-{
- P_BOOL,P_BOOLREV,P_CHAR,P_INTEGER,P_OCTAL,P_LIST,
- P_STRING,P_USTRING,P_GSTRING,P_UGSTRING,P_ENUM,P_SEP
+typedef enum {
+ P_BOOL,P_BOOLREV,P_CHAR,P_INTEGER,P_OCTAL,P_LIST,
+ P_STRING,P_USTRING,P_GSTRING,P_UGSTRING,P_ENUM,P_SEP
} parm_type;
-typedef enum
-{
- P_LOCAL,P_GLOBAL,P_SEPARATOR,P_NONE
+typedef enum {
+ P_LOCAL,P_GLOBAL,P_SEPARATOR,P_NONE
} parm_class;
/* passed to br lock code */
@@ -1345,7 +1349,8 @@ enum ldap_ssl_types {LDAP_SSL_ON, LDAP_SSL_OFF, LDAP_SSL_START_TLS};
enum ldap_passwd_sync_types {LDAP_PASSWD_SYNC_ON, LDAP_PASSWD_SYNC_OFF, LDAP_PASSWD_SYNC_ONLY};
/* Remote architectures we know about. */
-enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT, RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_SAMBA};
+enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT,
+ RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_SAMBA, RA_CIFSFS};
/* case handling */
enum case_handling {CASE_LOWER,CASE_UPPER};
@@ -1410,6 +1415,7 @@ extern int chain_size;
#define EXCLUSIVE_OPLOCK 1
#define BATCH_OPLOCK 2
#define LEVEL_II_OPLOCK 4
+#define INTERNAL_OPEN_ONLY 8
#define EXCLUSIVE_OPLOCK_TYPE(lck) ((lck) & (EXCLUSIVE_OPLOCK|BATCH_OPLOCK))
#define BATCH_OPLOCK_TYPE(lck) ((lck) & BATCH_OPLOCK)
@@ -1461,6 +1467,25 @@ extern int chain_size;
#define LEVEL_II_OPLOCK_BREAK_CMD 0x3
#define ASYNC_LEVEL_II_OPLOCK_BREAK_CMD 0x4
+/* Add the "deferred open" message. */
+#define RETRY_DEFERRED_OPEN_CMD 0x5
+
+/*
+ * And the message format for it. Keep the same message length.
+ *
+ * 0 2 2+pid 2+pid+dev 2+pid+dev+ino
+ * +----+--------+-------+--------+---------+
+ * | cmd| pid | dev | inode | mid |
+ * +----+--------+-------+--------+---------+
+ */
+
+#define DEFERRED_OPEN_CMD_OFFSET 0
+#define DEFERRED_OPEN_PID_OFFSET 2 /* pid we're *sending* from. */
+#define DEFERRED_OPEN_DEV_OFFSET (DEFERRED_OPEN_PID_OFFSET + sizeof(pid_t))
+#define DEFERRED_OPEN_INODE_OFFSET (DEFERRED_OPEN_DEV_OFFSET + sizeof(SMB_DEV_T))
+#define DEFERRED_OPEN_MID_OFFSET (DEFERRED_OPEN_INODE_OFFSET + sizeof(SMB_INO_T))
+#define DEFERRED_OPEN_MSG_LEN OPLOCK_BREAK_MSG_LEN
+
/*
* Capabilities abstracted for different systems.
*/
diff --git a/source/include/smbldap.h b/source/include/smbldap.h
index 61b8df0f0ef..c7de7d84b37 100644
--- a/source/include/smbldap.h
+++ b/source/include/smbldap.h
@@ -153,5 +153,6 @@ struct smbldap_state {
struct smbldap_state;
-#endif /* _SMBLDAP_H */
+#define LDAP_CONNECT_DEFAULT_TIMEOUT 5
+#endif /* _SMBLDAP_H */