diff options
author | Jeremy Allison <jra@samba.org> | 2009-10-17 10:36:33 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-10-17 10:36:33 -0700 |
commit | 7c51fa6d699a653cafa90df8e44911b576118ebd (patch) | |
tree | 543bf9ca698e03eff81104898b33e77f1abed319 /source3/include | |
parent | cc3a6770c77ec8fe1cd63bf4c682853c56201f0c (diff) | |
parent | 3e3214fd91471bca5b6c4d3782e922d252d588fb (diff) | |
download | samba-7c51fa6d699a653cafa90df8e44911b576118ebd.tar.gz samba-7c51fa6d699a653cafa90df8e44911b576118ebd.tar.bz2 samba-7c51fa6d699a653cafa90df8e44911b576118ebd.zip |
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/ads.h | 3 | ||||
-rw-r--r-- | source3/include/includes.h | 5 | ||||
-rw-r--r-- | source3/include/nss_info.h | 8 | ||||
-rw-r--r-- | source3/include/proto.h | 80 | ||||
-rw-r--r-- | source3/include/rpc_misc.h | 33 | ||||
-rw-r--r-- | source3/include/rpc_perfcount.h | 126 | ||||
-rw-r--r-- | source3/include/rpc_perfcount_defs.h | 93 | ||||
-rw-r--r-- | source3/include/smb.h | 1 | ||||
-rw-r--r-- | source3/include/vfs.h | 6 | ||||
-rw-r--r-- | source3/include/vfs_macros.h | 8 |
10 files changed, 48 insertions, 315 deletions
diff --git a/source3/include/ads.h b/source3/include/ads.h index 6d9b0eebac..30f0b1fc0c 100644 --- a/source3/include/ads.h +++ b/source3/include/ads.h @@ -211,9 +211,6 @@ typedef void **ADS_MODLIST; #define ADS_LDAP_MATCHING_RULE_BIT_OR "1.2.840.113556.1.4.804" #define ADS_PINGS 0x0000FFFF /* Ping response */ -#define ADS_DNS_CONTROLLER 0x20000000 /* DomainControllerName is a DNS name*/ -#define ADS_DNS_DOMAIN 0x40000000 /* DomainName is a DNS name */ -#define ADS_DNS_FOREST 0x80000000 /* DnsForestName is a DNS name */ /* ads auth control flags */ #define ADS_AUTH_DISABLE_KERBEROS 0x0001 diff --git a/source3/include/includes.h b/source3/include/includes.h index 71125140be..b3446cbf65 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -621,7 +621,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx); #include "tdb.h" #include "util_tdb.h" -#include "../talloc/talloc.h" +#include "talloc.h" #include "event.h" #include "../lib/util/tevent_unix.h" @@ -672,8 +672,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx); #include "ntdomain.h" #include "reg_objects.h" #include "reg_db.h" -#include "rpc_perfcount.h" -#include "rpc_perfcount_defs.h" +#include "librpc/gen_ndr/perfcount.h" #include "librpc/gen_ndr/notify.h" #include "librpc/gen_ndr/xattr.h" #include "librpc/gen_ndr/messaging.h" diff --git a/source3/include/nss_info.h b/source3/include/nss_info.h index 90d992a3b9..7514289889 100644 --- a/source3/include/nss_info.h +++ b/source3/include/nss_info.h @@ -8,12 +8,12 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This library 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 Library General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -36,7 +36,7 @@ struct nss_function_entry { struct nss_function_entry *prev, *next; - + const char *name; struct nss_info_methods *methods; }; @@ -83,8 +83,6 @@ NTSTATUS smb_register_idmap_nss(int version, const char *name, struct nss_info_methods *methods); -NTSTATUS nss_init( const char **nss_list ); - NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid, TALLOC_CTX *ctx, ADS_STRUCT *ads, LDAPMessage *msg, diff --git a/source3/include/proto.h b/source3/include/proto.h index d664a26949..4f33a4adf6 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -937,7 +937,7 @@ SMB_OFF_T sys_ftell(FILE *fp); int sys_creat(const char *path, mode_t mode); int sys_open(const char *path, int oflag, mode_t mode); FILE *sys_fopen(const char *path, const char *type); -void kernel_flock(int fd, uint32 share_mode); +void kernel_flock(int fd, uint32 share_mode, uint32 access_mask); SMB_STRUCT_DIR *sys_opendir(const char *name); SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp); void sys_seekdir(SMB_STRUCT_DIR *dirp, long offset); @@ -1259,6 +1259,10 @@ struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) ; const char *reg_type_lookup(enum winreg_Type type); WERROR reg_pull_multi_sz(TALLOC_CTX *mem_ctx, const void *buf, size_t len, uint32 *num_values, char ***values); +bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s); +bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a); +bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s); +bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char ***a); /* The following definitions come from lib/util_reg_api.c */ @@ -1572,12 +1576,6 @@ void load_case_tables(void); void init_valid_table(void); size_t dos_PutUniCode(char *dst,const char *src, size_t len, bool null_terminate); char *skip_unibuf(char *src, size_t len); -int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); -int rpcstr_pull_talloc(TALLOC_CTX *ctx, - char **dest, - void *src, - int src_len, - int flags); int rpcstr_push(void *dest, const char *src, size_t dest_len, int flags); int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src); smb_ucs2_t toupper_w(smb_ucs2_t val); @@ -2661,6 +2659,14 @@ struct tevent_req *cli_posix_rmdir_send(TALLOC_CTX *mem_ctx, const char *fname); NTSTATUS cli_posix_rmdir_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx); NTSTATUS cli_posix_rmdir(struct cli_state *cli, const char *fname); +struct tevent_req *cli_notify_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct cli_state *cli, uint16_t fnum, + uint32_t buffer_size, + uint32_t completion_filter, bool recursive); +NTSTATUS cli_notify_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, + uint32_t *pnum_changes, + struct notify_change **pchanges); /* The following definitions come from libsmb/clifsinfo.c */ @@ -3309,8 +3315,9 @@ void update_trustdom_cache( void ); NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *domain, + const char *account_name, unsigned char orig_trust_passwd_hash[16], - uint32 sec_channel_type); + enum netr_SchannelType sec_channel_type); NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *domain) ; @@ -3978,6 +3985,7 @@ char *lp_ldap_suffix(void); char *lp_ldap_admin_dn(void); int lp_ldap_ssl(void); bool lp_ldap_ssl_ads(void); +int lp_ldap_ref_follow(void); int lp_ldap_passwd_sync(void); bool lp_ldap_delete_dn(void); int lp_ldap_replication_sleep(void); @@ -4437,9 +4445,11 @@ bool pdb_update_autolock_flag(struct samu *sampass, bool *updated); bool pdb_increment_bad_password_count(struct samu *sampass); bool is_dc_trusted_domain_situation(const char *domain_name); bool get_trust_pw_clear(const char *domain, char **ret_pwd, - const char **account_name, uint32 *channel); + const char **account_name, + enum netr_SchannelType *channel); bool get_trust_pw_hash(const char *domain, uint8 ret_pwd[16], - const char **account_name, uint32 *channel); + const char **account_name, + enum netr_SchannelType *channel); struct samr_LogonHours get_logon_hours_from_pdb(TALLOC_CTX *mem_ctx, struct samu *pw); /* The following definitions come from passdb/pdb_compat.c */ @@ -4672,14 +4682,14 @@ bool secrets_fetch_domain_sid(const char *domain, DOM_SID *sid); bool secrets_store_domain_guid(const char *domain, struct GUID *guid); bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid); void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain); -uint32 get_default_sec_channel(void); +enum netr_SchannelType get_default_sec_channel(void); bool secrets_fetch_trust_account_password_legacy(const char *domain, uint8 ret_pwd[16], time_t *pass_last_set_time, - uint32 *channel); + enum netr_SchannelType *channel); bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16], time_t *pass_last_set_time, - uint32 *channel); + enum netr_SchannelType *channel); bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd, DOM_SID *sid, time_t *pass_last_set_time); bool secrets_store_trusted_domain_password(const char* domain, const char* pwd, @@ -4687,10 +4697,10 @@ bool secrets_store_trusted_domain_password(const char* domain, const char* pwd, bool secrets_delete_machine_password(const char *domain); bool secrets_delete_machine_password_ex(const char *domain); bool secrets_delete_domain_sid(const char *domain); -bool secrets_store_machine_password(const char *pass, const char *domain, uint32 sec_channel); +bool secrets_store_machine_password(const char *pass, const char *domain, enum netr_SchannelType sec_channel); char *secrets_fetch_machine_password(const char *domain, time_t *pass_last_set_time, - uint32 *channel); + enum netr_SchannelType *channel); bool trusted_domain_password_delete(const char *domain); bool secrets_store_ldap_pw(const char* dn, char* pw); bool fetch_ldap_pw(char **dn, char** pw); @@ -5115,12 +5125,14 @@ struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name, const char *data_p, size_t size); int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type, const char *data_p, size_t size); +int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char *data); +int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const char *name, const char **data); int regval_ctr_copyvalue(struct regval_ctr *ctr, struct regval_blob *val); int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name); struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr, const char *name); uint32 regval_dword(struct regval_blob *val); -char *regval_sz(struct regval_blob *val); +const char *regval_sz(struct regval_blob *val); /* The following definitions come from registry/reg_perfcount.c */ @@ -5130,20 +5142,6 @@ uint32 reg_perfcount_get_last_counter(uint32 base_index); uint32 reg_perfcount_get_last_help(uint32 last_counter); uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf); uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf); -bool _reg_perfcount_get_counter_data(TDB_DATA key, TDB_DATA *data); -bool _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst, - prs_struct *ps, - int instId, - PERF_OBJECT_TYPE *obj, - TDB_CONTEXT *names); -bool _reg_perfcount_add_instance(PERF_OBJECT_TYPE *obj, - prs_struct *ps, - int instInd, - TDB_CONTEXT *names); -uint32 reg_perfcount_get_perf_data_block(uint32 base_index, - prs_struct *ps, - PERF_DATA_BLOCK *block, - const char *object_ids); WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids); /* The following definitions come from registry/reg_util.c */ @@ -5153,8 +5151,6 @@ bool reg_split_key(char *path, char **base, char **key); char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname ); void normalize_dbkey(char *key); char *reg_remaining_path(TALLOC_CTX *ctx, const char *key); -int regval_convert_multi_sz( uint16 *multi_string, size_t byte_len, char ***values ); -size_t regval_build_multi_sz( char **values, uint16 **buffer ); /* The following definitions come from registry/reg_util_legacy.c */ @@ -5253,10 +5249,11 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli, struct netr_SamInfo3 **info3); NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *account_name, const unsigned char orig_trust_passwd_hash[16], const char *new_trust_pwd_cleartext, const unsigned char new_trust_passwd_hash[16], - uint32_t sec_channel_type); + enum netr_SchannelType sec_channel_type); /* The following definitions come from rpc_client/cli_pipe.c */ @@ -5418,12 +5415,6 @@ NTSTATUS rpc_transport_smbd_init(TALLOC_CTX *mem_ctx, NTSTATUS rpc_transport_sock_init(TALLOC_CTX *mem_ctx, int fd, struct rpc_cli_transport **presult); -/* The following definitions come from rpc_client/cli_reg.c */ - -NTSTATUS rpccli_winreg_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - uint32 reg_type, uint32 access_mask, - struct policy_handle *reg_hnd); - /* The following definitions come from rpc_client/cli_samr.c */ NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli, @@ -5449,7 +5440,7 @@ NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli, const char *newpassword, const char *oldpassword, struct samr_DomInfo1 **dominfo1, - struct samr_ChangeReject **reject); + struct userPwdChangeFailureInformation **reject); void get_query_dispinfo_params(int loop_count, uint32 *max_entries, uint32 *max_size); NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli, @@ -5644,11 +5635,8 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli, /* The following definitions come from rpc_parse/parse_misc.c */ bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth); -bool smb_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime); -bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime); bool smb_io_uuid(const char *desc, struct GUID *uuid, prs_struct *ps, int depth); -void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags); /* The following definitions come from rpc_parse/parse_prs.c */ @@ -5699,7 +5687,6 @@ bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint bool prs_uint16s(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_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str); -bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_buf_size); bool prs_init_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx); bool prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx); @@ -6104,8 +6091,8 @@ NTSTATUS pass_oem_change(char *user, const uchar old_lm_hash_encrypted[16], uchar password_encrypted_with_nt_hash[516], const uchar old_nt_hash_encrypted[16], - uint32 *reject_reason); -NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, bool as_root, uint32 *samr_reject_reason); + enum samPwdChangeReason *reject_reason); +NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, bool as_root, enum samPwdChangeReason *samr_reject_reason); /* The following definitions come from smbd/close.c */ @@ -7142,6 +7129,7 @@ int vfs_stat_smb_fname(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf); int vfs_lstat_smb_fname(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf); +NTSTATUS vfs_stat_fsp(files_struct *fsp); /* The following definitions come from torture/denytest.c */ diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h index 797e1926db..58ea91683a 100644 --- a/source3/include/rpc_misc.h +++ b/source3/include/rpc_misc.h @@ -24,10 +24,6 @@ #define _RPC_MISC_H #define SMB_RPC_INTERFACE_VERSION 1 -#define PRS_POINTER_CAST bool (*)(const char*, prs_struct*, int, void*) - -enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2, UNI_BROKEN_NON_NULL = 3, UNI_STR_DBLTERMINATE = 4 }; - /********************************************************************** @@ -107,33 +103,4 @@ typedef struct { /* UNISTR - unicode string size and buffer */ little-endian. ***MUST*** be null-terminated */ } UNISTR; -typedef struct { /* UNISTR2 - unicode string size (in - uint16 unicode chars) and buffer */ - uint32 uni_max_len; - uint32 offset; - uint32 uni_str_len; - uint16 *buffer; /* unicode characters. ***MUST*** be little-endian. - **must** be null-terminated and the uni_str_len - should include the NULL character */ -} UNISTR2; - -/* - * I'm really wondering how many different time formats - * I will have to cope with - * - * JFM, 09/13/98 In a mad mood ;-( -*/ -typedef struct systemtime -{ - uint16 year; - uint16 month; - uint16 dayofweek; - uint16 day; - uint16 hour; - uint16 minute; - uint16 second; - uint16 milliseconds; -} -SYSTEMTIME; - #endif /* _RPC_MISC_H */ diff --git a/source3/include/rpc_perfcount.h b/source3/include/rpc_perfcount.h deleted file mode 100644 index 0cb2fdc212..0000000000 --- a/source3/include/rpc_perfcount.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef _RPC_PERFCOUNT_H -#define _RPC_PERFCOUNT_H -/* - * Unix SMB/CIFS implementation. - * Virtual Windows Registry Layer - * - * Copyright (C) Marcin Krzysztof Porwit 2005, - * Copyright (C) Gerald (Jerry) Carter 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/>. - */ - -typedef struct perf_counter_definition -{ - /* sizeof(PERF_COUNTER_DEFINITION) */ - uint32 ByteLength; - uint32 CounterNameTitleIndex; - uint32 CounterNameTitlePointer; - uint32 CounterHelpTitleIndex; - uint32 CounterHelpTitlePointer; - uint32 DefaultScale; - uint32 DetailLevel; - uint32 CounterType; - uint32 CounterSize; - uint32 CounterOffset; -} -PERF_COUNTER_DEFINITION; - -typedef struct perf_counter_block -{ - /* Total size of the data block, including all data plus this header */ - uint32 ByteLength; - uint8 *data; -} -PERF_COUNTER_BLOCK; - -typedef struct perf_instance_definition -{ - /* Total size of the instance definition, including the length of the terminated Name string */ - uint32 ByteLength; - uint32 ParentObjectTitleIndex; - uint32 ParentObjectTitlePointer; - uint32 UniqueID; - /* From the start of the PERF_INSTANCE_DEFINITION, the byte offset to the start of the Name string */ - uint32 NameOffset; - uint32 NameLength; - /* Unicode string containing the name for the instance */ - uint8 *data; - PERF_COUNTER_BLOCK counter_data; -} -PERF_INSTANCE_DEFINITION; - -typedef struct perf_object_type -{ - /* Total size of the object block, including all PERF_INSTANCE_DEFINITIONs, - PERF_COUNTER_DEFINITIONs and PERF_COUNTER_BLOCKs in bytes */ - uint32 TotalByteLength; - /* Size of this PERF_OBJECT_TYPE plus all PERF_COUNTER_DEFINITIONs in bytes */ - uint32 DefinitionLength; - /* Size of this PERF_OBJECT_TYPE */ - uint32 HeaderLength; - uint32 ObjectNameTitleIndex; - uint32 ObjectNameTitlePointer; - uint32 ObjectHelpTitleIndex; - uint32 ObjectHelpTitlePointer; - uint32 DetailLevel; - uint32 NumCounters; - uint32 DefaultCounter; - uint32 NumInstances; - uint32 CodePage; - uint64 PerfTime; - uint64 PerfFreq; - PERF_COUNTER_DEFINITION *counters; - PERF_INSTANCE_DEFINITION *instances; - PERF_COUNTER_BLOCK counter_data; -} -PERF_OBJECT_TYPE; - -/* PerfCounter Inner Buffer structs */ -typedef struct perf_data_block -{ - /* hardcoded to read "P.E.R.F" */ - uint16 Signature[4]; - uint32 LittleEndian; - /* both currently hardcoded to 1 */ - uint32 Version; - uint32 Revision; - /* bytes of PERF_OBJECT_TYPE data, does NOT include the PERF_DATA_BLOCK */ - uint32 TotalByteLength; - /* size of PERF_DATA_BLOCK including the uint8 *data */ - uint32 HeaderLength; - /* number of PERF_OBJECT_TYPE structures encoded */ - uint32 NumObjectTypes; - uint32 DefaultObject; - SYSTEMTIME SystemTime; - /* This will guarantee that we're on a 64-bit boundary before we encode - PerfTime, and having it there will make my offset math much easier. */ - uint32 Padding; - /* Now when I'm marshalling this, I'll need to call prs_align_uint64() - before I start encodint the uint64 structs */ - /* clock rate * seconds uptime */ - uint64 PerfTime; - /* The clock rate of the CPU */ - uint64 PerfFreq; - /* used for high-res timers -- for now PerfTime * 10e7 */ - uint64 PerfTime100nSec; - uint32 SystemNameLength; - uint32 SystemNameOffset; - /* The SystemName, in unicode, terminated */ - uint8* data; - PERF_OBJECT_TYPE *objects; -} -PERF_DATA_BLOCK; - -#endif /* _RPC_PERFCOUNT_H */ diff --git a/source3/include/rpc_perfcount_defs.h b/source3/include/rpc_perfcount_defs.h deleted file mode 100644 index 6c84c270e5..0000000000 --- a/source3/include/rpc_perfcount_defs.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef _RPC_PERFCOUNT_DEFS_H -#define _RPC_PERFCOUNT_DEFS_H -/* - * Unix SMB/CIFS implementation. - * Virtual Windows Registry Layer - * - * Copyright (C) Marcin Krzysztof Porwit 2005, - * Copyright (C) Gerald (Jerry) Carter 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/>. - */ - -/* - * The following #defines match what is in winperf.h. - * See that include file for more details, or look up - * "Performance Data Format" on MSDN - * - * Rather than including them in rpc_perfcount.h, they - * were broken out into a separate .h file so that they - * can be included by other programs that need this info - * without pulling in everything else samba-related. - */ - -#define PERF_NO_INSTANCES -1 -#define PERF_NO_UNIQUE_ID -1 - -/* These determine the data size */ -#define PERF_SIZE_DWORD 0x00000000 -#define PERF_SIZE_LARGE 0x00000100 -#define PERF_SIZE_ZERO 0x00000200 -#define PERF_SIZE_VARIABLE_LEN 0x00000300 - -/* These determine the usage of the counter */ -#define PERF_TYPE_NUMBER 0x00000000 -#define PERF_TYPE_COUNTER 0x00000400 -#define PERF_TYPE_TEXT 0x00000800 -#define PERF_TYPE_ZERO 0x00000C00 - -/* If PERF_TYPE_NUMBER was selected, these provide display information */ -#define PERF_NUMBER_HEX 0x00000000 -#define PERF_NUMBER_DECIMAL 0x00010000 -#define PERF_NUMBER_DEC_1000 0x00020000 - -/* If PERF_TYPE_COUNTER was selected, these provide display information */ -#define PERF_COUNTER_VALUE 0x00000000 -#define PERF_COUNTER_RATE 0x00010000 -#define PERF_COUNTER_FRACTION 0x00020000 -#define PERF_COUNTER_BASE 0x00030000 -#define PERF_COUNTER_ELAPSED 0x00040000 -#define PERF_COUNTER_QUEUELEN 0x00050000 -#define PERF_COUNTER_HISTOGRAM 0x00060000 -#define PERF_COUNTER_PRECISION 0x00070000 - -/* If PERF_TYPE_TEXT was selected, these provide display information */ -#define PERF_TEXT_UNICODE 0x00000000 -#define PERF_TEXT_ASCII 0x00010000 - -/* These provide information for which tick count to use when computing elapsed interval */ -#define PERF_TIMER_TICK 0x00000000 -#define PERF_TIMER_100NS 0x00100000 -#define PERF_OBJECT_TIMER 0x00200000 - -/* These affect how the data is manipulated prior to being displayed */ -#define PERF_DELTA_COUNTER 0x00400000 -#define PERF_DELTA_BASE 0x00800000 -#define PERF_INVERSE_COUNTER 0x01000000 -#define PERF_MULTI_COUNTER 0x02000000 - -/* These determine if any text gets added when the value is displayed */ -#define PERF_DISPLAY_NO_SUFFIX 0x00000000 -#define PERF_DISPLAY_PER_SEC 0x10000000 -#define PERF_DISPLAY_PERCENT 0x20000000 -#define PERF_DISPLAY_SECONDS 0x30000000 -#define PERF_DISPLAY_NOSHOW 0x40000000 - -/* These determine the DetailLevel of the counter */ -#define PERF_DETAIL_NOVICE 100 -#define PERF_DETAIL_ADVANCED 200 -#define PERF_DETAIL_EXPERT 300 -#define PERF_DETAIL_WIZARD 400 - -#endif /* _RPC_PERFCOUNT_DEFS_H */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 3c3ced6baf..cee95a9b17 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -727,6 +727,7 @@ struct pending_message_list { struct smb_perfcount_data pcd; uint32_t seqnum; bool encrypted; + bool processed; DATA_BLOB buf; DATA_BLOB private_data; }; diff --git a/source3/include/vfs.h b/source3/include/vfs.h index ed49d1fd28..f9c1f0a54f 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -247,7 +247,8 @@ struct vfs_fn_pointers { struct smb_file_time *ft); int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_OFF_T offset); bool (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); - int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, uint32 share_mode); + int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, + uint32 share_mode, uint32_t access_mask); int (*linux_setlease)(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype); bool (*getlock)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid); int (*symlink)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath); @@ -598,7 +599,8 @@ bool smb_vfs_call_lock(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); int smb_vfs_call_kernel_flock(struct vfs_handle_struct *handle, - struct files_struct *fsp, uint32 share_mode); + struct files_struct *fsp, uint32 share_mode, + uint32_t access_mask); int smb_vfs_call_linux_setlease(struct vfs_handle_struct *handle, struct files_struct *fsp, int leasetype); bool smb_vfs_call_getlock(struct vfs_handle_struct *handle, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 8ca7f373bf..7206bf41bb 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -250,10 +250,10 @@ #define SMB_VFS_NEXT_LOCK(handle, fsp, op, offset, count, type) \ smb_vfs_call_lock((handle)->next, (fsp), (op), (offset), (count), (type)) -#define SMB_VFS_KERNEL_FLOCK(fsp, share_mode) \ - smb_vfs_call_kernel_flock((fsp)->conn->vfs_handles, (fsp), (share_mode)) -#define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode) \ - smb_vfs_call_kernel_flock((handle)->next, (fsp), (share_mode)) +#define SMB_VFS_KERNEL_FLOCK(fsp, share_mode, access_mask) \ + smb_vfs_call_kernel_flock((fsp)->conn->vfs_handles, (fsp), (share_mode), (access_mask)) +#define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode, access_mask) \ + smb_vfs_call_kernel_flock((handle)->next, (fsp), (share_mode), (access_mask)) #define SMB_VFS_LINUX_SETLEASE(fsp, leasetype) \ smb_vfs_call_linux_setlease((fsp)->conn->vfs_handles, (fsp), (leasetype)) |