summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/eventlog.h41
-rw-r--r--source3/include/includes.h1
-rw-r--r--source3/include/localedir.h6
-rw-r--r--source3/include/nss_info.h10
-rw-r--r--source3/include/ntdomain.h40
-rw-r--r--source3/include/ntlmssp.h6
-rw-r--r--source3/include/passdb.h10
-rw-r--r--source3/include/proto.h126
-rw-r--r--source3/include/rpc_eventlog.h23
-rw-r--r--source3/include/rpc_ntsvcs.h19
-rw-r--r--source3/include/rpc_svcctl.h8
-rw-r--r--source3/include/smb_macros.h4
-rw-r--r--source3/include/vfs_macros.h6
13 files changed, 165 insertions, 135 deletions
diff --git a/source3/include/eventlog.h b/source3/include/eventlog.h
new file mode 100644
index 0000000000..16affe3313
--- /dev/null
+++ b/source3/include/eventlog.h
@@ -0,0 +1,41 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * RPC Pipe client / server routines
+ * Copyright (C) Marcin Krzysztof Porwit 2005.
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Defines for TDB keys */
+#define EVT_OLDEST_ENTRY "INFO/oldest_entry"
+#define EVT_NEXT_RECORD "INFO/next_record"
+#define EVT_VERSION "INFO/version"
+#define EVT_MAXSIZE "INFO/maxsize"
+#define EVT_RETENTION "INFO/retention"
+
+#define ELOG_APPL "Application"
+#define ELOG_SYS "System"
+#define ELOG_SEC "Security"
+
+typedef struct elog_tdb {
+ struct elog_tdb *prev, *next;
+ char *name;
+ TDB_CONTEXT *tdb;
+ int ref_count;
+} ELOG_TDB;
+
+#define ELOG_TDB_CTX(x) ((x)->tdb)
+
+
+#define EVENTLOG_DATABASE_VERSION_V1 1
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 4399c734d0..38d6ec06b9 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -654,6 +654,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
#include "async_smb.h"
#include "async_sock.h"
#include "services.h"
+#include "eventlog.h"
#include "lib/smbconf/smbconf.h"
diff --git a/source3/include/localedir.h b/source3/include/localedir.h
new file mode 100644
index 0000000000..2a291d3ceb
--- /dev/null
+++ b/source3/include/localedir.h
@@ -0,0 +1,6 @@
+#ifndef __LOCALEDIR_H__
+#define __LOCALEDIR_H__
+
+extern const char *dyn_LOCALEDIR;
+
+#endif
diff --git a/source3/include/nss_info.h b/source3/include/nss_info.h
index e756136b76..0224be099f 100644
--- a/source3/include/nss_info.h
+++ b/source3/include/nss_info.h
@@ -66,10 +66,12 @@ struct nss_info_methods {
TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
char **homedir, char **shell, char **gecos, gid_t *p_gid);
- NTSTATUS (*map_to_alias)( TALLOC_CTX *mem_ctx, const char *domain,
- const char *name, char **alias );
- NTSTATUS (*map_from_alias)( TALLOC_CTX *mem_ctx, const char *domain,
- const char *alias, char **name );
+ NTSTATUS (*map_to_alias)(TALLOC_CTX *mem_ctx,
+ struct nss_domain_entry *e,
+ const char *name, char **alias);
+ NTSTATUS (*map_from_alias)(TALLOC_CTX *mem_ctx,
+ struct nss_domain_entry *e,
+ const char *alias, char **name);
NTSTATUS (*close_fn)( void );
};
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index e6c97c69dc..cc99ad74c2 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -5,17 +5,17 @@
Copyright (C) Luke Kenneth Casson Leighton 1996-1997
Copyright (C) Paul Ashton 1997
Copyright (C) Jeremy Allison 2000-2004
-
+
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 3 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, see <http://www.gnu.org/licenses/>.
*/
@@ -27,7 +27,7 @@
* A bunch of stuff that was put into smb.h
* in the NTDOM branch - it didn't belong there.
*/
-
+
typedef struct _prs_struct {
bool io; /* parsing in or out of data stream */
/*
@@ -138,7 +138,7 @@ struct dcinfo {
struct netr_Credential seed_chal;
struct netr_Credential clnt_chal; /* Client credential */
struct netr_Credential srv_chal; /* Server credential */
-
+
unsigned char sess_key[16]; /* Session key - 8 bytes followed by 8 zero bytes */
unsigned char mach_pw[16]; /* md4(machine password) */
@@ -154,13 +154,13 @@ struct dcinfo {
typedef struct pipe_rpc_fns {
struct pipe_rpc_fns *next, *prev;
-
+
/* RPC function table associated with the current rpc_bind (associated by context) */
-
+
const struct api_struct *cmds;
int n_cmds;
uint32 context_id;
-
+
} PIPE_RPC_FNS;
/*
@@ -217,12 +217,12 @@ typedef struct pipes_struct {
fstring name;
fstring pipe_srv_name;
-
+
/* linked list of rpc dispatch tables associated
with the open rpc contexts */
-
+
PIPE_RPC_FNS *contexts;
-
+
RPC_HDR hdr; /* Incoming RPC header. */
RPC_HDR_REQ hdr_req; /* Incoming request header. */
@@ -231,21 +231,15 @@ typedef struct pipes_struct {
struct dcinfo *dc; /* Keeps the creds data from netlogon. */
/*
- * Unix user name and credentials used when a pipe is authenticated.
- */
-
- struct current_user pipe_user;
-
- /*
* Set to true when an RPC bind has been done on this pipe.
*/
-
+
bool pipe_bound;
-
+
/*
* Set to true when we should return fault PDU's for everything.
*/
-
+
bool fault_state;
/*
@@ -259,13 +253,13 @@ typedef struct pipes_struct {
*/
bool rng_fault_state;
-
+
/*
* Set to RPC_BIG_ENDIAN when dealing with big-endian PDU's
*/
-
+
bool endian;
-
+
/*
* Struct to deal with multiple pdu inputs.
*/
diff --git a/source3/include/ntlmssp.h b/source3/include/ntlmssp.h
index b014b2170c..55b9249ea7 100644
--- a/source3/include/ntlmssp.h
+++ b/source3/include/ntlmssp.h
@@ -77,7 +77,6 @@ enum NTLM_MESSAGE_TYPE
typedef struct ntlmssp_state
{
- TALLOC_CTX *mem_ctx;
unsigned int ref_count;
enum NTLMSSP_ROLE role;
enum server_types server_role;
@@ -98,9 +97,9 @@ typedef struct ntlmssp_state
DATA_BLOB lm_resp;
DATA_BLOB nt_resp;
DATA_BLOB session_key;
-
+
uint32 neg_flags; /* the current state of negotiation with the NTLMSSP partner */
-
+
void *auth_context;
/**
@@ -171,5 +170,4 @@ typedef struct ntlmssp_state
response in at the time we want to process it.
Store it here, until we need it */
DATA_BLOB stored_response;
-
} NTLMSSP_STATE;
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 360a0d0444..744b723c83 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -23,16 +23,6 @@
#ifndef _PASSDB_H
#define _PASSDB_H
-
-/*
- * in samba4 idl
- * ACCT_NT_PWD_SET == SAMR_FIELD_PASSWORD and
- * ACCT_LM_PWD_SET == SAMR_FIELD_PASSWORD2
- */
-
-#define ACCT_NT_PWD_SET 0x01000000
-#define ACCT_LM_PWD_SET 0x02000000
-
/*
* bit flags representing initialized fields in struct samu
*/
diff --git a/source3/include/proto.h b/source3/include/proto.h
index ac55a67c19..f2bbb07f92 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1251,6 +1251,7 @@ char *procid_str_static(const struct server_id *pid);
bool procid_valid(const struct server_id *pid);
bool procid_is_local(const struct server_id *pid);
int this_is_smp(void);
+bool trans_oob(uint32_t bufsize, uint32_t offset, uint32_t length);
bool is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off);
char *get_safe_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
char *get_safe_str_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
@@ -1582,6 +1583,7 @@ bool validate_net_name( const char *name,
const char *invalid_chars,
int max_len);
char *escape_shell_string(const char *src);
+char **str_list_make_v3(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
/* The following definitions come from lib/util_unistr.c */
@@ -1919,10 +1921,10 @@ ADS_STATUS ads_get_joinable_ous(ADS_STRUCT *ads,
TALLOC_CTX *mem_ctx,
char ***ous,
size_t *num_ous);
-bool ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx,
- const char *extended_dn,
- enum ads_extended_dn_flags flags,
- DOM_SID *sid);
+ADS_STATUS ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx,
+ const char *extended_dn,
+ enum ads_extended_dn_flags flags,
+ DOM_SID *sid);
char* ads_get_dnshostname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
char* ads_get_upn( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
char* ads_get_samaccountname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
@@ -4772,10 +4774,12 @@ bool delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR
void update_a_form(nt_forms_struct **list, const FORM *form, int count);
int get_ntdrivers(fstring **list, const char *architecture, uint32 version);
const char *get_short_archi(const char *long_archi);
-WERROR clean_up_driver_struct(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
- uint32 level, struct current_user *user);
-WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 level,
- struct current_user *user, WERROR *perr);
+WERROR clean_up_driver_struct(struct pipes_struct *rpc_pipe,
+ NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
+ uint32 level);
+WERROR move_driver_to_download_area(struct pipes_struct *p,
+ NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
+ uint32 level, WERROR *perr);
int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen);
uint32 del_a_printer(const char *sharename);
NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename);
@@ -4818,8 +4822,9 @@ WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level);
bool printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 );
bool printer_driver_files_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info );
-WERROR delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct current_user *user,
- uint32 version, bool delete_files );
+WERROR delete_printer_driver(struct pipes_struct *rpc_pipe,
+ NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3,
+ uint32 version, bool delete_files );
WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr);
bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **secdesc_ctr);
void map_printer_permissions(SEC_DESC *sd);
@@ -4865,7 +4870,7 @@ bool sysv_cache_reload(void);
NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn,
const char *fname,
- uint16_t current_vuid, files_struct **result);
+ uint16_t current_vuid, files_struct *fsp);
void print_fsp_end(files_struct *fsp, enum file_close_type close_type);
/* The following definitions come from printing/printing.c */
@@ -5295,7 +5300,6 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
NTSTATUS rpccli_winreg_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
uint32 reg_type, uint32 access_mask,
POLICY_HND *reg_hnd);
-uint32 reg_init_regval_buffer( REGVAL_BUFFER *buf2, REGISTRY_VALUE *val );
/* The following definitions come from rpc_client/cli_samr.c */
@@ -5549,7 +5553,8 @@ void init_netr_SamInfo3(struct netr_SamInfo3 *r,
uint32_t sidcount,
struct netr_SidAttr *sids);
NTSTATUS serverinfo_to_SamInfo3(struct auth_serversupplied_info *server_info,
- uint8_t pipe_session_key[16],
+ uint8_t *pipe_session_key,
+ size_t pipe_session_key_len,
struct netr_SamInfo3 *sam3);
void init_netr_IdentityInfo(struct netr_IdentityInfo *r,
const char *domain_name,
@@ -5595,7 +5600,7 @@ void init_samr_DomGeneralInformation(struct samr_DomGeneralInformation *r,
const char *domain_name,
const char *primary,
uint64_t sequence_num,
- uint32_t unknown2,
+ enum samr_DomainServerState domain_server_state,
enum samr_Role role,
uint32_t unknown3,
uint32_t num_users,
@@ -5615,7 +5620,7 @@ void init_samr_DomInfo8(struct samr_DomInfo8 *r,
uint64_t sequence_num,
NTTIME domain_create_time);
void init_samr_DomInfo9(struct samr_DomInfo9 *r,
- uint32_t unknown);
+ enum samr_DomainServerState domain_server_state);
void init_samr_DomInfo12(struct samr_DomInfo12 *r,
uint64_t lockout_duration,
uint64_t lockout_window,
@@ -5640,6 +5645,25 @@ void init_samr_alias_info1(struct samr_AliasInfoAll *r,
const char *description);
void init_samr_alias_info3(struct lsa_String *r,
const char *description);
+void init_samr_user_info5(struct samr_UserInfo5 *r,
+ const char *account_name,
+ const char *full_name,
+ uint32_t rid,
+ uint32_t primary_gid,
+ const char *home_directory,
+ const char *home_drive,
+ const char *logon_script,
+ const char *profile_path,
+ const char *description,
+ const char *workstations,
+ NTTIME last_logon,
+ NTTIME last_logoff,
+ struct samr_LogonHours logon_hours,
+ uint16_t bad_password_count,
+ uint16_t logon_count,
+ NTTIME last_password_change,
+ NTTIME acct_expiry,
+ uint32_t acct_flags);
void init_samr_user_info7(struct samr_UserInfo7 *r,
const char *account_name);
void init_samr_user_info9(struct samr_UserInfo9 *r,
@@ -5709,11 +5733,43 @@ void init_samr_user_info23(struct samr_UserInfo23 *r,
uint8_t nt_password_set,
uint8_t lm_password_set,
uint8_t password_expired,
- uint8_t data[516],
- uint8_t pw_len);
+ struct samr_CryptPassword *pwd_buf);
void init_samr_user_info24(struct samr_UserInfo24 *r,
- uint8_t data[516],
- uint8_t pw_len);
+ struct samr_CryptPassword *pwd_buf,
+ uint8_t password_expired);
+void init_samr_user_info25(struct samr_UserInfo25 *r,
+ NTTIME last_logon,
+ NTTIME last_logoff,
+ NTTIME last_password_change,
+ NTTIME acct_expiry,
+ NTTIME allow_password_change,
+ NTTIME force_password_change,
+ const char *account_name,
+ const char *full_name,
+ const char *home_directory,
+ const char *home_drive,
+ const char *logon_script,
+ const char *profile_path,
+ const char *description,
+ const char *workstations,
+ const char *comment,
+ struct lsa_BinaryString *parameters,
+ uint32_t rid,
+ uint32_t primary_gid,
+ uint32_t acct_flags,
+ uint32_t fields_present,
+ struct samr_LogonHours logon_hours,
+ uint16_t bad_password_count,
+ uint16_t logon_count,
+ uint16_t country_code,
+ uint16_t code_page,
+ uint8_t nt_password_set,
+ uint8_t lm_password_set,
+ uint8_t password_expired,
+ struct samr_CryptPasswordEx *pwd_buf);
+void init_samr_user_info26(struct samr_UserInfo26 *r,
+ struct samr_CryptPasswordEx *pwd_buf,
+ uint8_t password_expired);
void init_samr_CryptPasswordEx(const char *pwd,
DATA_BLOB *session_key,
struct samr_CryptPasswordEx *pwd_buf);
@@ -5908,8 +5964,6 @@ void init_rpc_blob_str(RPC_DATA_BLOB *str, const char *buf, int len);
void init_rpc_blob_hex(RPC_DATA_BLOB *str, const char *buf);
void init_rpc_blob_bytes(RPC_DATA_BLOB *str, uint8 *buf, size_t len);
bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth);
-void init_regval_buffer(REGVAL_BUFFER *str, const uint8 *buf, size_t len);
-bool smb_io_regval_buffer(const char *desc, prs_struct *ps, int depth, REGVAL_BUFFER *buf2);
void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf);
void copy_unistr2(UNISTR2 *str, const UNISTR2 *from);
void init_string2(STRING2 *str, const char *buf, size_t max_len, size_t str_len);
@@ -5972,8 +6026,6 @@ bool policy_handle_is_valid(const POLICY_HND *hnd);
bool ntsvcs_io_q_get_device_list(const char *desc, NTSVCS_Q_GET_DEVICE_LIST *q_u, prs_struct *ps, int depth);
bool ntsvcs_io_r_get_device_list(const char *desc, NTSVCS_R_GET_DEVICE_LIST *r_u, prs_struct *ps, int depth);
-bool ntsvcs_io_q_get_device_reg_property(const char *desc, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, prs_struct *ps, int depth);
-bool ntsvcs_io_r_get_device_reg_property(const char *desc, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u, prs_struct *ps, int depth);
/* The following definitions come from rpc_parse/parse_prs.c */
@@ -6029,7 +6081,6 @@ bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uin
bool prs_uint16uni(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len);
bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str);
-bool prs_regval_buffer(bool charmode, const char *name, prs_struct *ps, int depth, REGVAL_BUFFER *buf);
bool prs_string2(bool charmode, const char *name, prs_struct *ps, int depth, STRING2 *str);
bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str);
bool prs_unistr3(bool charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth);
@@ -6822,7 +6873,6 @@ WERROR _PNP_GetVersion(pipes_struct *p,
WERROR _PNP_GetDeviceListSize(pipes_struct *p,
struct PNP_GetDeviceListSize *r);
WERROR _ntsvcs_get_device_list( pipes_struct *p, NTSVCS_Q_GET_DEVICE_LIST *q_u, NTSVCS_R_GET_DEVICE_LIST *r_u );
-WERROR _ntsvcs_get_device_reg_property( pipes_struct *p, NTSVCS_Q_GET_DEVICE_REG_PROPERTY *q_u, NTSVCS_R_GET_DEVICE_REG_PROPERTY *r_u );
WERROR _PNP_ValidateDeviceInstance(pipes_struct *p,
struct PNP_ValidateDeviceInstance *r);
WERROR _PNP_GetHwProfInfo(pipes_struct *p,
@@ -6968,7 +7018,6 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p);
bool api_pipe_ntlmssp_auth_process(pipes_struct *p, prs_struct *rpc_in,
uint32 *p_ss_padding_len, NTSTATUS *pstatus);
bool api_pipe_schannel_process(pipes_struct *p, prs_struct *rpc_in, uint32 *p_ss_padding_len);
-struct current_user *get_current_user(struct current_user *user, pipes_struct *p);
void free_pipe_rpc_context( PIPE_RPC_FNS *list );
bool api_pipe_request(pipes_struct *p);
@@ -6979,8 +7028,8 @@ pipes_struct *get_next_internal_pipe(pipes_struct *p);
void init_rpc_pipe_hnd(void);
bool fsp_is_np(struct files_struct *fsp);
-NTSTATUS np_open(struct smb_request *smb_req, struct connection_struct *conn,
- const char *name, struct files_struct **pfsp);
+NTSTATUS np_open(struct smb_request *smb_req, const char *name,
+ struct files_struct **pfsp);
NTSTATUS np_write(struct files_struct *fsp, const uint8_t *data, size_t len,
ssize_t *nwritten);
NTSTATUS np_read(struct files_struct *fsp, uint8_t *data, size_t len,
@@ -7865,9 +7914,9 @@ void file_sync_all(connection_struct *conn);
void file_free(struct smb_request *req, files_struct *fsp);
files_struct *file_fnum(uint16 fnum);
files_struct *file_fsp(struct smb_request *req, uint16 fid);
-NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *fsp,
+void dup_file_fsp(struct smb_request *req, files_struct *from,
uint32 access_mask, uint32 share_access,
- uint32 create_options, files_struct **result);
+ uint32 create_options, files_struct *to);
/* The following definitions come from smbd/ipc.c */
@@ -7962,7 +8011,8 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
connection_struct **pconn,
int snum,
const char *path,
- char **poldcwd);
+ struct auth_serversupplied_info *server_info,
+ char **poldcwd);
/* The following definitions come from smbd/negprot.c */
@@ -7971,11 +8021,11 @@ void reply_negprot(struct smb_request *req);
/* The following definitions come from smbd/notify.c */
void change_notify_reply(connection_struct *conn,
- const uint8 *request_buf, uint32 max_param,
+ struct smb_request *req, uint32 max_param,
struct notify_change_buf *notify_buf);
NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
bool recursive);
-NTSTATUS change_notify_add_request(const struct smb_request *req,
+NTSTATUS change_notify_add_request(struct smb_request *req,
uint32 max_param,
uint32 filter, bool recursive,
struct files_struct *fsp);
@@ -8176,6 +8226,7 @@ void reply_pipe_close(connection_struct *conn, struct smb_request *req);
/* The following definitions come from smbd/posix_acls.c */
void create_file_sids(const SMB_STRUCT_STAT *psbuf, DOM_SID *powner_sid, DOM_SID *pgroup_sid);
+bool nt4_compatible_acls(void);
NTSTATUS unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, uint32 security_info_sent, const SEC_DESC *psd);
SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl);
NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
@@ -8231,7 +8282,6 @@ void reply_outbuf(struct smb_request *req, uint8 num_words, uint32 num_bytes);
const char *smb_fn_name(int type);
void add_to_common_flags2(uint32 v);
void remove_from_common_flags2(uint32 v);
-void construct_reply_common(const char *inbuf, char *outbuf);
void construct_reply_common_req(struct smb_request *req, char *outbuf);
void chain_reply(struct smb_request *req);
void check_reload(time_t t);
@@ -8424,10 +8474,6 @@ bool set_current_service(connection_struct *conn, uint16 flags, bool do_chdir);
void load_registry_shares(void);
int add_home_service(const char *service, const char *username, const char *homedir);
int find_service(fstring service);
-connection_struct *make_connection_with_chdir(const char *service_in,
- DATA_BLOB password,
- const char *dev, uint16 vuid,
- NTSTATUS *status);
connection_struct *make_connection(const char *service_in, DATA_BLOB password,
const char *pdev, uint16 vuid,
NTSTATUS *status);
@@ -8458,7 +8504,8 @@ bool user_ok_token(const char *username, const char *domain,
struct nt_user_token *token, int snum);
bool is_share_read_only_for_token(const char *username,
const char *domain,
- struct nt_user_token *token, int snum);
+ struct nt_user_token *token,
+ connection_struct *conn);
/* The following definitions come from smbd/srvstr.c */
@@ -8663,6 +8710,7 @@ NTSTATUS idmap_backends_sid_to_unixid(const char *domname,
NTSTATUS idmap_new_mapping(const struct dom_sid *psid, enum id_type type,
struct unixid *pxid);
NTSTATUS idmap_set_mapping(const struct id_map *map);
+NTSTATUS idmap_remove_mapping(const struct id_map *map);
/* The following definitions come from winbindd/idmap_cache.c */
diff --git a/source3/include/rpc_eventlog.h b/source3/include/rpc_eventlog.h
index 3f5d03ed63..f17e448d9e 100644
--- a/source3/include/rpc_eventlog.h
+++ b/source3/include/rpc_eventlog.h
@@ -35,29 +35,6 @@
/* Event types */
/* defined in librpc/gen_ndr/eventlog.h */
-/* Defines for TDB keys */
-#define EVT_OLDEST_ENTRY "INFO/oldest_entry"
-#define EVT_NEXT_RECORD "INFO/next_record"
-#define EVT_VERSION "INFO/version"
-#define EVT_MAXSIZE "INFO/maxsize"
-#define EVT_RETENTION "INFO/retention"
-
-#define ELOG_APPL "Application"
-#define ELOG_SYS "System"
-#define ELOG_SEC "Security"
-
-typedef struct elog_tdb {
- struct elog_tdb *prev, *next;
- char *name;
- TDB_CONTEXT *tdb;
- int ref_count;
-} ELOG_TDB;
-
-#define ELOG_TDB_CTX(x) ((x)->tdb)
-
-
-#define EVENTLOG_DATABASE_VERSION_V1 1
-
/***********************************/
typedef struct
diff --git a/source3/include/rpc_ntsvcs.h b/source3/include/rpc_ntsvcs.h
index 0056d16eb9..dc74298cb9 100644
--- a/source3/include/rpc_ntsvcs.h
+++ b/source3/include/rpc_ntsvcs.h
@@ -47,23 +47,4 @@ typedef struct {
WERROR status;
} NTSVCS_R_GET_DEVICE_LIST;
-/**************************/
-
-typedef struct {
- UNISTR2 devicepath;
- uint32 property;
- uint32 unknown2;
- uint32 buffer_size1;
- uint32 buffer_size2;
- uint32 unknown5;
-} NTSVCS_Q_GET_DEVICE_REG_PROPERTY;
-
-typedef struct {
- uint32 unknown1;
- REGVAL_BUFFER value;
- uint32 size;
- uint32 needed;
- WERROR status;
-} NTSVCS_R_GET_DEVICE_REG_PROPERTY;
-
#endif /* _RPC_NTSVCS_H */
diff --git a/source3/include/rpc_svcctl.h b/source3/include/rpc_svcctl.h
index 27858405e7..7dd849d5b4 100644
--- a/source3/include/rpc_svcctl.h
+++ b/source3/include/rpc_svcctl.h
@@ -103,14 +103,6 @@
#define SVCCTL_DEMAND_START 0x00000003
#define SVCCTL_DISABLED 0x00000004
-/* Service Controls */
-
-#define SVCCTL_CONTROL_STOP 0x00000001
-#define SVCCTL_CONTROL_PAUSE 0x00000002
-#define SVCCTL_CONTROL_CONTINUE 0x00000003
-#define SVCCTL_CONTROL_INTERROGATE 0x00000004
-#define SVCCTL_CONTROL_SHUTDOWN 0x00000005
-
#define SVC_HANDLE_IS_SCM 0x0000001
#define SVC_HANDLE_IS_SERVICE 0x0000002
#define SVC_HANDLE_IS_DBLOCK 0x0000003
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 46ca236553..119ceeb158 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -52,8 +52,8 @@
return ERROR_NT(NT_STATUS_INVALID_HANDLE); \
} while(0)
-#define CHECK_READ(fsp,inbuf) (((fsp)->fh->fd != -1) && ((fsp)->can_read || \
- ((SVAL((inbuf),smb_flg2) & FLAGS2_READ_PERMIT_EXECUTE) && \
+#define CHECK_READ(fsp,req) (((fsp)->fh->fd != -1) && ((fsp)->can_read || \
+ ((req->flags2 & FLAGS2_READ_PERMIT_EXECUTE) && \
(fsp->access_mask & FILE_EXECUTE))))
#define CHECK_WRITE(fsp) ((fsp)->can_write && ((fsp)->fh->fd != -1))
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 7b3aeaa2c7..8fbc21b12d 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -92,7 +92,7 @@
/* POSIX ACL operations. */
#define SMB_VFS_CHMOD_ACL(conn, name, mode) ((conn)->vfs.ops.chmod_acl((conn)->vfs.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs.ops.fchmod_acl((fsp)->conn->vfs.handles.chmod_acl, (fsp), (mode)))
+#define SMB_VFS_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs.ops.fchmod_acl((fsp)->conn->vfs.handles.fchmod_acl, (fsp), (mode)))
#define SMB_VFS_SYS_ACL_GET_ENTRY(conn, theacl, entry_id, entry_p) ((conn)->vfs.ops.sys_acl_get_entry((conn)->vfs.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
#define SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry_d, tag_type_p) ((conn)->vfs.ops.sys_acl_get_tag_type((conn)->vfs.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
@@ -217,7 +217,7 @@
/* POSIX ACL operations. */
#define SMB_VFS_OPAQUE_CHMOD_ACL(conn, name, mode) ((conn)->vfs_opaque.ops.chmod_acl((conn)->vfs_opaque.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_OPAQUE_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs_opaque.ops.fchmod_acl((fsp)->conn->vfs_opaque.handles.chmod_acl, (fsp), (mode)))
+#define SMB_VFS_OPAQUE_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs_opaque.ops.fchmod_acl((fsp)->conn->vfs_opaque.handles.fchmod_acl, (fsp), (mode)))
#define SMB_VFS_OPAQUE_SYS_ACL_GET_ENTRY(conn, theacl, entry_id, entry_p) ((conn)->vfs_opaque.ops.sys_acl_get_entry((conn)->vfs_opaque.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
#define SMB_VFS_OPAQUE_SYS_ACL_GET_TAG_TYPE(conn, entry_d, tag_type_p) ((conn)->vfs_opaque.ops.sys_acl_get_tag_type((conn)->vfs_opaque.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
@@ -343,7 +343,7 @@
/* POSIX ACL operations. */
#define SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode) ((handle)->vfs_next.ops.chmod_acl((handle)->vfs_next.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) ((handle)->vfs_next.ops.fchmod_acl((handle)->vfs_next.handles.chmod_acl, (fsp), (mode)))
+#define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) ((handle)->vfs_next.ops.fchmod_acl((handle)->vfs_next.handles.fchmod_acl, (fsp), (mode)))
#define SMB_VFS_NEXT_SYS_ACL_GET_ENTRY(handle, theacl, entry_id, entry_p) ((handle)->vfs_next.ops.sys_acl_get_entry((handle)->vfs_next.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
#define SMB_VFS_NEXT_SYS_ACL_GET_TAG_TYPE(handle, entry_d, tag_type_p) ((handle)->vfs_next.ops.sys_acl_get_tag_type((handle)->vfs_next.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))