summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-10-05 10:41:13 +0000
committerAndrew Tridgell <tridge@samba.org>1996-10-05 10:41:13 +0000
commite5893bdfbef0ac16772199d7ec6fac7d3e4f8431 (patch)
treec531a4507eead09e646760bfc7a7412bcca86522 /source3/include
parentc33d98d5731cf7901c11786b9cbfe25ac59e0b83 (diff)
downloadsamba-e5893bdfbef0ac16772199d7ec6fac7d3e4f8431.tar.gz
samba-e5893bdfbef0ac16772199d7ec6fac7d3e4f8431.tar.bz2
samba-e5893bdfbef0ac16772199d7ec6fac7d3e4f8431.zip
I have fixed quite a few important bugs in this commit.
Luke, can you take special note of the bug fixes to nmbd so you can propogate them to your new code. - rewrote the code that used to use fromhost(). We now call gethostbyaddr() only if necessary and a maximum of once per connection. Calling gethostbyaddr() causes problems on some systems so avoiding it if possible is a good thing :-) - added the "fake oplocks" option. See the docs in smb.conf(5) and Speed.txt - fixed a serious bug in nmbd where it would try a DNS lookup on FIND_SELF queries. This caused a lot of unnecessary (and incorrect) DNS lookups to happen. FIND_SELF queries should only go to the internal name tables. - don't set FIND_SELF for name queries if we are a wins proxy, as we are supposed to be answering queries for other hosts. - fixed a bug in nmbd which had "if (search | FIND_LOCAL)" instead of "if (search & FIND_LOCAL)". Luke, this was in nameservreply.c - the above 3 bugs together meant that DNS queries were being cached, but the cache wasn't being used, so every query was going to DNS, no wonder nmbd has been chewing so much CPU time! Another side effect was that queries on names in lmhosts weren't being answered for bcast queries with "wins proxy" set. - ignore the maxxmit for seconday session setups (see CIFS spec) - close user opened files in a uLogoffX for user level security (see CIFS spec) - added uid into the files struct to support the above change (This used to be commit ea472b7217b7693627a13a7b1e428a0a6a3d8755)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h6
-rw-r--r--source3/include/smb.h8
2 files changed, 5 insertions, 9 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 779f6bd87e..8c082a6140 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4,8 +4,7 @@
/*The following definitions come from access.c */
BOOL check_access(int snum);
-BOOL allow_access(char *deny_list,char *allow_list,struct from_host *client);
-BOOL fromhost(int sock,struct from_host *f);
+BOOL allow_access(char *deny_list,char *allow_list,char *cname,char *caddr);
/*The following definitions come from charcnv.c */
@@ -234,6 +233,7 @@ BOOL lp_widelinks(int );
BOOL lp_syncalways(int );
BOOL lp_map_system(int );
BOOL lp_delete_readonly(int );
+BOOL lp_fake_oplocks(int );
int lp_create_mode(int );
int lp_max_connections(int );
int lp_defaultcase(int );
@@ -913,6 +913,8 @@ int interpret_security(char *str,int def);
uint32 interpret_addr(char *str);
struct in_addr *interpret_addr2(char *str);
BOOL zero_ip(struct in_addr ip);
+char *client_name(void);
+char *client_addr(void);
void standard_sub_basic(char *s);
BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
int PutUniCode(char *dst,char *src);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index f5d35d5261..af6e24c4ab 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -293,6 +293,7 @@ typedef struct
int pos;
int size;
int mode;
+ int uid;
char *mmap_ptr;
int mmap_size;
write_bmpx_struct *wbmpx_ptr;
@@ -653,13 +654,6 @@ struct connect_record
#define ERRHRD 0x03 /* Error is an hardware error. */
#define ERRCMD 0xFF /* Command was not in the "SMB" format. */
-/* structure used to hold the incoming hosts info */
-struct from_host {
- char *name; /* host name */
- char *addr; /* host address */
- struct sockaddr_in *sin; /* their side of the link */
-};
-
#ifdef __STDC__
int Debug1(char *, ...);
#else