Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
991addc
spelling: access
jsoref Feb 14, 2025
c8afd40
spelling: accidentally
jsoref Feb 14, 2025
eb8365a
spelling: address
jsoref Feb 14, 2025
258a877
spelling: after
jsoref Feb 14, 2025
dfd3dbf
spelling: backoff
jsoref Feb 14, 2025
6cf2542
spelling: banana
jsoref Feb 14, 2025
82b26a8
spelling: builtin
jsoref Feb 14, 2025
17396e8
spelling: cannot
jsoref Feb 13, 2025
6d1ccb4
spelling: case-sensitive
jsoref Feb 13, 2025
61d2aa4
spelling: client
jsoref Feb 14, 2025
fbfa414
spelling: committed
jsoref Feb 14, 2025
74adeb0
spelling: concatenated
jsoref Feb 14, 2025
a7f6bee
spelling: connection
jsoref Feb 14, 2025
6715a73
spelling: couldn't
jsoref Feb 14, 2025
8d95556
spelling: digest
jsoref Feb 17, 2025
23b57c4
spelling: dsasl
jsoref Feb 17, 2025
8ebe7d1
spelling: encountered
jsoref Feb 14, 2025
c787b56
spelling: filter
jsoref Feb 13, 2025
5a2a356
spelling: for
jsoref Feb 13, 2025
ad7f250
spelling: fscked
jsoref Feb 17, 2025
724d7c9
spelling: greater
jsoref Feb 13, 2025
7750df0
spelling: header size
jsoref Feb 16, 2025
89d655d
spelling: hexdigest
jsoref Feb 17, 2025
c5eed1f
spelling: hyphen
jsoref Feb 14, 2025
bf5969b
spelling: its
jsoref Feb 13, 2025
94bd421
spelling: less
jsoref Feb 13, 2025
34d72bb
spelling: mailbox
jsoref Feb 14, 2025
592aeaa
spelling: nonexistent
jsoref Feb 13, 2025
2128d34
spelling: occurred
jsoref Feb 14, 2025
3a8ec75
spelling: search
jsoref Feb 17, 2025
34eb65d
spelling: spurious
jsoref Feb 14, 2025
983e9fd
spelling: timeout
jsoref Feb 17, 2025
8607ed7
spelling: trailing
jsoref Feb 14, 2025
8df22cf
spelling: unwind
jsoref Feb 14, 2025
357cdce
spelling: with
jsoref Feb 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion m4/dovecot.m4
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ AC_DEFUN([DC_DOVECOT],[
cd $old
DISTCHECK_CONFIGURE_FLAGS="--with-dovecot=$abs_dovecotdir --without-dovecot-install-dirs"

dnl Make sure dovecot-config doesn't accidentically override flags
dnl Make sure dovecot-config doesn't accidentally override flags
ORIG_CFLAGS="$CFLAGS"
ORIG_LDFLAGS="$LDFLAGS"
ORIG_BINARY_CFLAGS="$BINARY_CFLAGS"
Expand Down
2 changes: 1 addition & 1 deletion m4/want_unwind.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AC_DEFUN([DOVECOT_WANT_UNWIND], [
have_libunwind=no

AS_IF([test "$want_libunwind" = "yes"], [
AC_MSG_ERROR([cannot build with libuwind support: unwind library (libunwind-generic) not found])
AC_MSG_ERROR([cannot build with libunwind support: unwind library (libunwind-generic) not found])
])
])
])
Expand Down
2 changes: 1 addition & 1 deletion src/auth/passdb-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void passdb_cache_init(const struct auth_settings *set)

