summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/local.h6
-rw-r--r--source3/include/proto.h12
-rw-r--r--source3/include/smb.h7
3 files changed, 14 insertions, 11 deletions
diff --git a/source3/include/local.h b/source3/include/local.h
index 1db1e9d4c1..ead97e565d 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -39,12 +39,6 @@
#define SYSLOG_FACILITY LOG_DAEMON
#endif
-/* set these to define the limits of the server. NOTE These are on a
- per-client basis. Thus any one machine can't connect to more than
- MAX_CONNECTIONS services, but any number of machines may connect at
- one time. */
-#define MAX_CONNECTIONS 127
-
/* Default size of shared memory used for share mode locking */
#ifndef SHMEM_SIZE
#define SHMEM_SIZE (1024*1024)
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 0b5067e480..4c7c625397 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1912,6 +1912,17 @@ BOOL check_oem_password(char *user, unsigned char *data,
int new_passwd_size);
BOOL change_oem_password(struct smb_passwd *smbpw, char *new_passwd, BOOL override);
+/*The following definitions come from smbd/conn.c */
+
+void conn_init(void);
+int conn_num_open(void);
+BOOL conn_snum_used(int snum);
+connection_struct *conn_find(int cnum);
+connection_struct *conn_new(void);
+void conn_close_all(void);
+BOOL conn_idle_all(time_t t, int deadtime);
+void conn_free(connection_struct *conn);
+
/*The following definitions come from smbd/connection.c */
BOOL yield_connection(connection_struct *conn,char *name,int max_connections);
@@ -2160,7 +2171,6 @@ BOOL oplock_break(uint32 dev, uint32 inode, struct timeval *tval);
BOOL request_oplock_break(share_mode_entry *share_entry,
uint32 dev, uint32 inode);
BOOL receive_next_smb(int smbfd, int oplockfd, char *inbuf, int bufsize, int timeout);
-BOOL snum_used(int snum);
BOOL reload_services(BOOL test);
connection_struct *make_connection(char *service,char *user,char *password, int pwlen, char *dev,uint16 vuid, int *ecode);
BOOL attempt_close_oplocked_file(files_struct *fsp);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 2f2363ba71..c68f88cbdd 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -531,14 +531,14 @@ typedef struct
BOOL is_wild;
} name_compare_entry;
-typedef struct
+typedef struct connection_struct
{
+ struct connection_struct *next, *prev;
unsigned cnum; /* an index passed over the wire */
int service;
BOOL force_user;
struct uid_cache uid_cache;
void *dirptr;
- BOOL open;
BOOL printer;
BOOL ipc;
BOOL read_only;
@@ -865,7 +865,6 @@ struct bitmap {
/* these are useful macros for checking validity of handles */
#define OPEN_FSP(fsp) ((fsp) && (fsp)->open && !(fsp)->is_directory)
-#define VALID_CNUM(cnum) (((cnum) >= 0) && ((cnum) < MAX_CONNECTIONS))
#define OPEN_CONN(conn) ((conn) && (conn)->open)
#define IS_IPC(conn) ((conn) && (conn)->ipc)
#define IS_PRINT(conn) ((conn) && (conn)->printer)
@@ -888,7 +887,7 @@ struct bitmap {
#define PRINTCAP (lp_printcapname())
#define PRINTCOMMAND(snum) (lp_printcommand(snum))
#define PRINTERNAME(snum) (lp_printername(snum))
-#define CAN_WRITE(conn) (OPEN_CONN(conn) && !conn->read_only)
+#define CAN_WRITE(conn) (!conn->read_only)
#define VALID_SNUM(snum) (lp_snum_ok(snum))
#define GUEST_OK(snum) (VALID_SNUM(snum) && lp_guest_ok(snum))
#define GUEST_ONLY(snum) (VALID_SNUM(snum) && lp_guest_only(snum))