diff options
author | Luke Leighton <lkcl@samba.org> | 2000-01-12 21:14:07 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-01-12 21:14:07 +0000 |
commit | 4cedf26bdeaffdecdd890adfd453579726892e84 (patch) | |
tree | d96a25338bd016e8c9e701e79a8f24fd5dcb1bee /source/smbd | |
parent | 157976aca8c97b31c69d9ba84b80dc5ce62ba9bb (diff) | |
download | samba-4cedf26bdeaffdecdd890adfd453579726892e84.tar.gz |
client_name() and client_addr() don't work on the other side of an
msrpc unix socket as intended! have to move them about a bit.
also had to set up local_machine and remote_machine properly.
the whole standard_sub_basic() issue is... well, a bit of a mess,
when it comes to doing the right thing, predictably.
and that's _before_ the SAMBA_TNG daemon split.
Diffstat (limited to 'source/smbd')
-rw-r--r-- | source/smbd/connection.c | 3 | ||||
-rw-r--r-- | source/smbd/password.c | 6 | ||||
-rw-r--r-- | source/smbd/process.c | 4 | ||||
-rw-r--r-- | source/smbd/reply.c | 2 | ||||
-rw-r--r-- | source/smbd/service.c | 11 |
5 files changed, 10 insertions, 16 deletions
diff --git a/source/smbd/connection.c b/source/smbd/connection.c index 82f789f7a1a..fc025bc826a 100644 --- a/source/smbd/connection.c +++ b/source/smbd/connection.c @@ -60,7 +60,6 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO struct connections_key key; struct connections_data crec; TDB_DATA kbuf, dbuf; - extern int Client; if (max_connections <= 0) return(True); @@ -95,7 +94,7 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO crec.start = time(NULL); StrnCpy(crec.machine,remote_machine,sizeof(crec.machine)-1); - StrnCpy(crec.addr,conn?conn->client_address:client_addr(Client),sizeof(crec.addr)-1); + StrnCpy(crec.addr,conn?conn->client_address:client_connection_addr(),sizeof(crec.addr)-1); dbuf.dptr = (char *)&crec; dbuf.dsize = sizeof(crec); diff --git a/source/smbd/password.c b/source/smbd/password.c index d2d3e5b0016..7b6668c04d9 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -580,8 +580,7 @@ BOOL check_hosts_equiv(char *user) /* note: don't allow hosts.equiv on root */ if (fname && *fname && (pass->pw_uid != 0)) { - extern int Client; - if (check_user_equiv(user,client_name(Client),fname)) + if (check_user_equiv(user,client_connection_name(),fname)) return(True); } @@ -589,9 +588,8 @@ BOOL check_hosts_equiv(char *user) { char *home = get_unixhome_dir(user); if (home) { - extern int Client; slprintf(rhostsfile, sizeof(rhostsfile)-1, "%s/.rhosts", home); - if (check_user_equiv(user,client_name(Client),rhostsfile)) + if (check_user_equiv(user,client_connection_name(),rhostsfile)) return(True); } } diff --git a/source/smbd/process.c b/source/smbd/process.c index 95222d3f51e..b1cf986dbf6 100644 --- a/source/smbd/process.c +++ b/source/smbd/process.c @@ -559,7 +559,7 @@ void process_smb(char *inbuf, char *outbuf) name" */ static unsigned char buf[5] = {0x83, 0, 0, 1, 0x81}; DEBUG( 1, ( "Connection denied from %s\n", - client_addr(Client) ) ); + client_connection_addr() ) ); send_smb(Client,(char *)buf); exit_server("connection denied"); } @@ -779,7 +779,7 @@ void smbd_process(void) extern fstring remote_machine; extern fstring local_machine; - fstrcpy(remote_machine, dns_to_netbios_name(client_name(Client))); + fstrcpy(remote_machine, dns_to_netbios_name(client_connection_name())); fstrcpy(local_machine, global_myname); remote_machine[15] = 0; local_machine[15] = 0; diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 0360f77a04b..d46d5b92656 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -55,7 +55,7 @@ static void overflow_attack(int len) dbgtext( "ERROR: Invalid password length %d.\n", len ); dbgtext( "Your machine may be under attack by someone " ); dbgtext( "attempting to exploit an old bug.\n" ); - dbgtext( "Attack was from IP = %s.\n", client_addr(Client) ); + dbgtext( "Attack was from IP = %s.\n", client_connection_addr() ); } exit_server("possible attack"); } diff --git a/source/smbd/service.c b/source/smbd/service.c index 1945ceefe45..a778c44e83c 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -207,7 +207,6 @@ connection_struct *make_connection(char *service,char *user, snum = find_service(service); if (snum < 0) { - extern int Client; if (strequal(service,"IPC$")) { DEBUG(3,("refusing IPC connection\n")); *ecode = ERRnoipc; @@ -215,7 +214,7 @@ connection_struct *make_connection(char *service,char *user, } DEBUG(0,("%s (%s) couldn't find service %s\n", - remote_machine, client_addr(Client), service)); + remote_machine, client_connection_addr(), service)); *ecode = ERRinvnetname; return NULL; } @@ -337,7 +336,7 @@ connection_struct *make_connection(char *service,char *user, conn->vuid = vuid; conn->uid = pass->pw_uid; conn->gid = pass->pw_gid; - safe_strcpy(conn->client_address, client_addr(Client), sizeof(conn->client_address)-1); + safe_strcpy(conn->client_address, client_connection_addr(), sizeof(conn->client_address)-1); conn->num_files_open = 0; conn->lastused = time(NULL); conn->service = snum; @@ -518,9 +517,8 @@ connection_struct *make_connection(char *service,char *user, } if( DEBUGLVL( IS_IPC(conn) ? 3 : 1 ) ) { - extern int Client; - dbgtext( "%s (%s) ", remote_machine, client_addr(Client) ); + dbgtext( "%s (%s) ", remote_machine, client_connection_addr() ); dbgtext( "connect to service %s ", lp_servicename(SNUM(conn))); dbgtext( "as user %s ", user ); dbgtext( "(uid=%d, gid=%d) ", (int)conn->uid, (int)conn->gid ); @@ -581,13 +579,12 @@ close a cnum ****************************************************************************/ void close_cnum(connection_struct *conn, uint16 vuid) { - extern int Client; DirCacheFlush(SNUM(conn)); unbecome_user(); DEBUG(IS_IPC(conn)?3:1, ("%s (%s) closed connection to service %s\n", - remote_machine,client_addr(Client), + remote_machine,client_connection_addr(), lp_servicename(SNUM(conn)))); if (conn->vfs_ops.disconnect != NULL) { |