search for: t_strsplit

Displaying 6 results from an estimated 6 matches for "t_strsplit".

2017 Aug 03
2
proxy-dict with tcp connection
...OUT_MSECS; unsigned int warn_slow_msecs = DICT_CLIENT_DEFAULT_WARN_SLOW_MSECS; @@ -772,7 +776,21 @@ client_dict_init(struct dict *driver, const char *uri, dict->warn_slow_msecs = warn_slow_msecs; i_array_init(&dict->cmds, 32); - if (uri[0] == ':') { + args = t_strsplit(uri, ":"); + for(argc=0; args[argc] != NULL; argc++); + + if (argc == 3) { /* host:ip:somewhere --> argc == 3 */ + if (net_addr2ip(args[0], &ip) < 0) { + *error_r = t_strdup_printf("Invalid IP: %s in URI: %s", args[0], uri); + retu...
2011 Sep 16
2
[PATCH] SCRAM-SHA-1 authentication
Hy, over the last days I have implemented SCRAM-SHA-1 in Dovecot's 2.1 branch. It does not do SCRAM-SHA-1-PLUS, but should be extendable enough to introduce it later. There are some checks for the message format which (assuming the client acts correclty) are not strictly necessary during parsing. This is partially in the hope that it might aid client implementers, partially because it (IMHO)
2012 Oct 02
2
[PATCH] Add SCRAM-SHA-1 password scheme
...*const *fields; + size_t len; + int iter; + const char *salt; struct scram_auth_request *request = (struct scram_auth_request *)auth_request; - const char *server_final_message; switch (result) { case PASSDB_RESULT_OK: - if (!verify_credentials(request, credentials, size)) { + fields = t_strsplit(t_strndup(credentials, size), ","); + + iter = atoi(fields[0]); + salt = fields[1]; + + len = strlen(fields[2]); + request->stored_key = buffer_create_dynamic(request->pool, + MAX_BASE64_DECODED_SIZE(len)); + if (base64_decode(fields[2], len, NULL, + request->stored...
2017 Aug 03
0
proxy-dict with tcp connection
...low_msecs = DICT_CLIENT_DEFAULT_WARN_SLOW_MSECS; > > @@ -772,7 +776,21 @@ client_dict_init(struct dict *driver, const char *uri, > dict->warn_slow_msecs = warn_slow_msecs; > i_array_init(&dict->cmds, 32); > > - if (uri[0] == ':') { > + args = t_strsplit(uri, ":"); > + for(argc=0; args[argc] != NULL; argc++); > + > + if (argc == 3) { /* host:ip:somewhere --> argc == 3 */ > + if (net_addr2ip(args[0], &ip) < 0) { > + *error_r = t_strdup_printf("Invalid IP: %s in URI: %s", > ar...
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, \
2006 Feb 03
0
rquotad (NFS) quota plugin
...a; + const char *const *qroots; + size_t qr_idx; + pool_t pool; + + pool = pool_alloconly_create("quota", 1024); + quota = p_new(pool, struct rquotad_quota, 1); + quota->pool = pool; + quota->quota = rquotad_quota; + + debugmsg("starting quota init"); + qroots = t_strsplit(data, ","); + for (qr_idx = 0; qroots[qr_idx] != NULL; qr_idx++) { + /* NOTHING */; + } + debugmsg("found %d quotaroots", qr_idx); + quota->roots = p_new(pool, struct rquotad_quota_root, qr_idx); + quota->nroots = qr_idx; + for (qr_idx = 0; qroots[qr_idx] != NULL;...