summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-04-16 14:11:08 -0700
committerJeremy Allison <jra@samba.org>2013-06-11 10:50:41 -0700
commitccb5c2d6930eeb7672af33833adb195d0c525547 (patch)
tree077d184726da17d4a7994d947ad9080c9cf5b0ab
parentda6c84aff0b4b01ae1bf3d31cbc4e8e176168a9a (diff)
downloadsamba-ccb5c2d6930eeb7672af33833adb195d0c525547.tar.gz
samba-ccb5c2d6930eeb7672af33833adb195d0c525547.tar.bz2
samba-ccb5c2d6930eeb7672af33833adb195d0c525547.zip
Add the port argument to SMBC_server().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
-rw-r--r--source3/include/libsmb_internal.h1
-rw-r--r--source3/libsmb/libsmb_dir.c22
-rw-r--r--source3/libsmb/libsmb_file.c2
-rw-r--r--source3/libsmb/libsmb_printjob.c4
-rw-r--r--source3/libsmb/libsmb_server.c3
-rw-r--r--source3/libsmb/libsmb_stat.c2
-rw-r--r--source3/libsmb/libsmb_xattr.c6
7 files changed, 21 insertions, 19 deletions
diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h
index 5a3df14e36..bd06b53e6c 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -474,6 +474,7 @@ SMBC_server(TALLOC_CTX *ctx,
SMBCCTX *context,
bool connect_if_not_found,
const char *server,
+ uint16_t port,
const char *share,
char **pp_workgroup,
char **pp_username,
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
index 5428b17258..87e10d8abc 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -581,7 +581,7 @@ SMBC_opendir_ctx(SMBCCTX *context,
* workgroups/domains that it knows about.
*/
- srv = SMBC_server(frame, context, True, server, "IPC$",
+ srv = SMBC_server(frame, context, True, server, port, "IPC$",
&workgroup, &user, &password);
if (!srv) {
continue;
@@ -636,7 +636,7 @@ SMBC_opendir_ctx(SMBCCTX *context,
* exist.
*/
srv = SMBC_server(frame, context, False,
- server, "IPC$",
+ server, port, "IPC$",
&workgroup, &user, &password);
/*
@@ -685,7 +685,7 @@ SMBC_opendir_ctx(SMBCCTX *context,
* we do not already have one
*/
srv = SMBC_server(frame, context, True,
- buserver, "IPC$",
+ buserver, port, "IPC$",
&workgroup,
&user, &password);
if (!srv) {
@@ -721,7 +721,7 @@ SMBC_opendir_ctx(SMBCCTX *context,
*/
if (!srv) {
srv = SMBC_server(frame, context, True,
- server, "IPC$",
+ server, port, "IPC$",
&workgroup,
&user, &password);
}
@@ -783,7 +783,7 @@ SMBC_opendir_ctx(SMBCCTX *context,
/* We connect to the server and list the directory */
dir->dir_type = SMBC_FILE_SHARE;
- srv = SMBC_server(frame, context, True, server, share,
+ srv = SMBC_server(frame, context, True, server, port, share,
&workgroup, &user, &password);
if (!srv) {
@@ -1208,7 +1208,7 @@ SMBC_mkdir_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
@@ -1319,7 +1319,7 @@ SMBC_rmdir_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
@@ -1608,7 +1608,7 @@ SMBC_chmod_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
TALLOC_FREE(frame);
@@ -1726,7 +1726,7 @@ SMBC_utimes_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
TALLOC_FREE(frame);
@@ -1805,7 +1805,7 @@ SMBC_unlink_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
TALLOC_FREE(frame);
@@ -1979,7 +1979,7 @@ SMBC_rename_ctx(SMBCCTX *ocontext,
}
srv = SMBC_server(frame, ocontext, True,
- server1, share1, &workgroup, &user1, &password1);
+ server1, port1, share1, &workgroup, &user1, &password1);
if (!srv) {
TALLOC_FREE(frame);
return -1;
diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c
index 06d09ac7bd..822491bda8 100644
--- a/source3/libsmb/libsmb_file.c
+++ b/source3/libsmb/libsmb_file.c
@@ -91,7 +91,7 @@ SMBC_open_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
if (errno == EPERM) errno = EACCES;
TALLOC_FREE(frame);
diff --git a/source3/libsmb/libsmb_printjob.c b/source3/libsmb/libsmb_printjob.c
index 3189463cf2..3f6be3e92d 100644
--- a/source3/libsmb/libsmb_printjob.c
+++ b/source3/libsmb/libsmb_printjob.c
@@ -235,7 +235,7 @@ SMBC_list_print_jobs_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
TALLOC_FREE(frame);
@@ -313,7 +313,7 @@ SMBC_unlink_print_job_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
TALLOC_FREE(frame);
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index 92a36912d3..91859fa0b2 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -629,6 +629,7 @@ SMBC_server(TALLOC_CTX *ctx,
SMBCCTX *context,
bool connect_if_not_found,
const char *server,
+ uint16_t port,
const char *share,
char **pp_workgroup,
char **pp_username,
@@ -699,7 +700,7 @@ SMBC_attr_server(TALLOC_CTX *ctx,
* i.e., a normal share or a referred share from
* 'msdfs proxy' share.
*/
- srv = SMBC_server(ctx, context, true, server, share,
+ srv = SMBC_server(ctx, context, true, server, port, share,
pp_workgroup, pp_username, pp_password);
if (!srv) {
return NULL;
diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c
index f87e2d34bd..9c5be33be4 100644
--- a/source3/libsmb/libsmb_stat.c
+++ b/source3/libsmb/libsmb_stat.c
@@ -164,7 +164,7 @@ SMBC_stat_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
TALLOC_FREE(frame);
return -1; /* errno set by SMBC_server */
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 62cf4a1e40..22ffa8ff87 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -1768,7 +1768,7 @@ SMBC_setxattr_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
TALLOC_FREE(frame);
return -1; /* errno set by SMBC_server */
@@ -2063,7 +2063,7 @@ SMBC_getxattr_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
TALLOC_FREE(frame);
return -1; /* errno set by SMBC_server */
@@ -2200,7 +2200,7 @@ SMBC_removexattr_ctx(SMBCCTX *context,
}
srv = SMBC_server(frame, context, True,
- server, share, &workgroup, &user, &password);
+ server, port, share, &workgroup, &user, &password);
if (!srv) {
TALLOC_FREE(frame);
return -1; /* errno set by SMBC_server */