summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-17 06:13:32 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-17 06:13:32 +0000
commit983dc71c9844675ad364f3ea59ddd04b87857b55 (patch)
treeda678802d17eb72c9e1717d5333e861b76b9920c /source3/include/smb.h
parent4a68715c2518a2d3c2eb4282b503c1ef7857b9d0 (diff)
downloadsamba-983dc71c9844675ad364f3ea59ddd04b87857b55.tar.gz
samba-983dc71c9844675ad364f3ea59ddd04b87857b55.tar.bz2
samba-983dc71c9844675ad364f3ea59ddd04b87857b55.zip
moved connection_struct handling code into smbd/conn.c and changed it
to a linked list with bitmap format. (This used to be commit b7aaab1b6b2d2f72b2bb7c11f5c7bf081a6093d9)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h7
1 files changed, 3 insertions, 4 deletions
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))