From: Joseph Sutton Date: Mon, 7 Aug 2023 04:33:05 +0000 (+1200) Subject: lib:mscat: Add missing newlines to logging messages X-Git-Tag: tevent-0.16.0~1171 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea888d6901a3afd20f5ab9d24f678117f1c6d3a6;p=thirdparty%2Fsamba.git lib:mscat: Add missing newlines to logging messages Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/lib/mscat/mscat_ctl.c b/lib/mscat/mscat_ctl.c index 426ddc57161..1fed8854c4b 100644 --- a/lib/mscat/mscat_ctl.c +++ b/lib/mscat/mscat_ctl.c @@ -238,7 +238,7 @@ int mscat_ctl_import(struct mscat_ctl *ctl, ok = mscat_asn1_oid_equal(oid, CATALOG_LIST_OBJOID); if (!ok) { - DBG_ERR("Invalid oid (%s), expected CATALOG_LIST_OBJOID", + DBG_ERR("Invalid oid (%s), expected CATALOG_LIST_OBJOID\n", oid); rc = -1; goto done; @@ -262,7 +262,7 @@ int mscat_ctl_import(struct mscat_ctl *ctl, ctl->version = 1; } else { DBG_ERR("Invalid oid (%s), expected " - "CATALOG_LIST_MEMBER_OBJOID", + "CATALOG_LIST_MEMBER_OBJOID\n", oid); rc = -1; goto done; @@ -409,7 +409,7 @@ static int ctl_parse_name_value(struct mscat_ctl *ctl, content->length, error_string); if (rc != ASN1_SUCCESS) { - DBG_ERR("Failed to decode CATALOG.CatalogNameValue: %s - %s", + DBG_ERR("Failed to decode CATALOG.CatalogNameValue: %s - %s\n", asn1_strerror(rc), error_string); goto done; @@ -512,7 +512,7 @@ static int ctl_parse_member_info(struct mscat_ctl *ctl, content->length, error_string); if (rc != ASN1_SUCCESS) { - DBG_ERR("Failed to decode CATALOG.CatalogMemberInfo: %s - %s", + DBG_ERR("Failed to decode CATALOG.CatalogMemberInfo: %s - %s\n", asn1_strerror(rc), error_string); goto done; @@ -593,7 +593,7 @@ static int ctl_spc_pe_image_data(struct mscat_ctl *ctl, content->length, error_string); if (rc != ASN1_SUCCESS) { - DBG_ERR("Failed to decode CATALOG.SpcPEImageData: %s - %s", + DBG_ERR("Failed to decode CATALOG.SpcPEImageData: %s - %s\n", asn1_strerror(rc), error_string); goto done; @@ -606,10 +606,10 @@ static int ctl_spc_pe_image_data(struct mscat_ctl *ctl, if (rc == ASN1_SUCCESS) { uint32_t flags = RIVAL(flags_blob.data, 0); - DBG_ERR(">>> SPC_PE_IMAGE_DATA FLAGS=0x%08x", + DBG_ERR(">>> SPC_PE_IMAGE_DATA FLAGS=0x%08x\n", flags); } else { - DBG_ERR("Failed to parse 'flags' in CATALOG.SpcPEImageData - %s", + DBG_ERR("Failed to parse 'flags' in CATALOG.SpcPEImageData - %s\n", asn1_strerror(rc)); goto done; } @@ -619,7 +619,7 @@ static int ctl_spc_pe_image_data(struct mscat_ctl *ctl, "link", &choice_blob); if (rc != ASN1_SUCCESS) { - DBG_ERR("Failed to parse 'link' in CATALOG.SpcPEImageData - %s", + DBG_ERR("Failed to parse 'link' in CATALOG.SpcPEImageData - %s\n", asn1_strerror(rc)); goto done; } @@ -662,7 +662,7 @@ static int ctl_spc_pe_image_data(struct mscat_ctl *ctl, link, &file_blob); if (rc != ASN1_SUCCESS) { - DBG_ERR("Failed to read '%s' - %s", + DBG_ERR("Failed to read '%s' - %s\n", link, asn1_strerror(rc)); rc = -1; @@ -747,7 +747,7 @@ static int ctl_spc_indirect_data(struct mscat_ctl *ctl, content->length, error_string); if (rc != ASN1_SUCCESS) { - DBG_ERR("Failed to decode CATALOG.SpcIndirectData: %s - %s", + DBG_ERR("Failed to decode CATALOG.SpcIndirectData: %s - %s\n", asn1_strerror(rc), error_string); goto done; @@ -783,7 +783,7 @@ static int ctl_spc_indirect_data(struct mscat_ctl *ctl, } /* Just returns <<>> as file */ - DBG_NOTICE(">>> LINK: %s", + DBG_NOTICE(">>> LINK: %s\n", file); } @@ -920,7 +920,7 @@ static int ctl_get_member_attributes(struct mscat_ctl *ctl, goto done; } - DBG_DEBUG("Decode element (startEnd) %s", + DBG_DEBUG("Decode element (startEnd) %s\n", el2); rc = asn1_der_decoding_startEnd(ctl->tree_ctl, @@ -937,7 +937,7 @@ static int ctl_get_member_attributes(struct mscat_ctl *ctl, } content_len = content_end - content_start + 1; - DBG_DEBUG("Content data_blob length: %zu", + DBG_DEBUG("Content data_blob length: %zu\n", content_len); content = data_blob_talloc_zero(tmp_ctx, content_len); @@ -966,7 +966,7 @@ static int ctl_get_member_attributes(struct mscat_ctl *ctl, goto done; } - DBG_DEBUG("Parsed NameValue: name=%s, flags=%u, value=%s", + DBG_DEBUG("Parsed NameValue: name=%s, flags=%u, value=%s\n", name, flags, value); diff --git a/lib/mscat/mscat_pkcs7.c b/lib/mscat/mscat_pkcs7.c index 5d882891313..07d85140f98 100644 --- a/lib/mscat/mscat_pkcs7.c +++ b/lib/mscat/mscat_pkcs7.c @@ -139,7 +139,7 @@ int mscat_pkcs7_import_catfile(struct mscat_pkcs7 *mp7, catfile, &blob); if (rc == -1) { - DBG_ERR("Failed to read catalog file '%s' - %s", + DBG_ERR("Failed to read catalog file '%s' - %s\n", catfile, strerror(errno)); goto done; @@ -152,7 +152,7 @@ int mscat_pkcs7_import_catfile(struct mscat_pkcs7 *mp7, &mscat_data, GNUTLS_X509_FMT_DER); if (rc < 0) { - DBG_ERR("Failed to import PKCS7 from '%s' - %s", + DBG_ERR("Failed to import PKCS7 from '%s' - %s\n", catfile, gnutls_strerror(rc)); goto done; @@ -182,14 +182,14 @@ int mscat_pkcs7_verify(struct mscat_pkcs7 *mp7, oid = gnutls_pkcs7_get_embedded_data_oid(mp7->c); if (oid == NULL) { - DBG_ERR("Failed to get oid - %s", + DBG_ERR("Failed to get oid - %s\n", gnutls_strerror(errno)); return -1; } cmp = strcmp(oid, PKCS7_CTL_OBJID); if (cmp != 0) { - DBG_ERR("Invalid oid in catalog file! oid: %s, expected: %s", + DBG_ERR("Invalid oid in catalog file! oid: %s, expected: %s\n", oid, PKCS7_CTL_OBJID); return -1; @@ -203,7 +203,7 @@ int mscat_pkcs7_verify(struct mscat_pkcs7 *mp7, rc = gnutls_x509_trust_list_init(&tl, 0); /* default size */ if (rc != 0) { - DBG_ERR("Failed to create trust list - %s", + DBG_ERR("Failed to create trust list - %s\n", gnutls_strerror(rc)); goto done; } @@ -212,18 +212,18 @@ int mscat_pkcs7_verify(struct mscat_pkcs7 *mp7, /* Load the system trust list */ rc = gnutls_x509_trust_list_add_system_trust(tl, 0, 0); if (rc < 0) { - DBG_ERR("Failed to add system trust list - %s", + DBG_ERR("Failed to add system trust list - %s\n", gnutls_strerror(rc)); goto done; } - DBG_INFO("Loaded %d CAs", rc); + DBG_INFO("Loaded %d CAs\n", rc); if (ca_file != NULL) { rc = mscat_read_file(tmp_ctx, ca_file, &blob); if (rc != 0) { - DBG_ERR("Failed to read CA file '%s' - %s", + DBG_ERR("Failed to read CA file '%s' - %s\n", ca_file, strerror(errno)); goto done; @@ -239,13 +239,13 @@ int mscat_pkcs7_verify(struct mscat_pkcs7 *mp7, 0, /* tl_flags */ 0); /* tl_vflags */ if (rc < 0) { - DBG_ERR("Failed to add '%s' to trust list - %s (%d)", + DBG_ERR("Failed to add '%s' to trust list - %s (%d)\n", ca_file, gnutls_strerror(rc), rc); goto done; } - DBG_INFO("Loaded %d additional CAs", rc); + DBG_INFO("Loaded %d additional CAs\n", rc); } /* @@ -264,7 +264,7 @@ int mscat_pkcs7_verify(struct mscat_pkcs7 *mp7, count = gnutls_pkcs7_get_signature_count(mp7->c); if (count == 0) { - DBG_ERR("Failed to verify catalog file, no signatures found"); + DBG_ERR("Failed to verify catalog file, no signatures found\n"); goto done; } @@ -277,7 +277,7 @@ int mscat_pkcs7_verify(struct mscat_pkcs7 *mp7, NULL, /* data */ flags); /* flags */ if (rc < 0) { - DBG_ERR("Failed to verify catalog file - %s (%d)", + DBG_ERR("Failed to verify catalog file - %s (%d)\n", gnutls_strerror(rc), rc); goto done;