[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Tue Feb 13 20:08:03 UTC 2018
The branch, master has been updated
via 36bb685 libsocket: Avoid an unnecessary else branch
via 46148e6 net: Slightly simplify net_lookup_dsgetdcname()
via 093871d dsgetdcname: Add some const
via 3781dba libsmb: Fix an error path memleak
via aa29a69 libsmb: Fix destructor setup in unexpected.c
via f7cc3db libcli: Fix a cut&paste typo
via 77c1df5 net: Add some {}
via 44dcd5d nbt_server: Fix a typo
via 6f23615 libnbt: Apply some const
via 494dc70 libnbt: Use TALLOC_FREE
from d09bd97 docs: Fix smbpasswd manpage about password storage
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 36bb685abde872f43c3e23150119c3af91dea569
Author: Volker Lendecke <vl at samba.org>
Date: Sun Feb 4 15:13:43 2018 +0000
libsocket: Avoid an unnecessary else branch
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Tue Feb 13 21:07:17 CET 2018 on sn-devel-144
commit 46148e657f5d53b0d83dbcead9a8b8d0bd0baf21
Author: Volker Lendecke <vl at samba.org>
Date: Sun Feb 4 15:48:23 2018 +0000
net: Slightly simplify net_lookup_dsgetdcname()
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 093871d931a9c925f3a858e2963d8f36988282ac
Author: Volker Lendecke <vl at samba.org>
Date: Fri Jan 12 22:16:39 2018 +0100
dsgetdcname: Add some const
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 3781dba923fc01ffa32ea1e15adb847bccae44bb
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jan 30 13:47:35 2018 +0100
libsmb: Fix an error path memleak
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit aa29a695fbd0a1f881a2434fd1ce2bdef1d213ce
Author: Volker Lendecke <vl at samba.org>
Date: Wed Feb 7 08:55:03 2018 +0100
libsmb: Fix destructor setup in unexpected.c
The destructor does DLIST_REMOVE, so better make sure "client" is in fact
member of that list when the destructor fires
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit f7cc3db3f3ab93bc02a3446ad89a58b8eef00e8b
Author: Volker Lendecke <vl at samba.org>
Date: Sun Feb 4 16:41:04 2018 +0000
libcli: Fix a cut&paste typo
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 77c1df57a87b483c35ca01ede13d40980d3e1a96
Author: Volker Lendecke <vl at samba.org>
Date: Sun Feb 4 15:45:57 2018 +0000
net: Add some {}
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 44dcd5d094c5d44d6cc1e94c9be2e5b78f514acf
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jan 29 10:17:11 2018 +0100
nbt_server: Fix a typo
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 6f23615956fee987f7cce85b724633790c5f64b6
Author: Volker Lendecke <vl at samba.org>
Date: Fri Feb 2 13:13:31 2018 +0100
libnbt: Apply some const
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 494dc70f69804e2d703b382a56406d69e984e9f1
Author: Volker Lendecke <vl at samba.org>
Date: Sat Feb 3 12:48:35 2018 +0000
libnbt: Use TALLOC_FREE
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
libcli/nbt/libnbt.h | 4 +++-
libcli/nbt/nbtname.c | 4 +++-
libcli/nbt/nbtsocket.c | 5 +----
source3/libsmb/dsgetdcname.c | 22 ++++++++++++----------
source3/libsmb/unexpected.c | 4 +++-
source3/utils/net_lookup.c | 7 ++++---
source4/lib/socket/socket_ip.c | 3 ++-
source4/libcli/dgram/netlogon.c | 2 +-
source4/nbt_server/interfaces.c | 2 +-
9 files changed, 30 insertions(+), 23 deletions(-)
Changeset truncated at 500 lines:
diff --git a/libcli/nbt/libnbt.h b/libcli/nbt/libnbt.h
index d4813b9..f721278 100644
--- a/libcli/nbt/libnbt.h
+++ b/libcli/nbt/libnbt.h
@@ -291,7 +291,9 @@ NTSTATUS nbt_name_status_recv(struct nbt_name_request *req,
NTSTATUS nbt_name_status(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_status *io);
-NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struct nbt_name *newname);
+NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx,
+ const struct nbt_name *name,
+ struct nbt_name *newname);
NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct nbt_name *name);
NTSTATUS nbt_name_from_blob(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, struct nbt_name *name);
void nbt_choose_called_name(TALLOC_CTX *mem_ctx, struct nbt_name *n, const char *name, int type);
diff --git a/libcli/nbt/nbtname.c b/libcli/nbt/nbtname.c
index d73dde1..ec2b395 100644
--- a/libcli/nbt/nbtname.c
+++ b/libcli/nbt/nbtname.c
@@ -190,7 +190,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags
/**
copy a nbt name structure
*/
-_PUBLIC_ NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struct nbt_name *newname)
+_PUBLIC_ NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx,
+ const struct nbt_name *name,
+ struct nbt_name *newname)
{
*newname = *name;
newname->name = talloc_strdup(mem_ctx, newname->name);
diff --git a/libcli/nbt/nbtsocket.c b/libcli/nbt/nbtsocket.c
index dacacae..d7abb1b 100644
--- a/libcli/nbt/nbtsocket.c
+++ b/libcli/nbt/nbtsocket.c
@@ -45,10 +45,7 @@ static int nbt_name_request_destructor(struct nbt_name_request *req)
idr_remove(req->nbtsock->idr, req->name_trn_id);
req->name_trn_id = 0;
}
- if (req->te) {
- talloc_free(req->te);
- req->te = NULL;
- }
+ TALLOC_FREE(req->te);
if (req->nbtsock->send_queue == NULL) {
TEVENT_FD_NOT_WRITEABLE(req->nbtsock->fde);
}
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index f15456a..2fb9842 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -35,11 +35,12 @@ struct ip_service_name {
const char *hostname;
};
-static NTSTATUS make_dc_info_from_cldap_reply(TALLOC_CTX *mem_ctx,
- uint32_t flags,
- struct sockaddr_storage *ss,
- struct NETLOGON_SAM_LOGON_RESPONSE_EX *r,
- struct netr_DsRGetDCNameInfo **info);
+static NTSTATUS make_dc_info_from_cldap_reply(
+ TALLOC_CTX *mem_ctx,
+ uint32_t flags,
+ const struct sockaddr_storage *ss,
+ struct NETLOGON_SAM_LOGON_RESPONSE_EX *r,
+ struct netr_DsRGetDCNameInfo **info);
/****************************************************************
****************************************************************/
@@ -735,11 +736,12 @@ static void map_dc_and_domain_names(uint32_t flags,
/****************************************************************
****************************************************************/
-static NTSTATUS make_dc_info_from_cldap_reply(TALLOC_CTX *mem_ctx,
- uint32_t flags,
- struct sockaddr_storage *ss,
- struct NETLOGON_SAM_LOGON_RESPONSE_EX *r,
- struct netr_DsRGetDCNameInfo **info)
+static NTSTATUS make_dc_info_from_cldap_reply(
+ TALLOC_CTX *mem_ctx,
+ uint32_t flags,
+ const struct sockaddr_storage *ss,
+ struct NETLOGON_SAM_LOGON_RESPONSE_EX *r,
+ struct netr_DsRGetDCNameInfo **info)
{
const char *dc_hostname = NULL;
const char *dc_domain_name = NULL;
diff --git a/source3/libsmb/unexpected.c b/source3/libsmb/unexpected.c
index ac6c1cf..ced4696 100644
--- a/source3/libsmb/unexpected.c
+++ b/source3/libsmb/unexpected.c
@@ -170,12 +170,12 @@ static void nb_packet_server_listener(struct tevent_context *ev,
ret = tstream_bsd_existing_socket(client, sock, &client->sock);
if (ret != 0) {
DEBUG(10, ("tstream_bsd_existing_socket failed\n"));
+ TALLOC_FREE(client);
close(sock);
return;
}
client->server = server;
- talloc_set_destructor(client, nb_packet_client_destructor);
client->out_queue = tevent_queue_create(
client, "unexpected packet output");
@@ -198,6 +198,8 @@ static void nb_packet_server_listener(struct tevent_context *ev,
DLIST_ADD(server->clients, client);
server->num_clients += 1;
+ talloc_set_destructor(client, nb_packet_client_destructor);
+
if (server->num_clients > server->max_clients) {
DEBUG(10, ("Too many clients, dropping oldest\n"));
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c
index 0c019e6..597e098 100644
--- a/source3/utils/net_lookup.c
+++ b/source3/utils/net_lookup.c
@@ -405,11 +405,12 @@ static int net_lookup_dsgetdcname(struct net_context *c, int argc, const char **
domain_name = argv[0];
- if (argc >= 2)
+ if (argc >= 2) {
sscanf(argv[1], "%x", &flags);
+ }
- if (!flags) {
- flags |= DS_DIRECTORY_SERVICE_REQUIRED;
+ if (flags == 0) {
+ flags = DS_DIRECTORY_SERVICE_REQUIRED;
}
if (argc == 3) {
diff --git a/source4/lib/socket/socket_ip.c b/source4/lib/socket/socket_ip.c
index 87b7bf4..e0aa5da 100644
--- a/source4/lib/socket/socket_ip.c
+++ b/source4/lib/socket/socket_ip.c
@@ -316,7 +316,8 @@ static NTSTATUS ipv4_recvfrom(struct socket_context *sock, void *buf,
if (gotlen == 0) {
talloc_free(src);
return NT_STATUS_END_OF_FILE;
- } else if (gotlen == -1) {
+ }
+ if (gotlen == -1) {
talloc_free(src);
return map_nt_error_from_unix_common(errno);
}
diff --git a/source4/libcli/dgram/netlogon.c b/source4/libcli/dgram/netlogon.c
index 0aa6864..a16a3b9 100644
--- a/source4/libcli/dgram/netlogon.c
+++ b/source4/libcli/dgram/netlogon.c
@@ -97,7 +97,7 @@ NTSTATUS dgram_mailslot_netlogon_reply(struct nbt_dgram_socket *dgmsock,
/*
- parse a netlogon response. The packet must be a valid mailslot packet
+ parse a netlogon request. The packet must be a valid mailslot packet
*/
NTSTATUS dgram_mailslot_netlogon_parse_request(struct dgram_mailslot_handler *dgmslot,
TALLOC_CTX *mem_ctx,
diff --git a/source4/nbt_server/interfaces.c b/source4/nbt_server/interfaces.c
index ccbc89a..beafec6 100644
--- a/source4/nbt_server/interfaces.c
+++ b/source4/nbt_server/interfaces.c
@@ -45,7 +45,7 @@ static void nbtd_request_handler(struct nbt_name_socket *nbtsock,
nbtsrv->stats.total_received++;
- /* see if its from one of our own interfaces - if so, then ignore it */
+ /* see if it's from one of our own interfaces - if so, then ignore it */
if (nbtd_self_packet_and_bcast(nbtsock, packet, src)) {
DEBUG(10,("Ignoring bcast self packet from %s:%d\n", src->addr, src->port));
return;
--
Samba Shared Repository
More information about the samba-cvs
mailing list