summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/smb.h1
-rw-r--r--source3/libsmb/clientgen.c4
-rw-r--r--source3/smbd/server.c8
3 files changed, 7 insertions, 6 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index d7c8084038..88890de374 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -34,6 +34,7 @@
#define NMB_PORT 137
#define DGRAM_PORT 138
#define SMB_PORT 139
+#define SMB_PORT2 445
#define False (0)
#define True (1)
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index efed3555ba..3e31b980c4 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -2517,7 +2517,7 @@ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
}
- if (port == 0) port = 445;
+ if (port == 0) port = SMB_PORT2;
cli->fd = open_socket_out(SOCK_STREAM, &cli->dest_ip,
port, cli->timeout);
@@ -2527,7 +2527,7 @@ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
{
return False;
}
- port = 139;
+ port = SMB_PORT;
cli->fd = open_socket_out(SOCK_STREAM, &cli->dest_ip,
port, cli->timeout);
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 04d369df04..9d006fd176 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -82,7 +82,7 @@ static BOOL open_sockets_inetd(void)
/* We will abort gracefully when the client or remote system
goes away */
Client = dup(0);
- ClientPort = 138;
+ ClientPort = SMB_PORT;
/* close our standard file descriptors */
close_low_fds();
@@ -218,12 +218,12 @@ max can be %d\n",
for(i = 0; i < num_interfaces; i++) {
if(FD_ISSET(fd_listenset[i * 2],&lfds)) {
s = fd_listenset[i * 2];
- ClientPort = 138;
+ ClientPort = SMB_PORT;
break;
}
if(FD_ISSET(fd_listenset[i * 2 + 1],&lfds)) {
s = fd_listenset[i * 2 + 1];
- ClientPort = 445;
+ ClientPort = SMB_PORT2;
break;
}
}
@@ -508,7 +508,7 @@ static void usage(char *pname)
/* shall I run as a daemon */
BOOL is_daemon = False;
int port = SMB_PORT;
- int port445 = 445;
+ int port445 = SMB_PORT2;
int opt;
extern char *optarg;