mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Extra stuff for large readwrite support.
Jeremy.
This commit is contained in:
parent
30cffea8fa
commit
4338ee78c3
@ -509,7 +509,6 @@ void out_ascii(FILE *f, unsigned char *buf,int len);
|
||||
void out_data(FILE *f,char *buf1,int len, int per_line);
|
||||
void print_asc(int level, unsigned char *buf,int len);
|
||||
void dump_data(int level,char *buf1,int len);
|
||||
void dump_datac(int class, int level, char *buf1, int len);
|
||||
char *tab_depth(int depth);
|
||||
int str_checksum(const char *s);
|
||||
void zero_free(void *p, size_t size);
|
||||
@ -636,7 +635,6 @@ BOOL send_smb(int fd,char *buffer);
|
||||
BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type);
|
||||
int open_socket_in(int type, int port, int dlevel,uint32 socket_addr, BOOL rebind);
|
||||
int open_socket_out(int type, struct in_addr *addr, int port ,int timeout);
|
||||
void reset_globals_after_fork(void);
|
||||
void client_setfd(int fd);
|
||||
char *client_name(void);
|
||||
char *client_addr(void);
|
||||
@ -1272,8 +1270,6 @@ void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]);
|
||||
void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]);
|
||||
void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24);
|
||||
BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode);
|
||||
BOOL encode_pw_buffer(char buffer[516], const char *new_pass,
|
||||
int new_pw_len, BOOL nt_pass_set);
|
||||
BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd,
|
||||
int new_pwrd_size, uint32 *new_pw_len,
|
||||
uchar nt_p16[16], uchar p16[16]);
|
||||
@ -1863,6 +1859,7 @@ BOOL lp_use_rhosts(void);
|
||||
BOOL lp_readprediction(void);
|
||||
BOOL lp_readbmpx(void);
|
||||
BOOL lp_readraw(void);
|
||||
BOOL lp_large_readwrite(void);
|
||||
BOOL lp_writeraw(void);
|
||||
BOOL lp_null_passwords(void);
|
||||
BOOL lp_obey_pam_restrictions(void);
|
||||
@ -2204,6 +2201,7 @@ BOOL secrets_fetch_trust_account_password(char *domain, uint8 ret_pwd[16],
|
||||
time_t *pass_last_set_time);
|
||||
BOOL secrets_store_trust_account_password(char *domain, uint8 new_pwd[16]);
|
||||
BOOL trust_password_delete(char *domain);
|
||||
void reset_globals_after_fork(void);
|
||||
|
||||
/* The following definitions come from passdb/smbpassfile.c */
|
||||
|
||||
|
@ -1323,8 +1323,9 @@ char *strdup(char *s);
|
||||
#define CAP_LOCK_AND_READ 0x0100
|
||||
#define CAP_NT_FIND 0x0200
|
||||
#define CAP_DFS 0x1000
|
||||
#define CAP_W2K_SMBS 0x2000
|
||||
#define CAP_LARGE_READX 0x4000
|
||||
#define CAP_LARGE_WRITEX 0x8000
|
||||
#define CAP_LARGE_WRITEX 0x8000
|
||||
#define CAP_EXTENDED_SECURITY 0x80000000
|
||||
|
||||
/* protocol types. It assumes that higher protocols include lower protocols
|
||||
|
@ -250,6 +250,7 @@ typedef struct
|
||||
BOOL bObeyPamRestrictions;
|
||||
BOOL bLoadPrinters;
|
||||
BOOL bUseRhosts;
|
||||
BOOL bLargeReadwrite;
|
||||
BOOL bReadRaw;
|
||||
BOOL bWriteRaw;
|
||||
BOOL bReadPrediction;
|
||||
@ -780,6 +781,7 @@ static struct parm_struct parm_table[] = {
|
||||
{"Protocol Options", P_SEP, P_SEPARATOR},
|
||||
|
||||
{"protocol", P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0},
|
||||
{"large readwrite", P_BOOL, P_GLOBAL, &Globals.bLargeReadwrite, NULL, NULL, 0},
|
||||
{"max protocol", P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0},
|
||||
{"min protocol", P_ENUM, P_GLOBAL, &Globals.minprotocol, NULL, enum_protocol, 0},
|
||||
{"unicode", P_BOOL, P_GLOBAL, &Globals.bUnicode, NULL, NULL, 0},
|
||||
@ -1234,6 +1236,7 @@ static void init_globals(void)
|
||||
Globals.pwordlevel = 0;
|
||||
Globals.unamelevel = 0;
|
||||
Globals.deadtime = 0;
|
||||
Globals.bLargeReadwrite = False;
|
||||
Globals.max_log_size = 5000;
|
||||
Globals.max_open_files = MAX_OPEN_FILES;
|
||||
Globals.maxprotocol = PROTOCOL_NT1;
|
||||
@ -1530,6 +1533,7 @@ FN_GLOBAL_BOOL(lp_use_rhosts, &Globals.bUseRhosts)
|
||||
FN_GLOBAL_BOOL(lp_readprediction, &Globals.bReadPrediction)
|
||||
FN_GLOBAL_BOOL(lp_readbmpx, &Globals.bReadbmpx)
|
||||
FN_GLOBAL_BOOL(lp_readraw, &Globals.bReadRaw)
|
||||
FN_GLOBAL_BOOL(lp_large_readwrite, &Globals.bLargeReadwrite)
|
||||
FN_GLOBAL_BOOL(lp_writeraw, &Globals.bWriteRaw)
|
||||
FN_GLOBAL_BOOL(lp_null_passwords, &Globals.bNullPasswords)
|
||||
FN_GLOBAL_BOOL(lp_obey_pam_restrictions, &Globals.bObeyPamRestrictions)
|
||||
|
@ -160,7 +160,8 @@ static int reply_nt1(char *outbuf)
|
||||
/* dual names + lock_and_read + nt SMBs + remote API calls */
|
||||
int capabilities = CAP_NT_FIND|CAP_LOCK_AND_READ|CAP_LEVEL_II_OPLOCKS|
|
||||
(lp_nt_smb_support() ? CAP_NT_SMBS | CAP_RPC_REMOTE_APIS : 0) |
|
||||
CAP_LARGE_READX | CAP_LARGE_WRITEX |
|
||||
((lp_large_readwrite() && (SMB_OFF_T_BITS == 64)) ?
|
||||
CAP_LARGE_READX | CAP_LARGE_WRITEX | CAP_W2K_SMBS : 0) |
|
||||
(SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES : 0);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user