diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/local.h | 12 | ||||
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/include/smb.h | 19 |
3 files changed, 18 insertions, 15 deletions
diff --git a/source3/include/local.h b/source3/include/local.h index f32700c0eb..4a69325b77 100644 --- a/source3/include/local.h +++ b/source3/include/local.h @@ -37,19 +37,19 @@ #define MAX_CONNECTIONS 127 #define MAX_OPEN_FILES 100 +/* max number of directories open at once */ +/* note that with the new directory code this no longer requires a + file handle per directory, but large numbers do use more memory */ +#define MAX_OPEN_DIRECTORIES 64 + /* Default size of shared memory used for share mode locking */ #ifndef SHMEM_SIZE -#define SHMEM_SIZE (1024*MAX_OPEN_FILES) +#define SHMEM_SIZE (1024*(MAX_OPEN_FILES+MAX_OPEN_DIRECTORIES)) #endif /* the max number of simultanous connections to the server by all clients */ #define MAXSTATUS 100000 -/* max number of directories open at once */ -/* note that with the new directory code this no longer requires a - file handle per directory, but large numbers do use more memory */ -#define MAXDIR 64 - #define WORDMAX 0xFFFF /* the maximum password length before we declare a likely attack */ diff --git a/source3/include/proto.h b/source3/include/proto.h index 3acfb0cf5e..b390cb60d9 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1815,6 +1815,8 @@ int sys_disk_free(char *path,int *bsize,int *dfree,int *dsize); BOOL check_name(char *name,int cnum); void sync_file(int fnum); void close_file(int fnum, BOOL normal_close); +void close_directory(int fnum); +void open_directory(int fnum,int cnum,char *fname, int *action); BOOL check_file_sharing(int cnum,char *fname, BOOL rename_op); int check_share_mode( share_mode_entry *share, int deny_mode, char *fname, BOOL fcbopen, int *flags); diff --git a/source3/include/smb.h b/source3/include/smb.h index ca295f3b42..921cb4284d 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -418,14 +418,14 @@ typedef struct /* Structure used when SMBwritebmpx is active */ typedef struct - { - int wr_total_written; /* So we know when to discard this */ - int32 wr_timeout; - int32 wr_errclass; - int32 wr_error; /* Cached errors */ - BOOL wr_mode; /* write through mode) */ - BOOL wr_discard; /* discard all further data */ - } write_bmpx_struct; +{ + int wr_total_written; /* So we know when to discard this */ + int32 wr_timeout; + int32 wr_errclass; + int32 wr_error; /* Cached errors */ + BOOL wr_mode; /* write through mode) */ + BOOL wr_discard; /* discard all further data */ +} write_bmpx_struct; /* * Structure used to indirect fd's from the files_struct. @@ -467,6 +467,7 @@ typedef struct BOOL modified; BOOL granted_oplock; BOOL sent_oplock_break; + BOOL is_directory; BOOL reserved; char *name; } files_struct; @@ -781,7 +782,7 @@ struct parm_struct /* these are useful macros for checking validity of handles */ #define VALID_FNUM(fnum) (((fnum) >= 0) && ((fnum) < MAX_OPEN_FILES)) -#define OPEN_FNUM(fnum) (VALID_FNUM(fnum) && Files[fnum].open) +#define OPEN_FNUM(fnum) (VALID_FNUM(fnum) && Files[fnum].open && !Files[fnum].is_directory) #define VALID_CNUM(cnum) (((cnum) >= 0) && ((cnum) < MAX_CONNECTIONS)) #define OPEN_CNUM(cnum) (VALID_CNUM(cnum) && Connections[cnum].open) #define IS_IPC(cnum) (VALID_CNUM(cnum) && Connections[cnum].ipc) |