Unix SMB/Netbios implementation.
Version 1.9.
SMB parameters and setup
- Copyright (C) Andrew Tridgell 1992-1997
- Copyright (C) John H Terpstra 1996-1997
- Copyright (C) Luke Kenneth Casson Leighton 1996-1997
- Copyright (C) Paul Ashton 1997
+ Copyright (C) Andrew Tridgell 1992-1998
+ Copyright (C) John H Terpstra 1996-1998
+ Copyright (C) Luke Kenneth Casson Leighton 1996-1998
+ Copyright (C) Paul Ashton 1998
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
#ifndef _SMB_H
#define _SMB_H
-#ifndef MAX_CONNECTIONS
-#define MAX_CONNECTIONS 127
-#endif
-
-#ifndef MAX_OPEN_FILES
-#define MAX_OPEN_FILES 50
-#endif
-
-#ifndef GUEST_ACCOUNT
-#define GUEST_ACCOUNT "nobody"
-#endif
-
#define BUFFER_SIZE (0xFFFF)
#define SAFETY_MARGIN 1024
-/* Default size of shared memory used for share mode locking */
-#ifndef SHMEM_SIZE
-#define SHMEM_SIZE 102400
-#endif
-
#define NMB_PORT 137
#define DGRAM_PORT 138
#define SMB_PORT 139
struct current_user
{
- int cnum, id;
+ int cnum, vuid;
int uid, gid;
int ngroups;
gid_t *groups;
int pos;
uint32 size;
int mode;
- int uid;
+ int vuid;
char *mmap_ptr;
uint32 mmap_size;
write_bmpx_struct *wbmpx_ptr;
BOOL print_file;
BOOL modified;
BOOL granted_oplock;
+ BOOL sent_oplock_break;
+ BOOL reserved;
char *name;
} files_struct;
int num_files_open;
name_compare_entry *hide_list; /* Per-share list of files to return as hidden. */
name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */
+ name_compare_entry *veto_oplock_list; /* Per-share list of files to refuse oplocks on. */
} connection_struct;
BOOL (*stop_mgmt)(void);
BOOL (*lock_entry)(int , uint32 , uint32 , int *);
BOOL (*unlock_entry)(int , uint32 , uint32 , int );
- BOOL (*get_entries)(int , int , uint32 , uint32 , share_mode_entry **);
+ int (*get_entries)(int , int , uint32 , uint32 , share_mode_entry **);
void (*del_entry)(int , int );
BOOL (*set_entry)(int , int , uint16 , uint16 );
BOOL (*remove_oplock)(int , int);
/* each implementation of the shared memory code needs
to support the following operations */
struct shmem_ops {
- BOOL (*close)( void );
- int (*alloc)(int );
- BOOL (*free)(int );
+ BOOL (*shm_close)( void );
+ int (*shm_alloc)(int );
+ BOOL (*shm_free)(int );
int (*get_userdef_off)(void);
void *(*offset2addr)(int );
int (*addr2offset)(void *addr);
time_t start;
};
+/* This is used by smbclient to send it to a smbfs mount point */
+struct connection_options {
+ int protocol;
+ /* Connection-Options */
+ uint32 max_xmit;
+ uint16 server_uid;
+ uint16 tid;
+ /* The following are LANMAN 1.0 options */
+ uint16 sec_mode;
+ uint16 max_mux;
+ uint16 max_vcs;
+ uint16 rawmode;
+ uint32 sesskey;
+ /* The following are NT LM 0.12 options */
+ uint32 maxraw;
+ uint32 capabilities;
+ uint16 serverzone;
+};
+
#ifndef LOCKING_VERSION
#define LOCKING_VERSION 4
#endif /* LOCKING_VERSION */
#define MAP_ARCHIVE(cnum) (OPEN_CNUM(cnum) && lp_map_archive(SNUM(cnum)))
#define IS_HIDDEN_PATH(cnum,path) (is_in_path((path),Connections[(cnum)].hide_list))
#define IS_VETO_PATH(cnum,path) (is_in_path((path),Connections[(cnum)].veto_list))
+#define IS_VETO_OPLOCK_PATH(cnum,path) (is_in_path((path),Connections[(cnum)].veto_oplock_list))
#define SMBENCRYPT() (lp_encrypted_passwords())
#endif
/* Defines needed for multi-codepage support. */
+#define MSDOS_LATIN_1_CODEPAGE 850
#define KANJI_CODEPAGE 932
+#define HANGUL_CODEPAGE 949
+#define BIG5_CODEPAGE 950
#ifdef KANJI
/*
/*
* Default client code page - 850 - Western European
*/
-#define DEFAULT_CLIENT_CODE_PAGE 850
+#define DEFAULT_CLIENT_CODE_PAGE MSDOS_LATIN_1_CODEPAGE
#endif /* KANJI */
/*