summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-14 10:22:12 +0200
committerVolker Lendecke <vl@samba.org>2010-08-16 13:13:10 +0200
commit96ae4570230d2d47e23da6909f6e21dd43a19868 (patch)
tree2227d283971d61991b7859ef05a8390e37eb00ee /source3/smbd
parenta482b3e14ec4e3eada9c2477c9eae2bfbe017f53 (diff)
downloadsamba-96ae4570230d2d47e23da6909f6e21dd43a19868.tar.gz
samba-96ae4570230d2d47e23da6909f6e21dd43a19868.tar.bz2
samba-96ae4570230d2d47e23da6909f6e21dd43a19868.zip
s3: Remove get_client_fd()
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c2
-rw-r--r--source3/smbd/server.c5
-rw-r--r--source3/smbd/service.c4
-rw-r--r--source3/smbd/session.c6
-rw-r--r--source3/smbd/sesssetup.c2
5 files changed, 7 insertions, 12 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index f40b7dda4b..9ce4bbb6f5 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2352,7 +2352,7 @@ static void release_ip(const char *ip, void *priv)
char addr[INET6_ADDRSTRLEN];
char *p = addr;
- client_socket_addr(get_client_fd(),addr,sizeof(addr));
+ client_socket_addr(smbd_server_fd(),addr,sizeof(addr));
if (strncmp("::ffff:", addr, 7) == 0) {
p = addr + 7;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 1c614dad0b..3c79dc46f9 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -62,11 +62,6 @@ static void smbd_set_server_fd(int fd)
server_fd = fd;
}
-int get_client_fd(void)
-{
- return server_fd;
-}
-
struct event_context *smbd_event_context(void)
{
return server_event_context();
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 9a345476dc..d32e53a568 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -690,7 +690,7 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn,
add_session_user(sconn, conn->server_info->unix_name);
safe_strcpy(conn->client_address,
- client_addr(get_client_fd(),addr,sizeof(addr)),
+ client_addr(smbd_server_fd(),addr,sizeof(addr)),
sizeof(conn->client_address)-1);
conn->num_files_open = 0;
conn->lastused = conn->lastused_count = time(NULL);
@@ -1199,7 +1199,7 @@ connection_struct *make_connection(struct smbd_server_connection *sconn,
DEBUG(3,("%s (%s) couldn't find service %s\n",
get_remote_machine_name(),
- client_addr(get_client_fd(),addr,sizeof(addr)),
+ client_addr(smbd_server_fd(),addr,sizeof(addr)),
service));
*status = NT_STATUS_BAD_NETWORK_NAME;
return NULL;
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index 64274b771e..92742384bf 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -131,9 +131,9 @@ bool session_claim(struct server_id pid, user_struct *vuser)
client_name() handles this case internally.
*/
- hostname = client_name(get_client_fd());
+ hostname = client_name(smbd_server_fd());
if (strcmp(hostname, "UNKNOWN") == 0) {
- hostname = client_addr(get_client_fd(),addr,sizeof(addr));
+ hostname = client_addr(smbd_server_fd(),addr,sizeof(addr));
}
fstrcpy(sessionid.username, vuser->server_info->unix_name);
@@ -144,7 +144,7 @@ bool session_claim(struct server_id pid, user_struct *vuser)
sessionid.gid = vuser->server_info->utok.gid;
fstrcpy(sessionid.remote_machine, get_remote_machine_name());
fstrcpy(sessionid.ip_addr_str,
- client_addr(get_client_fd(),addr,sizeof(addr)));
+ client_addr(smbd_server_fd(),addr,sizeof(addr)));
sessionid.connect_start = time(NULL);
if (!smb_pam_claim_session(sessionid.username, sessionid.id_str,
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index cca3a1abf6..1d8fe16203 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -1420,7 +1420,7 @@ static void setup_new_vc_session(struct messaging_context *msg_ctx)
char addr[INET6_ADDRSTRLEN];
struct shutdown_state state;
- state.ip = client_addr(get_client_fd(),addr,sizeof(addr));
+ state.ip = client_addr(smbd_server_fd(),addr,sizeof(addr));
state.msg_ctx = msg_ctx;
connections_forall_read(shutdown_other_smbds, &state);
}