if (restrict_get_process_size(&limit) == 0 &&
set->cache_size > (uoff_t)limit) {
i_warning("auth_cache_size (%"PRIuUOFF_T"M) is higher than "
i_warning("auth_cache_size (%"PRIuUOFF_T"M) is greater than "
"process VSZ limit (%"PRIuUOFF_T"M)",
set->cache_size/1024/1024,
(uoff_t)(limit/1024/1024));
Expand Down
2 changes: 1 addition & 1 deletion src/doveadm/dsync/dsync-brain-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ int dsync_brain_sync_mailbox_open(struct dsync_brain *brain,
}

if (last_common_uid != 0) {
/* if last_common_* is higher than our current ones it means
/* if last_common_* is greater than our current ones it means
that the incremental sync state is stale and we need to do
a full resync */
if (status.uidnext < last_common_uid) {
Expand Down
4 changes: 2 additions & 2 deletions src/doveadm/dsync/dsync-mailbox-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -1985,10 +1985,10 @@ dsync_mailbox_import_saved_newmail(struct dsync_mailbox_importer *importer,
are larger than we're committing.

Note that if any existing UIDs have been changed, the new UID is
usually higher than anything that is being saved so we can't do
usually greater than anything that is being saved so we can't do
an intermediate commit. It's too much extra work to try to handle
that situation. So here this never happens, because then
array_count(wanted_uids) is always higher than first_unsaved_idx. */
array_count(wanted_uids) is always greater than first_unsaved_idx. */
if (importer->saves_since_commit >= importer->commit_msgs_interval &&
importer->first_unsaved_idx == array_count(&importer->wanted_uids)) {
if (dsync_mailbox_import_commit(importer, FALSE) < 0)
Expand Down
2 changes: 1 addition & 1 deletion src/doveadm/test-doveadm-cmd-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static void test_switches(void)
line("cmd -2 value2 -1 arg1"));
test_case("kwswitch_after_12", 0, assert_switch12_1_pos_args, &cmdv2_switches,
line("cmd arg1 -1 -2 value2"));
test_case("kwswitch_fater_21", 0, assert_switch12_1_pos_args, &cmdv2_switches,
test_case("kwswitch_after_21", 0, assert_switch12_1_pos_args, &cmdv2_switches,
line("cmd arg1 -2 value2 -1"));
}

Expand Down
2 changes: 1 addition & 1 deletion src/imap/imap-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ static bool client_skip_line(struct client *client)
static void client_idle_output_timeout(struct client *client)
{
client_destroy(client, t_strdup_printf(
"Client has not read server output for for %"PRIdTIME_T" secs",
"Client has not read server output for %"PRIdTIME_T" secs",
ioloop_time - client->last_output));
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib-auth/auth-scram-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ auth_scram_parse_client_finish(struct auth_scram_server *server ATTR_UNUSED,
return 0;
}

bool auth_scram_server_acces_granted(struct auth_scram_server *server)
bool auth_scram_server_access_granted(struct auth_scram_server *server)
{
return (server->state == AUTH_SCRAM_SERVER_STATE_SERVER_FINAL);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib-auth/auth-scram-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void auth_scram_server_init(struct auth_scram_server *server_r, pool_t pool,
void auth_scram_server_deinit(struct auth_scram_server *server);

/* Returns TRUE if authentication was concluded successfully. */
bool auth_scram_server_acces_granted(struct auth_scram_server *server);
bool auth_scram_server_access_granted(struct auth_scram_server *server);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm told this function isn't used yet but will be soon, which means now is the right time to fix its name.


/* Pass client input to the server. Returns 1 if server output is available, 0
if no server output is available yet (e.g. pending credentials lookup), and
Expand Down
8 changes: 4 additions & 4 deletions src/lib-compression/istream-zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct zlib_istream {
bool header_read:1;
bool trailer_read:1;
bool zs_closed:1;
bool starting_concated_output:1;
bool starting_concatenated_output:1;
};

static void i_stream_zlib_init(struct zlib_istream *zstream);
Expand Down Expand Up @@ -191,9 +191,9 @@ static ssize_t i_stream_zlib_read(struct istream_private *stream)
return -1;
}
/* Multiple gz streams concatenated together */
zstream->starting_concated_output = TRUE;
zstream->starting_concatenated_output = TRUE;
}
if (zstream->starting_concated_output) {
if (zstream->starting_concatenated_output) {
/* make sure there actually is something in parent stream.
we don't want to reset the stream unless we actually see
some concatenated output. */
Expand All @@ -215,7 +215,7 @@ static ssize_t i_stream_zlib_read(struct istream_private *stream)
zstream->header_read = FALSE;
zstream->trailer_read = FALSE;
zstream->crc32 = 0;
zstream->starting_concated_output = FALSE;
zstream->starting_concatenated_output = FALSE;

(void)inflateEnd(&zstream->zs);
i_stream_zlib_init(zstream);
Expand Down
12 changes: 6 additions & 6 deletions src/lib-dcrypt/dcrypt-openssl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2565,15 +2565,15 @@ dcrypt_openssl_load_public_key_dovecot_v1(struct dcrypt_public_key **key_r,
EVP_PKEY_set1_EC_KEY(key, eckey);
EC_KEY_free(eckey);
/* make sure digest matches */
buffer_t *dgst = t_buffer_create(32);
buffer_t *digest = t_buffer_create(32);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This digest and hexdigest seem to be intentional originally, so when we squash the typo fixes into one commit, I think better to keep these two as separate.

struct dcrypt_public_key tmp;
i_zero(&tmp);
tmp.key = key;
if (!dcrypt_openssl_public_key_id_old(&tmp, dgst, error_r)) {
if (!dcrypt_openssl_public_key_id_old(&tmp, digest, error_r)) {
EVP_PKEY_free(key);
return FALSE;
}
if (strcmp(binary_to_hex(dgst->data, dgst->used),
if (strcmp(binary_to_hex(digest->data, digest->used),
input[len-1]) != 0) {
*error_r = "Key id mismatch after load";
EVP_PKEY_free(key);
Expand Down Expand Up @@ -2610,15 +2610,15 @@ dcrypt_openssl_load_public_key_dovecot_v2(struct dcrypt_public_key **key_r,
}

/* make sure digest matches */
buffer_t *dgst = t_buffer_create(32);
buffer_t *digest = t_buffer_create(32);
struct dcrypt_public_key tmpkey;
i_zero(&tmpkey);
tmpkey.key = pkey;
if (!dcrypt_openssl_public_key_id(&tmpkey, "sha256", dgst, error_r)) {
if (!dcrypt_openssl_public_key_id(&tmpkey, "sha256", digest, error_r)) {
EVP_PKEY_free(pkey);
return FALSE;
}
if (strcmp(binary_to_hex(dgst->data, dgst->used), input[len-1]) != 0) {
if (strcmp(binary_to_hex(digest->data, digest->used), input[len-1]) != 0) {
*error_r = "Key id mismatch after load";
EVP_PKEY_free(pkey);
return FALSE;
Expand Down
12 changes: 6 additions & 6 deletions src/lib-dcrypt/dcrypt-openssl3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2585,16 +2585,16 @@ dcrypt_openssl_load_public_key_dovecot_v1(struct dcrypt_public_key **key_r,
EC_GROUP_free(g);
i_assert(pkey != NULL);
/* make sure digest matches */
buffer_t *dgst = t_buffer_create(32);
buffer_t *digest = t_buffer_create(32);
struct dcrypt_public_key tmp;
i_zero(&tmp);
tmp.key = pkey;
if (!dcrypt_openssl_public_key_id_old(&tmp, dgst, error_r)) {
if (!dcrypt_openssl_public_key_id_old(&tmp, digest, error_r)) {
EVP_PKEY_free(pkey);
return FALSE;
}

if (strcmp(binary_to_hex(dgst->data, dgst->used),
if (strcmp(binary_to_hex(digest->data, digest->used),
input[len-1]) != 0) {
*error_r = "Key id mismatch after load";
EVP_PKEY_free(pkey);
Expand Down Expand Up @@ -2626,15 +2626,15 @@ dcrypt_openssl_load_public_key_dovecot_v2(struct dcrypt_public_key **key_r,
}

/* make sure digest matches */
buffer_t *dgst = t_buffer_create(32);
buffer_t *digest = t_buffer_create(32);
struct dcrypt_public_key tmpkey = {
.key = pkey
};
if (!dcrypt_openssl_public_key_id(&tmpkey, "sha256", dgst, error_r)) {
if (!dcrypt_openssl_public_key_id(&tmpkey, "sha256", digest, error_r)) {
EVP_PKEY_free(pkey);
return FALSE;
}
if (strcmp(binary_to_hex(dgst->data, dgst->used), input[len-1]) != 0) {
if (strcmp(binary_to_hex(digest->data, digest->used), input[len-1]) != 0) {
*error_r = "Key id mismatch after load";
EVP_PKEY_free(pkey);
return FALSE;
Expand Down
24 changes: 12 additions & 12 deletions src/lib-dcrypt/istream-decrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ i_stream_decrypt_key(struct decrypt_istream *stream, const char *malg,
enum dcrypt_key_type ktype;
int keys;
bool have_key = FALSE;
unsigned char dgst[32];
unsigned char digest[32];
uint32_t val;
buffer_t buf;

Expand All @@ -346,7 +346,7 @@ i_stream_decrypt_key(struct decrypt_istream *stream, const char *malg,

/* if we have a key, prefab the digest */
if (stream->priv_key != NULL) {
buffer_create_from_data(&buf, dgst, sizeof(dgst));
buffer_create_from_data(&buf, digest, sizeof(digest));
if (!dcrypt_key_id_private(stream->priv_key, "sha256", &buf,
&error)) {
io_stream_set_error(&stream->istream.iostream,
Expand All @@ -364,23 +364,23 @@ i_stream_decrypt_key(struct decrypt_istream *stream, const char *malg,

/* for each key */
for(;keys>0;keys--) {
if ((size_t)(end-data) < 1 + (ssize_t)sizeof(dgst))
if ((size_t)(end-data) < 1 + (ssize_t)sizeof(digest))
return 0;
ktype = *data++;

if (stream->priv_key != NULL) {
/* see if key matches to the one we have */
if (memcmp(dgst, data, sizeof(dgst)) == 0) {
if (memcmp(digest, data, sizeof(digest)) == 0) {
have_key = TRUE;
break;
}
} else if (stream->key_callback != NULL) {
const char *hexdgst = /* digest length */
binary_to_hex(data, sizeof(dgst));
const char *hexdigest = /* digest length */
binary_to_hex(data, sizeof(digest));
if (stream->priv_key != NULL)
dcrypt_key_unref_private(&stream->priv_key);
/* hope you going to give us right key.. */
int ret = stream->key_callback(hexdgst,
int ret = stream->key_callback(hexdigest,
&stream->priv_key, &error, stream->key_context);
if (ret < 0) {
io_stream_set_error(&stream->istream.iostream,
Expand All @@ -393,7 +393,7 @@ i_stream_decrypt_key(struct decrypt_istream *stream, const char *malg,
break;
}
}
data += sizeof(dgst);
data += sizeof(digest);

/* wasn't correct key, skip over some data */
if (!get_msb32(&data, end, &val) ||
Expand All @@ -409,7 +409,7 @@ i_stream_decrypt_key(struct decrypt_istream *stream, const char *malg,
return -1;
}

data += sizeof(dgst);
data += sizeof(digest);

const unsigned char *ephemeral_key;
uint32_t ep_key_len;
Expand Down Expand Up @@ -965,16 +965,16 @@ i_stream_decrypt_read(struct istream_private *stream)
if ((dstream->flags & IO_STREAM_ENC_INTEGRITY_HMAC) ==
IO_STREAM_ENC_INTEGRITY_HMAC) {
size_t maclen = dcrypt_ctx_hmac_get_digest_length(dstream->ctx_mac);
unsigned char dgst[maclen];
unsigned char digest[maclen];
buffer_t db;
buffer_create_from_data(&db, dgst, sizeof(dgst));
buffer_create_from_data(&db, digest, sizeof(digest));
if (!dcrypt_ctx_hmac_final(dstream->ctx_mac, &db, &error)) {
io_stream_set_error(&stream->iostream,
"Cannot verify MAC: %s", error);
stream->istream.stream_errno = EIO;
return -1;
}
if (memcmp(dgst, data + decrypt_size, maclen) != 0) {
if (memcmp(digest, data + decrypt_size, maclen) != 0) {
io_stream_set_error(&stream->iostream,
"Cannot verify MAC: mismatch");
stream->istream.stream_errno = EIO;
Expand Down
22 changes: 11 additions & 11 deletions src/lib-dcrypt/test-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static void test_static_v1_input(void)
ssize_t siz;
const struct hash_method *hash = hash_method_lookup("sha256");
unsigned char hash_ctx[hash->context_size];
unsigned char hash_dgst[hash->digest_size];
unsigned char hash_digest[hash->digest_size];
hash->init(hash_ctx);

test_begin("test_static_v1_input");
Expand All @@ -100,10 +100,10 @@ static void test_static_v1_input(void)

i_stream_unref(&is_4);

hash->result(hash_ctx, hash_dgst);
hash->result(hash_ctx, hash_digest);

test_assert(strcmp(test_sample_v1_hash,
binary_to_hex(hash_dgst, sizeof(hash_dgst))) == 0);
binary_to_hex(hash_digest, sizeof(hash_digest))) == 0);

test_end();
}
Expand All @@ -113,7 +113,7 @@ static void test_static_v1_input_short(void)
ssize_t siz;
const struct hash_method *hash = hash_method_lookup("sha256");
unsigned char hash_ctx[hash->context_size];
unsigned char hash_dgst[hash->digest_size];
unsigned char hash_digest[hash->digest_size];
hash->init(hash_ctx);

test_begin("test_static_v1_input_short");
Expand All @@ -137,10 +137,10 @@ static void test_static_v1_input_short(void)

i_stream_unref(&is_4);

hash->result(hash_ctx, hash_dgst);
hash->result(hash_ctx, hash_digest);

test_assert(strcmp(test_sample_v1_short_hash,
binary_to_hex(hash_dgst, sizeof(hash_dgst))) == 0);
binary_to_hex(hash_digest, sizeof(hash_digest))) == 0);

test_end();
}
Expand All @@ -152,7 +152,7 @@ static void test_static_v2_input(void)
ssize_t amt;
const struct hash_method *hash = hash_method_lookup("sha256");
unsigned char hash_ctx[hash->context_size];
unsigned char hash_dgst[hash->digest_size];
unsigned char hash_digest[hash->digest_size];
hash->init(hash_ctx);

struct istream *is_1 =
Expand All @@ -174,10 +174,10 @@ static void test_static_v2_input(void)

i_stream_unref(&is_4);

hash->result(hash_ctx, hash_dgst);
hash->result(hash_ctx, hash_digest);

test_assert(strcmp(test_sample_v2_hash,
binary_to_hex(hash_dgst, sizeof(hash_dgst))) == 0);
binary_to_hex(hash_digest, sizeof(hash_digest))) == 0);

test_end();

Expand All @@ -203,8 +203,8 @@ static void test_static_v2_input(void)
o_stream_close(os_2);
i_stream_close(is_2);

hash->result(hash_ctx, hash_dgst);
printf("%s\n", binary_to_hex(hash_dgst, sizeof(hash_dgst)));
hash->result(hash_ctx, hash_digest);
printf("%s\n", binary_to_hex(hash_digest, sizeof(hash_digest)));
*/
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib-dns-client/dns-lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ struct dns_client;
/* Internally, the dns methods yield via lua_yieldk() as implemented in Lua
5.3 and newer. */

void dlua_push_dns_client(lua_State *L, struct dns_client *cliet);
void dlua_push_dns_client(lua_State *L, struct dns_client *client);
struct dns_client *dlua_check_dns_client(lua_State *L, int idx);

#endif
Expand Down
2 changes: 1 addition & 1 deletion src/lib-http/http-client-peer.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ static void http_client_peer_drop(struct http_client_peer **_peer)

if (http_client_peer_shared_start_backoff_timer(pshared)) {
e_debug(peer->event,
"Dropping peer (waiting for backof timeout)");
"Dropping peer (waiting for backoff timeout)");

/* Will disconnect any pending connections */
http_client_peer_trigger_request_handler(peer);
Expand Down
4 changes: 2 additions & 2 deletions src/lib-http/http-client.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ struct http_client_settings {

if > 0, the maximum will be enforced across all IPs for that host,
meaning that IPs may be tried more than once eventually if the number
of IPs is smaller than the specified maximum attempts. If the number
of IPs is higher than the maximum attempts, not all IPs are tried.
of IPs is less than the specified maximum attempts. If the number
of IPs is greater than the maximum attempts, not all IPs are tried.
If 0, all IPs are tried at most once.
*/
unsigned int max_connect_attempts;
Expand Down
Loading