Initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/bareos-Release-*.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
d /var/run/bareos 0700 bareos bareos
|
||||
+1261
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,389 @@
|
||||
# Fedora 36+ and EL9+ includes OpenSSL 3.0. This introduces a lot of
|
||||
# deprecation warnings. Locally mute these warning so that they don't cause
|
||||
# errors.
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/dird/inc_conf.cc bareos-Release-21.0.0/core/src/dird/inc_conf.cc
|
||||
--- bareos-Release-21.0.0.orig/core/src/dird/inc_conf.cc 2022-03-09 09:03:32.065233907 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/dird/inc_conf.cc 2022-03-09 10:03:14.079745445 +0100
|
||||
@@ -820,7 +820,10 @@
|
||||
case BCT_QUOTED_STRING: {
|
||||
FilesetResource* res_fs = GetStaticFilesetResource();
|
||||
if (res_fs->have_MD5) {
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Update(&res_fs->md5c, (unsigned char*)lc->str, lc->str_len);
|
||||
+#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
if (res_incexe->name_list.size() == 0) {
|
||||
@@ -873,7 +876,10 @@
|
||||
FilesetResource* res_fs = GetStaticFilesetResource();
|
||||
|
||||
if (res_fs->have_MD5) {
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Update(&res_fs->md5c, (unsigned char*)lc->str, lc->str_len);
|
||||
+#pragma GCC diagnostic pop
|
||||
}
|
||||
if (res_incexe->plugin_list.size() == 0) {
|
||||
res_incexe->plugin_list.init(10, true);
|
||||
@@ -929,7 +935,10 @@
|
||||
if (pass == 1) { res_incexe = new IncludeExcludeItem; }
|
||||
|
||||
if (!res_fs->have_MD5) {
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&res_fs->md5c);
|
||||
+#pragma GCC diagnostic pop
|
||||
res_fs->have_MD5 = true;
|
||||
}
|
||||
res_fs->new_include = true;
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/dird/job.cc bareos-Release-21.0.0/core/src/dird/job.cc
|
||||
--- bareos-Release-21.0.0.orig/core/src/dird/job.cc 2022-03-09 09:03:32.065233907 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/dird/job.cc 2022-03-09 10:09:30.636596791 +0100
|
||||
@@ -1351,7 +1351,10 @@
|
||||
MD5_CTX md5c;
|
||||
unsigned char digest[16]; /* MD5 digest length */
|
||||
memcpy(&md5c, &jcr->impl->res.fileset->md5c, sizeof(md5c));
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Final(digest, &md5c);
|
||||
+#pragma GCC diagnostic pop
|
||||
/*
|
||||
* Keep the flag (last arg) set to false otherwise old FileSets will
|
||||
* get new MD5 sums and the user will get Full backups on everything
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/droplet/libdroplet/src/backend/s3/reqbuilder.c bareos-Release-21.0.0/core/src/droplet/libdroplet/src/backend/s3/reqbuilder.c
|
||||
--- bareos-Release-21.0.0.orig/core/src/droplet/libdroplet/src/backend/s3/reqbuilder.c 2022-03-09 09:03:32.069233916 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/droplet/libdroplet/src/backend/s3/reqbuilder.c 2022-03-09 09:40:31.490561578 +0100
|
||||
@@ -330,9 +330,12 @@
|
||||
goto end;
|
||||
}
|
||||
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&ctx);
|
||||
MD5_Update(&ctx, req->data_buf, req->data_len);
|
||||
MD5_Final(digest, &ctx);
|
||||
+#pragma GCC diagnostic pop
|
||||
|
||||
b64_digest_len
|
||||
= dpl_base64_encode(digest, MD5_DIGEST_LENGTH, (u_char*)b64_digest);
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/droplet/libdroplet/src/uks.c bareos-Release-21.0.0/core/src/droplet/libdroplet/src/uks.c
|
||||
--- bareos-Release-21.0.0.orig/core/src/droplet/libdroplet/src/uks.c 2022-03-09 09:03:32.069233916 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/droplet/libdroplet/src/uks.c 2022-03-09 09:37:41.132118775 +0100
|
||||
@@ -295,9 +295,12 @@
|
||||
|
||||
off += DPL_UKS_OID_NBITS;
|
||||
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&ctx);
|
||||
MD5_Update(&ctx, entropy, sizeof(entropy));
|
||||
MD5_Final(hash, &ctx);
|
||||
+#pragma GCC diagnostic pop
|
||||
|
||||
for (i = 0; i < DPL_UKS_HASH_NBITS; i++) {
|
||||
if (hash[i / 8] & 1 << (i % 8))
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/droplet/libdroplet/src/utils.c bareos-Release-21.0.0/core/src/droplet/libdroplet/src/utils.c
|
||||
--- bareos-Release-21.0.0.orig/core/src/droplet/libdroplet/src/utils.c 2022-03-09 09:03:32.069233916 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/droplet/libdroplet/src/utils.c 2022-03-09 09:35:48.302843481 +0100
|
||||
@@ -468,7 +468,10 @@
|
||||
HMAC_CTX ctx;
|
||||
#else
|
||||
HMAC_CTX* ctx;
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
ctx = HMAC_CTX_new();
|
||||
+#pragma GCC diagnostic pop
|
||||
#endif
|
||||
u_int digest_len;
|
||||
|
||||
@@ -479,9 +482,12 @@
|
||||
HMAC_Final(&ctx, (u_char*)digest_buf, &digest_len);
|
||||
HMAC_CTX_cleanup(&ctx);
|
||||
#else
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
HMAC_Init_ex(ctx, key_buf, key_len, md, NULL);
|
||||
HMAC_Update(ctx, (u_char*)data_buf, data_len);
|
||||
HMAC_Final(ctx, (u_char*)digest_buf, &digest_len);
|
||||
+#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
return digest_len;
|
||||
@@ -542,9 +548,12 @@
|
||||
{
|
||||
SHA256_CTX ctx;
|
||||
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
SHA256_Init(&ctx);
|
||||
SHA256_Update(&ctx, data_buf, data_len);
|
||||
SHA256_Final(digest_buf, &ctx);
|
||||
+#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
/**/
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/lib/crypto_none.cc bareos-Release-21.0.0/core/src/lib/crypto_none.cc
|
||||
--- bareos-Release-21.0.0.orig/core/src/lib/crypto_none.cc 2022-03-09 09:03:32.073233925 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/lib/crypto_none.cc 2022-03-09 10:02:42.859673131 +0100
|
||||
@@ -57,7 +57,10 @@
|
||||
|
||||
switch (type) {
|
||||
case CRYPTO_DIGEST_MD5:
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&digest->md5);
|
||||
+#pragma GCC diagnostic pop
|
||||
break;
|
||||
case CRYPTO_DIGEST_SHA1:
|
||||
SHA1Init(&digest->sha1);
|
||||
@@ -76,7 +79,10 @@
|
||||
switch (digest->type) {
|
||||
case CRYPTO_DIGEST_MD5:
|
||||
/* Doesn't return anything ... */
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Update(&digest->md5, (unsigned char*)data, length);
|
||||
+#pragma GCC diagnostic pop
|
||||
return true;
|
||||
case CRYPTO_DIGEST_SHA1:
|
||||
/* Doesn't return anything ... */
|
||||
@@ -96,7 +102,10 @@
|
||||
assert(*length >= CRYPTO_DIGEST_MD5_SIZE);
|
||||
*length = CRYPTO_DIGEST_MD5_SIZE;
|
||||
/* Doesn't return anything ... */
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Final((unsigned char*)dest, &digest->md5);
|
||||
+#pragma GCC diagnostic pop
|
||||
return true;
|
||||
case CRYPTO_DIGEST_SHA1:
|
||||
/* Guard against programmer error by either the API client or
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/lib/crypto_nss.cc bareos-Release-21.0.0/core/src/lib/crypto_nss.cc
|
||||
--- bareos-Release-21.0.0.orig/core/src/lib/crypto_nss.cc 2022-03-09 09:03:32.073233925 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/lib/crypto_nss.cc 2022-03-09 10:02:07.909592178 +0100
|
||||
@@ -58,7 +58,10 @@
|
||||
|
||||
switch (type) {
|
||||
case CRYPTO_DIGEST_MD5:
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&digest->md5);
|
||||
+#pragma GCC diagnostic pop
|
||||
break;
|
||||
case CRYPTO_DIGEST_SHA1:
|
||||
SHA1Init(&digest->sha1);
|
||||
@@ -77,7 +80,10 @@
|
||||
switch (digest->type) {
|
||||
case CRYPTO_DIGEST_MD5:
|
||||
/* Doesn't return anything ... */
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Update(&digest->md5, (unsigned char*)data, length);
|
||||
+#pragma GCC diagnostic pop
|
||||
return true;
|
||||
case CRYPTO_DIGEST_SHA1:
|
||||
/* Doesn't return anything ... */
|
||||
@@ -97,7 +103,10 @@
|
||||
assert(*length >= CRYPTO_DIGEST_MD5_SIZE);
|
||||
*length = CRYPTO_DIGEST_MD5_SIZE;
|
||||
/* Doesn't return anything ... */
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Final((unsigned char*)dest, &digest->md5);
|
||||
+#pragma GCC diagnostic pop
|
||||
return true;
|
||||
case CRYPTO_DIGEST_SHA1:
|
||||
/* Guard against programmer error by either the API client or
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/lib/crypto_openssl.cc bareos-Release-21.0.0/core/src/lib/crypto_openssl.cc
|
||||
--- bareos-Release-21.0.0.orig/core/src/lib/crypto_openssl.cc 2022-03-09 09:03:32.073233925 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/lib/crypto_openssl.cc 2022-03-09 09:45:32.411339279 +0100
|
||||
@@ -1188,9 +1188,12 @@
|
||||
/* Encrypt the session key */
|
||||
ekey = (unsigned char*)malloc(EVP_PKEY_size(keypair->pubkey));
|
||||
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
if ((ekey_len = EVP_PKEY_encrypt(ekey, cs->session_key, cs->session_key_len,
|
||||
keypair->pubkey))
|
||||
<= 0) {
|
||||
+#pragma GCC diagnostic pop
|
||||
/* OpenSSL failure */
|
||||
RecipientInfo_free(ri);
|
||||
CryptoSessionFree(cs);
|
||||
@@ -1314,9 +1317,12 @@
|
||||
/* Allocate sufficient space for the largest possible decrypted data */
|
||||
cs->session_key
|
||||
= (unsigned char*)malloc(EVP_PKEY_size(keypair->privkey));
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
cs->session_key_len = EVP_PKEY_decrypt(
|
||||
cs->session_key, M_ASN1_STRING_data(ri->encryptedKey),
|
||||
M_ASN1_STRING_length(ri->encryptedKey), keypair->privkey);
|
||||
+#pragma GCC diagnostic pop
|
||||
|
||||
if (cs->session_key_len <= 0) {
|
||||
OpensslPostErrors(M_ERROR, _("Failure decrypting the session key"));
|
||||
@@ -1502,8 +1508,11 @@
|
||||
ENGINE_load_pk11();
|
||||
# else
|
||||
// Load all the builtin engines.
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
ENGINE_load_builtin_engines();
|
||||
ENGINE_register_all_complete();
|
||||
+#pragma GCC diagnostic pop
|
||||
# endif
|
||||
|
||||
crypto_initialized = true;
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/lib/crypto_wrap.cc bareos-Release-21.0.0/core/src/lib/crypto_wrap.cc
|
||||
--- bareos-Release-21.0.0.orig/core/src/lib/crypto_wrap.cc 2022-03-09 09:03:32.073233925 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/lib/crypto_wrap.cc 2022-03-09 09:49:02.654850824 +0100
|
||||
@@ -70,7 +70,10 @@
|
||||
memcpy(r, plain, 8 * n);
|
||||
|
||||
# ifdef HAVE_OPENSSL
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
AES_set_encrypt_key(kek, 128, &key);
|
||||
+#pragma GCC diagnostic pop
|
||||
# endif
|
||||
|
||||
/*
|
||||
@@ -87,7 +90,10 @@
|
||||
memcpy(b, a, 8);
|
||||
memcpy(b + 8, r, 8);
|
||||
# ifdef HAVE_OPENSSL
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
AES_encrypt(b, b, &key);
|
||||
+#pragma GCC diagnostic pop
|
||||
# endif
|
||||
memcpy(a, b, 8);
|
||||
a[7] ^= n * j + i;
|
||||
@@ -123,7 +129,10 @@
|
||||
memcpy(r, cipher + 8, 8 * n);
|
||||
|
||||
# ifdef HAVE_OPENSSL
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
AES_set_decrypt_key(kek, 128, &key);
|
||||
+#pragma GCC diagnostic pop
|
||||
# endif
|
||||
|
||||
/*
|
||||
@@ -142,7 +151,10 @@
|
||||
|
||||
memcpy(b + 8, r, 8);
|
||||
# ifdef HAVE_OPENSSL
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
AES_decrypt(b, b, &key);
|
||||
+#pragma GCC diagnostic pop
|
||||
# endif
|
||||
memcpy(a, b, 8);
|
||||
memcpy(r, b + 8, 8);
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/lib/hmac.cc bareos-Release-21.0.0/core/src/lib/hmac.cc
|
||||
--- bareos-Release-21.0.0.orig/core/src/lib/hmac.cc 2022-03-09 09:03:32.073233925 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/lib/hmac.cc 2022-03-09 09:51:43.912235436 +0100
|
||||
@@ -48,9 +48,12 @@
|
||||
if (key_len > PAD_LEN) {
|
||||
MD5_CTX md5key;
|
||||
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&md5key);
|
||||
MD5_Update(&md5key, key, key_len);
|
||||
MD5_Final(keysig, &md5key);
|
||||
+#pragma GCC diagnostic pop
|
||||
|
||||
key = keysig;
|
||||
key_len = SIG_LEN;
|
||||
@@ -80,16 +83,22 @@
|
||||
}
|
||||
|
||||
/* perform inner MD5 */
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&md5c); /* start inner hash */
|
||||
MD5_Update(&md5c, k_ipad, PAD_LEN); /* hash inner pad */
|
||||
MD5_Update(&md5c, text, text_len); /* hash text */
|
||||
MD5_Final(hmac, &md5c); /* store inner hash */
|
||||
+#pragma GCC diagnostic pop
|
||||
|
||||
/* perform outer MD5 */
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&md5c); /* start outer hash */
|
||||
MD5_Update(&md5c, k_opad, PAD_LEN); /* hash outer pad */
|
||||
MD5_Update(&md5c, hmac, SIG_LEN); /* hash inner hash */
|
||||
MD5_Final(hmac, &md5c); /* store results */
|
||||
+#pragma GCC diagnostic pop
|
||||
}
|
||||
/*
|
||||
Test Vectors (Trailing '\0' of a character string not included in test):
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/lib/res.cc bareos-Release-21.0.0/core/src/lib/res.cc
|
||||
--- bareos-Release-21.0.0.orig/core/src/lib/res.cc 2022-03-09 09:03:32.079233939 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/lib/res.cc 2022-03-09 10:00:42.655395825 +0100
|
||||
@@ -551,9 +551,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&md5c);
|
||||
MD5_Update(&md5c, (unsigned char*)(lc->str), lc->str_len);
|
||||
MD5_Final(digest, &md5c);
|
||||
+#pragma GCC diagnostic pop
|
||||
for (i = j = 0; i < sizeof(digest); i++) {
|
||||
sprintf(&sig[j], "%02x", digest[i]);
|
||||
j += 2;
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/lib/tls_openssl_private.cc bareos-Release-21.0.0/core/src/lib/tls_openssl_private.cc
|
||||
--- bareos-Release-21.0.0.orig/core/src/lib/tls_openssl_private.cc 2022-03-09 09:03:32.080233942 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/lib/tls_openssl_private.cc 2022-03-09 09:54:18.069592684 +0100
|
||||
@@ -217,7 +217,10 @@
|
||||
OpensslPostErrors(M_FATAL, _("Unable to open DH parameters file"));
|
||||
return false;
|
||||
}
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
DH* dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
|
||||
+#pragma GCC diagnostic pop
|
||||
BIO_free(bio);
|
||||
if (!dh) {
|
||||
OpensslPostErrors(M_FATAL,
|
||||
@@ -227,7 +230,10 @@
|
||||
if (!SSL_CTX_set_tmp_dh(openssl_ctx_, dh)) {
|
||||
OpensslPostErrors(M_FATAL,
|
||||
_("Failed to set TLS Diffie-Hellman parameters"));
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
DH_free(dh);
|
||||
+#pragma GCC diagnostic pop
|
||||
return false;
|
||||
}
|
||||
SSL_CTX_set_options(openssl_ctx_, SSL_OP_SINGLE_DH_USE);
|
||||
diff -Naur bareos-Release-21.0.0.orig/core/src/lib/util.cc bareos-Release-21.0.0/core/src/lib/util.cc
|
||||
--- bareos-Release-21.0.0.orig/core/src/lib/util.cc 2022-03-09 09:03:32.080233942 +0100
|
||||
+++ bareos-Release-21.0.0/core/src/lib/util.cc 2022-03-09 09:58:06.378097402 +0100
|
||||
@@ -819,14 +819,20 @@
|
||||
Bsnprintf(s + strlen(s), ss, "%lu", (uint32_t)getuid());
|
||||
Bsnprintf(s + strlen(s), ss, "%lu", (uint32_t)getgid());
|
||||
#endif
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&md5c);
|
||||
MD5_Update(&md5c, (uint8_t*)s, strlen(s));
|
||||
MD5_Final(md5key, &md5c);
|
||||
+#pragma GCC diagnostic pop
|
||||
Bsnprintf(s + strlen(s), ss, "%lu",
|
||||
(uint32_t)((time(NULL) + 65121) ^ 0x375F));
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
MD5_Init(&md5c);
|
||||
MD5_Update(&md5c, (uint8_t*)s, strlen(s));
|
||||
MD5_Final(md5key1, &md5c);
|
||||
+#pragma GCC diagnostic pop
|
||||
#define nextrand (md5key[j] ^ md5key1[j])
|
||||
if (mode) {
|
||||
for (j = k = 0; j < 16; j++) {
|
||||
Reference in New Issue
Block a user