search for: t_strdup_until

Displaying 16 results from an estimated 16 matches for "t_strdup_until".

2004 Jul 31
1
Patch: fix $-terminated MCF
p/t_strdup_until wasn't returning a terminated string: Index: src/lib/strfuncs.c =================================================================== RCS file: /home/cvs/dovecot/src/lib/strfuncs.c,v retrieving revision 1.41 diff -u -p -r1.41 strfuncs.c --- src/lib/strfuncs.c 18 Jul 2004 01:44:59 -0000 1.41 +++...
2017 Aug 03
2
proxy-dict with tcp connection
...') { /* default path */ path = t_strconcat(set->base_dir, "/"DEFAULT_DICT_SERVER_SOCKET_FNAME, NULL); @@ -784,7 +802,13 @@ client_dict_init(struct dict *driver, const char *uri, path = t_strconcat(set->base_dir, "/", t_strdup_until(uri, dest_uri), NULL); } - connection_init_client_unix(dict_connections, &dict->conn.conn, path); + if (port > 0) { + connection_init_client_ip(dict_connections, &dict->conn.conn, &ip, port); + } else { + connection_init_client_unix(dict_connections,...
2017 Jul 03
1
[PATCH] dsync: fix splitting login from host
...644 --- a/src/doveadm/doveadm-dsync.c +++ b/src/doveadm/doveadm-dsync.c @@ -479,7 +479,7 @@ parse_ssh_location(const char *location, const char *username) { const char *host, *login; - host = strchr(location, '@'); + host = strrchr(location, '@'); if (host != NULL) login = t_strdup_until(location, host++); else { -- 2.11.0
2006 Nov 18
2
Auth checking also the service
Hello everyone. I'm switching to dovecot from courier-imap and after some problems with Apple Mail client, now everything seems to be fine. The only problem that I have not solved yet is to check also the service (pop3, pop3s, imap, imaps) in the authentication phase. In courier-authlib I do this: MYSQL_SELECT_CLAUSE SELECT username, \ password, \
2010 Jun 29
1
NFS(4) IMAP Quota
...+210,7 @@ #ifdef FS_QUOTA_SOLARIS #ifdef HAVE_RQUOTA - if (strcmp(mount->type, "nfs") == 0) { + if (strcmp(mount->type, "nfs") == 0 || strcmp(mount->type, "nfs4") == 0) { /* using rquota for this mount */ } else #endif @@ -319,6 +319,11 @@ host = t_strdup_until(mount->device_path, path); path++; + /* For NFSv4, we send the filesystem path without initial /. Server prepends proper + * NFS pseudoroot automatically and uses this for detection of NFSv4 mounts. */ + if (strcmp(root->mount->type, "nfs4") == 0) + while (*path == '/'...
2006 May 10
1
dovecot and vmailmgr
.../* <Maildir> [:INBOX=<dir>] [:INDEX=<dir>] [:CONTROL=<dir>] */ if (debug) i_info("maildir: data=%s", data); p = strchr(data, ':'); if (p == NULL) root_dir = data; else { root_dir = t_strdup_until(data, p); this way, a former data = /var/maildirs/foo/users/j:doe:INDEX=... is truncated to /var/maildirs/foo/users/j . This opens the much worse possibility for user "j:doe" to be accounted into user "j" account after authentication. It is difficult to get a solid fix her...
2017 Nov 03
1
Bug: lmtp proxy does not quote local parts with spaces
...tic char *lmtp_proxy_escape_address(pool_t pool, const char *address) { + const char *domain; + string_t *dest; + + domain = strrchr(address, '@'); + dest = str_new(pool, 128); + + if (domain == NULL) { + str_append_maybe_escape(dest, address, FALSE); + } else { + const char *local_part = t_strdup_until(address, domain); + str_append_maybe_escape(dest, local_part, FALSE); + str_append(dest, domain); + } + + return str_free_without_data(&dest); +} + int lmtp_proxy_add_rcpt(struct lmtp_proxy *proxy, const char *address, const struct lmtp_proxy_rcpt_settings *set) { @@ -301,10 +320,10 @@...
2009 Aug 09
1
Wiki entry for expire plugin, PostgreSQL trigger needs update
...DICT_ITERATE_FLAG_SORT_BY_VALUE); /* We'll get the oldest values (timestamps) first */ while (dict_iterate(iter, &key, &value) > 0) { /* key = DICT_EXPIRE_PREFIX<user>/<mailbox> */ userp = key + strlen(DICT_EXPIRE_PREFIX); [...] T_BEGIN { username = t_strdup_until(userp, p); If this code does somehow iterate usernames which are not present in the dict, I apologize. Cheers Stefan
2014 Jan 28
1
recipient_delimiter -- feature request
Hi, It would be nice if the recipient_delimiter configuration option supported multiple recipient delimiters as Postfix now does. e.g. now if I set: recipient_delimiter = +- in Postfix, then test-extension at sample.com and test+extension at sample.com are both recognized. But if I set: recipient_delimiter = +- in Dovecot, neither of the above are recognized and instead test+-extension at
2014 Apr 24
1
maildir compressed message fix patch
...;storage, "stat(%s) failed: %m", path); return -1; - } + } + } + i_stream_unref(&fstream); newpath = t_strdup_printf("%s/%s,S=%"PRIuUOFF_T"%s", dir, t_strdup_until(fname, extra),
2017 Aug 03
0
proxy-dict with tcp connection
...ult path */ > path = t_strconcat(set->base_dir, > "/"DEFAULT_DICT_SERVER_SOCKET_FNAME, NULL); > @@ -784,7 +802,13 @@ client_dict_init(struct dict *driver, const char *uri, > path = t_strconcat(set->base_dir, "/", > t_strdup_until(uri, dest_uri), NULL); > } > - connection_init_client_unix(dict_connections, &dict->conn.conn, path); > + if (port > 0) { > + connection_init_client_ip(dict_connections, &dict->conn.conn, > &ip, port); > + } else { > + connection...
2005 Feb 18
1
login: Missing protocol from server name 'imap'
I also tried the 0.99 and hacking login-process.c, with no success. It seems to expect a slash delimited string like 'name/protocol' and it just gets "imap" there, but I didn't figure out where this string comes from or what it ought to be. So I would be grateful if someone could enlighten me. Thanks, Peter --- Some blafa: Feb 17 21:45:44 office dovecot: Dovecot
2010 Apr 09
4
Patch: support URLAUTH, BURL, CATENATE
...imap_url_parts *parts) +{ + const char *rump, *p; + size_t s; + + rump = url; + + // "imap://" ... + if (strncasecmp(url, "imap://", 7) == 0) { + url += 7; + + // ... enc-user ... + s = strcspn(url, ";@"); + if (s <= 0) + return; + parts->user = t_strdup_until(url, url + s); + url += s; + + // ... [";AUTH=" ( "*" / enc_auth_type )] ... + if (strncasecmp(url, ";AUTH=", 6) == 0) { + url += 6; + p = strchr(url, '@'); + if (p == NULL) + return; + parts->auth_type = t_strdup_until(url, p); + url = p; +...
2006 Feb 03
1
passwd-userdb with args
...t_spaces(args, " "); + ARRAY_CREATE(&module->template, auth_userdb->auth->pool, + const char *, strarray_length(tmp)); + + t_push(); + for (; *tmp != NULL; tmp++) { + value = strchr(*tmp, '='); + if (value == NULL) + key = *tmp; + else { + key = t_strdup_until(*tmp, value); + value++; + } + + key = p_strdup(auth_userdb->auth->pool, key); + value = p_strdup(auth_userdb->auth->pool, value); + + array_append(&module->template, &key, 1); + array_append(&module->template, &value, 1); + } + t_pop(); + + retu...
2017 Nov 01
2
Bug: lmtp proxy does not quote local parts with spaces
Hi again, I've not heard anything further regarding this bug, so I've had a look at the code. To restate the bug in a more precise way: LMTP in dovecot treats external RFC822 email addresses in the envelope recipient and internal usernames as almost identical/interchangeable. This is incorrect and leads to issues when attempting to use director as an LMTP proxy to proxy to recipients
2006 Jun 26
2
[PATCH, RFC 3/13] OTP: parity table
Add OTP parity table. diff -urdpNX /usr/share/dontdiff -x Makefile dovecot.vanilla/src/lib-otp/otp-parity.c dovecot/src/lib-otp/otp-parity.c --- dovecot.vanilla/src/lib-otp/otp-parity.c 1970-01-01 03:00:00.000000000 +0300 +++ dovecot/src/lib-otp/otp-parity.c 2006-06-23 13:44:31.161891112 +0400 @@ -0,0 +1,29 @@ +/* + * OTP parity table. + * + * Copyright (c) 2006 Andrey Panin <pazke at