search for: t_str_new

Displaying 20 results from an estimated 49 matches for "t_str_new".

2016 Jul 26
2
[BUG] Re: auth_bind with "()" in username not working
...7,7 @@ ldap_verify_plain_auth_bind_userdn(struct auth_request *auth_request, brequest->request.type = LDAP_REQUEST_TYPE_BIND; - vars = auth_request_get_var_expand_table(auth_request, ldap_escape); + vars = auth_request_get_var_expand_table(auth_request, NULL); dn = t_str_new(512); var_expand(dn, conn->set.auth_bind_userdn, vars);
2014 Dec 12
0
PATCH - add username_format to the PAM auth module
...ts_left; unsigned int pam_setcred:1; unsigned int pam_session:1; unsigned int failure_show_msg:1; + unsigned int pam_allow_transform:1; }; struct pam_conv_context { @@ -67,6 +68,13 @@ char *string; int i; + const struct var_expand_table *table; + string_t *username; + + username = t_str_new(256); + table = auth_request_get_var_expand_table(ctx->request, auth_request_str_escape); + var_expand(username, passdb->username_format, table); + *resp_r = NULL; resp = calloc(num_msg, sizeof(struct pam_response)); @@ -82,7 +90,7 @@ case PAM_PROMPT_ECHO_ON: /* Assume we're...
2003 Nov 04
0
PATCH: make local IP address available to auth modules
The attached patch makes the local IP address to which the client connected available to the authentication modules; i.e., the local IP address is available for substitution as %i for the mysql and pgsql modules. We needed this feature to support thousands of our legacy accounts which are authenticated by username/local_part (not the full email address) and IP address (one per domain). Timo,
2008 Jul 10
2
A couple of dovecot issues I've noted recently...
...080b1652 in mem_block_alloc (min_size=0) at data-stack.c:192 #14510 0x080b1811 in t_malloc_real (size=16, permanent=true) at data-stack.c:244 #14511 0x080b1890 in t_malloc0 (size=16) at data-stack.c:279 #14512 0x080b8715 in pool_datastack_create () at mempool-datastack.c:51 #14513 0x080bda2b in t_str_new (initial_size=512) at str.c:17 #14514 0x080b21f3 in internal_handler (log_type=70 'F', format=0x80cdd64 "mem_block_alloc(): Out of memory when allocating %u bytes", args=0x76b96d8 "\020") at failures.c:383 #14515 0x080b22b6 in i_internal_fatal_handler (status=83, fm...
2005 Jan 14
0
base dn and filter strings are concatenated
...zuo Moriwaka <moriwaka at valinux.co.jp> Index: src/auth/passdb-ldap.c =================================================================== RCS file: /home/cvs/dovecot/src/auth/passdb-ldap.c,v retrieving revision 1.21 diff -r1.21 passdb-ldap.c 161a162 > str_free(str); 162a164 > str = t_str_new(512); 172c174 < conn->set.base, conn->set.scope, filter, --- > base, conn->set.scope, filter, Index: src/auth/userdb-ldap.c =================================================================== RCS file: /home/cvs/dovecot/src/auth/userdb-ldap.c,v retrieving revision...
2012 Oct 02
2
[PATCH] Add SCRAM-SHA-1 password scheme
...r, const char *salt) { unsigned char snonce[SCRAM_SERVER_NONCE_LEN+1]; string_t *str; @@ -84,12 +63,9 @@ snonce[sizeof(snonce)-1] = '\0'; request->snonce = p_strndup(request->pool, snonce, sizeof(snonce)); - random_fill(request->salt, sizeof(request->salt)); - - str = t_str_new(MAX_BASE64_ENCODED_SIZE(sizeof(request->salt))); - str_printfa(str, "r=%s%s,s=", request->cnonce, request->snonce); - base64_encode(request->salt, sizeof(request->salt), str); - str_printfa(str, ",i=%d", SCRAM_ITERATE_COUNT); + str = t_str_new(sizeof(snonce)); + s...
2017 Sep 08
5
EOF from net_disconnect(fd)
...?? if (strncmp(res, "OK ", 3) == 0) { ??????????????? ? ret = 0; ??????????????? } ? } } } alarm(0); char stx[1]; stx[0]=(char) 4; //stx[1]='\0'; if ( net_transmit(fd, stx, sizeof(stx) ) < 0 ) { ? i_error("Error writing EOF"); } //string_t *testEOF= t_str_new(2); //str_append(testEOF, (char*) 4); //if ( net_transmit(fd, str_data(testEOF), str_len(testEOF) ) < 0 ) { //????? i_error("Error writing EOF"); //??? } //i_close_fd(&fd); net_disconnect(fd); fd=-1; Thank you, Steffan Cline 602-793-0014
2010 May 20
1
Patch for logging variables
...** *** 115,120 **** --- 118,125 ---- tab[0].value = dec2str(client->input->v_offset); tab[1].value = dec2str(client->output->offset); + tab[2].value = getenv("IP") ? getenv("IP") : "Unknown"; + tab[3].value = dec2str(client->expunged); str = t_str_new(128); var_expand(str, logout_format, tab); diff -crB dovecot-1.2.11.orig/src/imap/client.h dovecot-1.2.11/src/imap/client.h *** dovecot-1.2.11.orig/src/imap/client.h 2009-06-26 22:49:34.000000000 -0600 --- dovecot-1.2.11/src/imap/client.h 2010-05-19 16:26:31.529833893 -0600 *************** *** 1...
2010 May 19
1
logging
I am looking through the logging options and wondering if there are a couple of things that we can do 1. Logouts don't seem to show the IP address of the logout, we typically see multiple sessions at a time and wondering if there is a way to tie the logouts to an IP 2. POP logouts show the number of messages retrieved/deleted but I don't see a way to do this with IMAP, is there a logout
2017 Sep 08
1
EOF from net_disconnect(fd)
...r stx[1]; >> >> stx[0]=(char) 4; >> >> //stx[1]='\0'; >> >> if ( net_transmit(fd, stx, sizeof(stx) ) < 0 ) { >> >> i_error("Error writing EOF"); >> >> } >> >> >> >> //string_t *testEOF= t_str_new(2); >> >> //str_append(testEOF, (char*) 4); >> >> //if ( net_transmit(fd, str_data(testEOF), str_len(testEOF) ) < 0 ) { >> >> // i_error("Error writing EOF"); >> >> // } >> >> >> >> //i_close_fd(&amp...
2020 Jul 20
2
To field was not correct indexed by FTS
Hi, This To field was not correct indexed by FTS. To: Yamada Taro <yamada at example.com>,=?UTF-8?B?dXNlcjJAZXhhbXBsZS5jb20=?= <user2 at example.com>, =?UTF-8?B?dXNlcjNAZXhhbXBsZS5jb20=?= <user3 at example.com>, user4 desu <user4 at example.com> --> Yamada Taro <yamada at example.com> , user2 at example.com And follow was correct indexed by FTS To: Yamada
2004 Oct 22
1
[PATCH] support OEM encoding in NTLM messages
...<ctype.h> -const char * __ntlmssp_t_str(const void *message, struct ntlmssp_buffer *buffer) +const char * __ntlmssp_t_str(const void *message, struct ntlmssp_buffer *buffer, + int unicode) { - unsigned int len = read_le16(&buffer->length) / sizeof(ucs2le_t); - string_t *str = t_str_new(len / 2); + unsigned int len = read_le16(&buffer->length); const char *p = ((char *) message) + read_le32(&buffer->offset); + string_t *str; + + if (unicode) + len /= sizeof(ucs2le_t); + + str = t_str_new(len); while (len-- > 0) { str_append_c(str, *p & 0x7f); - p +=...
2006 Apr 28
1
imaptest, with options!
I hacked some command line options into imaptest. I dont think I broke it.. Place into dovecot-source root as usual and compile with: gcc imaptest.c -o imaptest -Wall -W -I. -Isrc/lib -DHAVE_CONFIG_H src/lib/liblib.a As per Timo's instructions. # imaptest -h imaptest [USER at IP:PORTNO] [pass=PASSWORD] [mbox=MBOX] [clients=CC] [msgs=NMSG] [use_authenticate] [PORTNO] USER = template for
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
2017 Sep 08
0
EOF from net_disconnect(fd)
...; } > > } > > alarm(0); > > > > char stx[1]; > > stx[0]=(char) 4; > > //stx[1]='\0'; > > if ( net_transmit(fd, stx, sizeof(stx) ) < 0 ) { > > i_error("Error writing EOF"); > > } > > > > //string_t *testEOF= t_str_new(2); > > //str_append(testEOF, (char*) 4); > > //if ( net_transmit(fd, str_data(testEOF), str_len(testEOF) ) < 0 ) { > > // i_error("Error writing EOF"); > > // } > > > > //i_close_fd(&fd); > > net_disconnect(fd); > > fd=-1;...
2017 Nov 13
0
Carbon_name path hardcoded
...ut I need to setup the path myself so my index cam be compliant to the index I already have. Wonder if changing it to something like the following so other users have a way to configure their own path or use the default in case they don?t want to worry about that. string_t *str = t_str_new(256); - const char *prefix = t_strdup_printf("dovecot.%s.global", + if ( strstr(carbon_name , "." != NULL) { + const char *prefix = t_strdup_printf("", stats_settings->ca...
2020 Jul 20
0
To field was not correct indexed by FTS
...ddr = message_address_parse(pool_datastack_create(), 190 hdr->full_value, 191 hdr->full_value_len, 192 UINT_MAX, 0); 193 str = t_str_new(hdr->full_value_len); 194 message_address_write(str, addr); 195 196 i_debug("@@@@@ after address parse:%s",str_data(str)); Mail addresses were deleted when passed message_address_parse(). So this debug logs came like following: Debug: @@@@@...
2020 Aug 14
0
2.3.11.3 on 32bit platforms
...tic void test_mech_handle_challenge(struct auth_request *request, } static inline const unsigned char * -test_mech_construct_apop_challenge(unsigned int connect_uid, unsigned long *len_r) +test_mech_construct_apop_challenge(unsigned int connect_uid, size_t *len_r) { string_t *apop_challenge = t_str_new(128); @@ -323,7 +323,7 @@ static void test_mechs(void) struct test_case *test_case = &tests[running_test]; const struct mech_module *mech = test_case->mech; struct auth_request *request; - const char *testname = t_strdup_printf("auth mech %s %d/%lu", + const char *testname =...
2007 Sep 30
2
Problem searching with thunderbird
...ideas why? dovecot: Sep 30 14:12:04 Error: IMAP(jon): Trying to allocate 2217042872 bytes dovecot: Sep 30 14:12:04 Error: IMAP(jon): Raw backtrace: imap [0x80b705e] -> imap [0x80b6bab] -> imap [0x80bdbe3] -> imap [0x80b5b65] -> imap(buffer_create_dynamic+0x27) [0x80b5c97] -> imap(t_str_new+0x17) [0x80c2a97] -> imap(message_search_init+0x42) [0x80b2d2e] -> imap [0x808abb4] -> imap [0x808aca7] -> imap [0x80a8c6c] -> imap(mail_search_args_foreach+0x23) [0x80a8cff] -> imap [0x808ae68] -> imap(message_parse_header+0x44) [0x80b15cc] -> imap [0x808b051] -> ima...
2007 Mar 27
2
gssapi auth issue...
...e form imap at foobar.sfbay.sun.com Which I presume is their standard-- and probably not negotiable. However, the hostname of the machine is: "foobar", not foobar.sfbay.sun.com (as reported by gethostname(3c)). So when dovecot does this: mech-gssapi.c: principal_name = t_str_new(128); str_append(principal_name, service_name); str_append_c(principal_name, '@'); ---> str_append(principal_name, my_hostname); We wind up asking kerberos to look for a ticket for imap at foobar, instead of imap at foobar.sfbay.sun.com. Obviously we can patch the s...