The branch, master has been updated via 38628b1 Fix the O3 developer build from b3385f7 smbd: Make SMB3 clients use encryption with "smb encrypt = auto"
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 38628b1e32cb480cbd0cef57a34a9fe0216f344c Author: Volker Lendecke <v...@samba.org> Date: Tue Mar 3 08:48:00 2015 +0100 Fix the O3 developer build Different gcc versions complain at different places Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Alexander Bokovoy <a...@samba.org> Autobuild-User(master): Volker Lendecke <v...@samba.org> Autobuild-Date(master): Tue Mar 3 13:14:53 CET 2015 on sn-devel-104 ----------------------------------------------------------------------- Summary of changes: auth/credentials/credentials_secrets.c | 6 ++++-- lib/ldb/ldb_map/ldb_map_outbound.c | 2 +- source3/lib/ctdbd_conn.c | 6 +++--- source3/lib/netapi/file.c | 2 +- source3/lib/netapi/share.c | 2 +- source3/passdb/pdb_ipa.c | 2 +- source3/utils/net_registry.c | 4 ++-- source4/dsdb/kcc/kcc_topology.c | 9 +++++---- source4/heimdal/lib/krb5/fcache.c | 11 ++++++----- source4/lib/http/http_auth.c | 4 ++-- source4/libnet/userman.c | 2 +- source4/rpc_server/samr/dcesrv_samr.c | 25 +++++++++++++++---------- source4/torture/rpc/samsync.c | 2 +- source4/torture/rpc/spoolss.c | 15 +++++++++------ source4/torture/winbind/struct_based.c | 2 +- 15 files changed, 53 insertions(+), 41 deletions(-) Changeset truncated at 500 lines: diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c index d259a4d..5945ffd 100644 --- a/auth/credentials/credentials_secrets.c +++ b/auth/credentials/credentials_secrets.c @@ -411,7 +411,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *c { NTSTATUS status; char *filter; - char *error_string; + char *error_string = NULL; /* Bleh, nasty recursion issues: We are setting a machine * account here, so we don't want the 'pending' flag around * any more */ @@ -424,7 +424,9 @@ _PUBLIC_ NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *c SECRETS_PRINCIPALS_DN, filter, 0, NULL, &error_string); if (!NT_STATUS_IS_OK(status)) { - DEBUG(1, ("Could not find %s principal in secrets database: %s: %s\n", serviceprincipal, nt_errstr(status), error_string)); + DEBUG(1, ("Could not find %s principal in secrets database: %s: %s\n", + serviceprincipal, nt_errstr(status), + error_string ? error_string : "<no error>")); } return status; } diff --git a/lib/ldb/ldb_map/ldb_map_outbound.c b/lib/ldb/ldb_map/ldb_map_outbound.c index 1ee2dfe..e755b7e 100644 --- a/lib/ldb/ldb_map/ldb_map_outbound.c +++ b/lib/ldb/ldb_map/ldb_map_outbound.c @@ -635,7 +635,7 @@ static int map_subtree_select_local_list(struct ldb_module *module, void *mem_ct /* Generate new list of subtrees */ j = 0; for (i = 0; i < tree->u.list.num_elements; i++) { - struct ldb_parse_tree *child; + struct ldb_parse_tree *child = NULL; ret = map_subtree_select_local(module, *new, &child, tree->u.list.elements[i]); if (ret) { talloc_free(*new); diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index c41ec53..6e25769 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -722,7 +722,7 @@ static void ctdbd_socket_handler(struct tevent_context *event_ctx, { struct ctdbd_connection *conn = talloc_get_type_abort( private_data, struct ctdbd_connection); - struct ctdb_req_header *hdr; + struct ctdb_req_header *hdr = NULL; NTSTATUS status; status = ctdb_read_packet(conn->fd, talloc_tos(), &hdr); @@ -1304,7 +1304,7 @@ char *ctdbd_dbpath(struct ctdbd_connection *conn, { NTSTATUS status; TDB_DATA data; - int32_t cstatus; + int32_t cstatus = 0; data.dptr = (uint8_t*)&db_id; data.dsize = sizeof(db_id); @@ -1557,7 +1557,7 @@ NTSTATUS ctdbd_traverse(uint32_t db_id, } while (True) { - struct ctdb_req_header *hdr; + struct ctdb_req_header *hdr = NULL; struct ctdb_req_message *m; struct ctdb_rec_data *d; diff --git a/source3/lib/netapi/file.c b/source3/lib/netapi/file.c index 551f9ff..99541b9 100644 --- a/source3/lib/netapi/file.c +++ b/source3/lib/netapi/file.c @@ -240,7 +240,7 @@ WERROR NetFileEnum_r(struct libnetapi_ctx *ctx, } for (i=0; i < info_ctr.ctr.ctr2->count; i++) { - union srvsvc_NetFileInfo _i; + union srvsvc_NetFileInfo _i = {0}; switch (r->in.level) { case 2: _i.info2 = &info_ctr.ctr.ctr2->array[i]; diff --git a/source3/lib/netapi/share.c b/source3/lib/netapi/share.c index 37b2322..1694a27 100644 --- a/source3/lib/netapi/share.c +++ b/source3/lib/netapi/share.c @@ -386,7 +386,7 @@ WERROR NetShareEnum_r(struct libnetapi_ctx *ctx, } for (i=0; i < info_ctr.ctr.ctr1->count; i++) { - union srvsvc_NetShareInfo _i; + union srvsvc_NetShareInfo _i = {0}; switch (r->in.level) { case 0: _i.info0 = &info_ctr.ctr.ctr0->array[i]; diff --git a/source3/passdb/pdb_ipa.c b/source3/passdb/pdb_ipa.c index 9a1cc18..e1e5527 100644 --- a/source3/passdb/pdb_ipa.c +++ b/source3/passdb/pdb_ipa.c @@ -1303,7 +1303,7 @@ static NTSTATUS ipasam_create_dom_group(struct pdb_methods *pdb_methods, { NTSTATUS status; struct ldapsam_privates *ldap_state; - char *dn; + char *dn = NULL; uint32_t has_objectclass = 0; ldap_state = (struct ldapsam_privates *)(pdb_methods->private_data); diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c index befc73c..cdfb318 100644 --- a/source3/utils/net_registry.c +++ b/source3/utils/net_registry.c @@ -274,7 +274,7 @@ static int net_registry_createkey(struct net_context *c, int argc, { WERROR werr; enum winreg_CreateAction action; - char *subkeyname; + char *subkeyname = NULL; struct registry_key *hivekey = NULL; struct registry_key *subkey = NULL; TALLOC_CTX *ctx = talloc_stackframe(); @@ -333,7 +333,7 @@ static int net_registry_deletekey_internal(struct net_context *c, int argc, bool recursive) { WERROR werr; - char *subkeyname; + char *subkeyname = NULL; struct registry_key *hivekey = NULL; TALLOC_CTX *ctx = talloc_stackframe(); int ret = -1; diff --git a/source4/dsdb/kcc/kcc_topology.c b/source4/dsdb/kcc/kcc_topology.c index 2836199..82ef665 100644 --- a/source4/dsdb/kcc/kcc_topology.c +++ b/source4/dsdb/kcc/kcc_topology.c @@ -2790,7 +2790,7 @@ static NTSTATUS kcctpl_create_connection(struct kccsrv_service *service, "transportType", "schedule", "options", "enabledConnection", NULL }; unsigned int i, valid_connections; - struct GUID_list keep_connections; + struct GUID_list keep_connections = {0}; tmp_ctx = talloc_new(service); NT_STATUS_HAVE_NO_MEMORY(tmp_ctx); @@ -3299,7 +3299,8 @@ static NTSTATUS kcctpl_create_connections(struct kccsrv_service *service, struct GUID other_site_id; struct kcctpl_vertex *other_site_vertex; struct ldb_result *res; - struct ldb_message *transport, *r_bridgehead, *l_bridgehead; + struct ldb_message *transport, *r_bridgehead; + struct ldb_message *l_bridgehead = NULL; uint8_t schedule[84]; uint32_t first_available, j, interval; @@ -3532,8 +3533,8 @@ NTSTATUS kcctpl_test(struct kccsrv_service *service) { NTSTATUS status; TALLOC_CTX *tmp_ctx = talloc_new(service); - struct GUID_list keep; - bool all_connected; + struct GUID_list keep = {0}; + bool all_connected = false; DEBUG(5, ("Testing kcctpl_create_intersite_connections\n")); status = kcctpl_create_intersite_connections(service, tmp_ctx, &keep, diff --git a/source4/heimdal/lib/krb5/fcache.c b/source4/heimdal/lib/krb5/fcache.c index 781d4f0..a9e8327 100644 --- a/source4/heimdal/lib/krb5/fcache.c +++ b/source4/heimdal/lib/krb5/fcache.c @@ -420,7 +420,7 @@ fcc_initialize(krb5_context context, { krb5_fcache *f = FCACHE(id); int ret = 0; - int fd; + int fd = 0; if (f == NULL) return krb5_einval(context, 2); @@ -500,7 +500,7 @@ fcc_store_cred(krb5_context context, krb5_creds *creds) { int ret; - int fd; + int fd = 0; ret = fcc_open(context, id, &fd, O_WRONLY | O_APPEND | O_BINARY | O_CLOEXEC, 0); if(ret) @@ -541,7 +541,7 @@ init_fcc (krb5_context context, int *ret_fd, krb5_deltat *kdc_offset) { - int fd; + int fd = 0; int8_t pvno, tag; krb5_storage *sp; krb5_error_code ret; @@ -973,7 +973,8 @@ fcc_move(krb5_context context, krb5_ccache from, krb5_ccache to) } else if (ret && errno == EXDEV) { /* make a copy and delete the orignal */ krb5_ssize_t sz1, sz2; - int fd1, fd2; + int fd1; + int fd2 = 0; char buf[BUFSIZ]; ret = fcc_open(context, from, &fd1, O_RDONLY | O_BINARY | O_CLOEXEC, 0); @@ -1077,7 +1078,7 @@ fcc_get_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat *kdc_offset { krb5_error_code ret; krb5_storage *sp = NULL; - int fd; + int fd = 0; ret = init_fcc(context, id, &sp, &fd, kdc_offset); if (sp) krb5_storage_free(sp); diff --git a/source4/lib/http/http_auth.c b/source4/lib/http/http_auth.c index 2bf4392..d846ec2 100644 --- a/source4/lib/http/http_auth.c +++ b/source4/lib/http/http_auth.c @@ -166,7 +166,7 @@ struct tevent_req *http_send_auth_request_send(TALLOC_CTX *mem_ctx, struct tevent_req *subreq; struct http_auth_state *state; NTSTATUS status; - struct http_request *auth_request; + struct http_request *auth_request = NULL; struct http_request *request_to_send; req = tevent_req_create(mem_ctx, &state, struct http_auth_state); @@ -301,7 +301,7 @@ static void http_send_auth_request_done2(struct tevent_req *subreq) struct tevent_req *req; struct http_auth_state *state; struct http_request *auth_response; - struct http_request *auth_request; + struct http_request *auth_request = NULL; struct http_request *request_to_send; req = tevent_req_callback_data(subreq, struct tevent_req); diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c index 39be78f..9e76364 100644 --- a/source4/libnet/userman.c +++ b/source4/libnet/userman.c @@ -756,7 +756,7 @@ static void continue_usermod_user_queried(struct tevent_req *subreq) struct composite_context *c; struct usermod_state *s; union samr_UserInfo *i; - uint16_t level; + uint16_t level = 0; c = tevent_req_callback_data(subreq, struct composite_context); s = talloc_get_type(c->private_data, struct usermod_state); diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index c0bec43..bf2174c 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -1239,13 +1239,16 @@ static NTSTATUS dcesrv_samr_CreateUser(struct dcesrv_call_state *dce_call, TALLO /* a simple wrapper around samr_CreateUser2 works nicely */ - r2.in.domain_handle = r->in.domain_handle; - r2.in.account_name = r->in.account_name; - r2.in.acct_flags = ACB_NORMAL; - r2.in.access_mask = r->in.access_mask; - r2.out.user_handle = r->out.user_handle; - r2.out.access_granted = &access_granted; - r2.out.rid = r->out.rid; + + r2 = (struct samr_CreateUser2) { + .in.domain_handle = r->in.domain_handle, + .in.account_name = r->in.account_name, + .in.acct_flags = ACB_NORMAL, + .in.access_mask = r->in.access_mask, + .out.user_handle = r->out.user_handle, + .out.access_granted = &access_granted, + .out.rid = r->out.rid + }; return dcesrv_samr_CreateUser2(dce_call, mem_ctx, &r2); } @@ -4007,9 +4010,11 @@ static NTSTATUS dcesrv_samr_QueryUserInfo2(struct dcesrv_call_state *dce_call, T struct samr_QueryUserInfo r1; NTSTATUS status; - r1.in.user_handle = r->in.user_handle; - r1.in.level = r->in.level; - r1.out.info = r->out.info; + r1 = (struct samr_QueryUserInfo) { + .in.user_handle = r->in.user_handle, + .in.level = r->in.level, + .out.info = r->out.info + }; status = dcesrv_samr_QueryUserInfo(dce_call, mem_ctx, &r1); diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c index 2c18e0d..e71faf8 100644 --- a/source4/torture/rpc/samsync.c +++ b/source4/torture/rpc/samsync.c @@ -463,7 +463,7 @@ static bool samsync_handle_user(struct torture_context *tctx, TALLOC_CTX *mem_ct { uint32_t rid = delta->delta_id_union.rid; struct netr_DELTA_USER *user = delta->delta_union.user; - struct netr_SamInfo3 *info3; + struct netr_SamInfo3 *info3 = NULL; struct samr_Password lm_hash; struct samr_Password nt_hash; struct samr_Password *lm_hash_p = NULL; diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 23f501d..ebe7c09 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -4118,9 +4118,12 @@ static bool test_GetPrinterData_list(struct torture_context *tctx, int i; for (i=0; i < ARRAY_SIZE(list); i++) { - enum winreg_Type type, type_ex; - uint8_t *data, *data_ex; - uint32_t needed, needed_ex; + enum winreg_Type type = REG_NONE; + enum winreg_Type type_ex= REG_NONE; + uint8_t *data; + uint8_t *data_ex = NULL; + uint32_t needed; + uint32_t needed_ex = 0; torture_assert(tctx, test_GetPrinterData(tctx, b, &ctx->server_handle, list[i], &type, &data, &needed), talloc_asprintf(tctx, "GetPrinterData failed on %s\n", list[i])); @@ -6064,9 +6067,9 @@ static bool test_GetChangeID_PrinterDataEx(struct torture_context *tctx, struct policy_handle *handle, uint32_t *change_id) { - enum winreg_Type type; - uint8_t *data; - uint32_t needed; + enum winreg_Type type = REG_NONE; + uint8_t *data = NULL; + uint32_t needed = 0; torture_assert(tctx, test_GetPrinterDataEx(tctx, p, handle, "PrinterDriverData", "ChangeID", &type, &data, &needed), diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c index cc49c5d..0096fef 100644 --- a/source4/torture/winbind/struct_based.c +++ b/source4/torture/winbind/struct_based.c @@ -896,7 +896,7 @@ static bool parse_domain_user(struct torture_context *torture, fstring user) { char *p = strchr(domuser, winbind_separator(torture)); - char *dom; + char *dom = NULL; if (!p) { /* Maybe it was a UPN? */ -- Samba Shared Repository