Displaying 20 results from an estimated 49 matches for "var_expand".
2019 Feb 25
0
[PATCH 2/3] v2v: add Var_expander
This helper module provides a facility to replace %{FOO}-like variables
in text strings with user-provided content.
---
.gitignore | 1 +
v2v/Makefile.am | 32 +++++++++++-
v2v/dummy.c | 2 +
v2v/var_expander.ml | 69 +++++++++++++++++++++++++
v2v/var_expander.mli | 82 ++++++++++++++++++++++++++++++
v2v/var_expander_tests.ml | 103 ++++++++++++++++++++++++++++++++++++++
6 files changed, 287 insertions(+), 2 deletions(-)
create mode 100644 v2v/dummy.c
create mode 100644 v2v/var_expander...
2017 May 30
3
Still trouble with vpopmail
...from userdb-vpopmail.c:5:
> ../../config.h:791:0: note: this is the location of the previous
> definition
> #define VERSION "2.2.30"
> ^
> userdb-vpopmail.c: In function ?userdb_vpopmail_get_quota?:
> userdb-vpopmail.c:72:6: error: too many arguments to function ?var_expand?
> if (var_expand(quota, template, tab, error_r) < 0)
> ^
> In file included from auth-request.h:5:0,
> from userdb.h:89,
> from userdb-vpopmail.c:6:
> ../../src/lib/var-expand.h:18:6: note: declared here
> void var_expand(string_t...
2019 Mar 29
5
[PATCH v2 0/3] v2v: add -o json output mode
...erent metadata, it offers a way to relocate
the disks, with %{...}-like variables (only 3 added ATM, more can be
added) to change their paths depending on data of the guest/disks.
Changes from v1:
- remove extra code for optional named parameters in pcre_tests.ml
- allow %-escaping of variables in Var_expander
Pino Toscano (3):
common/mlpcre: add offset flag for PCRE.matches
v2v: add Var_expander
v2v: add -o json output mode
.gitignore | 1 +
common/mlpcre/PCRE.ml | 2 +-
common/mlpcre/PCRE.mli | 5 +-
common/mlpcre/pcre-c.c | 16 +-
common/mlpcr...
2019 Feb 25
7
[PATCH 0/3] RFC: v2v: add -o json output mode
...In addition to a simple different metadata, it offers a way to relocate
the disks, with %{...}-like variables (only 3 added ATM, more can be
added) to change their paths depending on data of the guest/disks.
Thanks,
Pino Toscano (3):
common/mlpcre: add offset flag for PCRE.matches
v2v: add Var_expander
v2v: add -o json output mode
.gitignore | 1 +
common/mlpcre/PCRE.ml | 2 +-
common/mlpcre/PCRE.mli | 5 +-
common/mlpcre/pcre-c.c | 16 +-
common/mlpcre/pcre_tests.ml | 15 +-
v2v/Makefile.am | 36 +++-
v2v/cmdline.ml...
2019 Mar 29
0
Re: [PATCH 2/3] v2v: add Var_expander
....
I can perfectly understand that, however ...
> Is there not an existing C or OCaml library/facility we could use
> here? It's a shame we can't use Perl Template Toolkit because it
> would be ideal here.
... sadly I did not find anything simple convering the use case that
this Var_expander module covers. The closest thing I found was the
usage of ${..}/$(..) variables in dune (the OCaml build system), with
the following differences:
- manually tokenizes the string
- allows anything as variable name, splitting it in two if a ':' is
found
- ${..}/$(..) instead of %{..}
&g...
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,
2005 Nov 09
1
var_expand and pop3_logout_format
Hi.
-alpha2 broke the retr-byte-count field of the pop3_logout_format
with the following change:
-Added %R (reverse string) and %H (hash string) variable modifiers.
%R as modifier conflicts on expand with %R as retr-byte-count in
pop3_logout_format
resulting in expanded strings like:
top=0/0, retr=1/ del=0/1, size=431
seen in -alpha3 -alpha4 cvs as of 04.11.2005
FreeBSD 5.4-R, both i386
2019 Mar 25
2
Re: [PATCH 2/3] v2v: add Var_expander
On Mon, Feb 25, 2019 at 05:22:51PM +0100, Pino Toscano wrote:
[...]
After being burned a few times with custom parsing (hello, guestfish)
I'm not a big fan.
Is there not an existing C or OCaml library/facility we could use
here? It's a shame we can't use Perl Template Toolkit because it
would be ideal here.
There are all kinds of questions that aren't answered such as: Should
2017 May 30
0
Still trouble with vpopmail
...il.c:5:
>> ../../config.h:791:0: note: this is the location of the previous
>> definition
>> #define VERSION "2.2.30"
>> ^
>> userdb-vpopmail.c: In function ?userdb_vpopmail_get_quota?:
>> userdb-vpopmail.c:72:6: error: too many arguments to function ?var_expand?
>> if (var_expand(quota, template, tab, error_r) < 0)
>> ^
>> In file included from auth-request.h:5:0,
>> from userdb.h:89,
>> from userdb-vpopmail.c:6:
>> ../../src/lib/var-expand.h:18:6: note: declared here
>>...
2014 Dec 12
0
PATCH - add username_format to the PAM auth module
..._name, *pam_cache_key, *username_format;
unsigned int requests_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...
2016 Jul 09
4
passdb {driver = shadow args = override_username=%variable}
...ame=%Ln
}
by "%variable", I mean "Variables" at http://wiki.dovecot.org/Variables.
I've hacked up a solution with strtok(3C), but that's a hack and a
possible security hole, and I'd rather not implement it.
What I really want is to be able to leverage Dovecot's var_expand()
call, which, looking at the code, appears to be the function
responsible for %variable expansion and formatting.
The relevant piece of code seems to be this excerpt in auth/passdb-shadow.c:
static enum passdb_result
shadow_lookup(struct auth_request *request, struct spwd **spw_r)
{
auth...
2016 Jul 26
2
[BUG] Re: auth_bind with "()" in username not working
...c b/src/auth/passdb-ldap.c
index c1c2544..10bfe20 100644
--- a/src/auth/passdb-ldap.c
+++ b/src/auth/passdb-ldap.c
@@ -367,7 +367,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);
2017 Mar 07
1
v2.2.28 released
...releases before that.
> Truncating passwords with dict protocol* seems quite critical to me. :-O
> Or is it just me, who's affected by that?
>
> *: http://dovecot.org/list/dovecot/2017-February/107265.html
Hi!
The password is not actually truncated, it's actually subjected to
var_expand, which is silly. We are working on a patch for this and let
y'all know when it's ready. The only truncation happens with % as last
character.
Aki
2019 Oct 05
1
Home Directory Creation
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
<br>
</div>
<blockquote type="cite">
<div>
On 05/10/2019 05:20 Asai via dovecot <
<a href="mailto:dovecot@dovecot.org">dovecot@dovecot.org</a>> wrote:
</div>
<div>
2017 Dec 02
0
Lua Auth
...nd: yes
I simply changed the space to an underscore as a workaround, but I'm
curious if there's a better way. I tried various quoting without success.
Didn't try escaping yet.
3) Can you elaborate on the "auth_request#response_from_template(template)"
and "auth_request#var_expand(template)" functions? Specifically how to use
them. I'm guessing that I could've used one of them to work around #2 (that
it would have done the escaping for me)
Thanks!
-----
1) I'll have to check this.
2) Instead of string, return a key value table. you can have spaces...
2019 Dec 18
2
[v2v PATCH] po: do not extract tests
...ommon/mltools/xpath_helpers.ml
common/mlutils/c_utils.ml
-common/mlutils/c_utils_unit_tests.ml
common/mlutils/unix_utils.ml
common/mlv2v/uefi.ml
common/mlxml/xml.ml
@@ -86,9 +77,7 @@ v2v/target_bus_assignment.ml
v2v/types.ml
v2v/utils.ml
v2v/v2v.ml
-v2v/v2v_unit_tests.ml
v2v/vCenter.ml
v2v/var_expander.ml
-v2v/var_expander_tests.ml
v2v/windows.ml
v2v/windows_virtio.ml
--
2.24.1
2019 Mar 25
1
Re: [PATCH 3/3] v2v: add -o json output mode
...= ref None in
> +
> + List.iter (
> + function
> + | "json-disks-pattern", v ->
> + if !json_disks_pattern <> None then
> + error (f_"-o json: -oo json-disks-pattern set more than once");
> + let vars =
> + try Var_expander.scan_variables v
> + with Var_expander.Invalid_variable var ->
> + error (f_"-o json: -oo json-disks-pattern: invalid variable %%{%s}")
> + var in
> + List.iter (
> + fun var ->
> + if not (List.mem var known_...
2010 May 20
1
Patch for logging variables
...= i_stream_create_fd(fd_in, imap_max_line_length, FALSE);
client->output = o_stream_create_fd(fd_out, (size_t)-1, FALSE);
+ client->expunged = 0;
o_stream_set_flush_callback(client->output, client_output, client);
***************
*** 105,110 ****
--- 106,113 ----
static struct var_expand_table static_tab[] = {
{ 'i', NULL, "input" },
{ 'o', NULL, "output" },
+ { 'c', NULL, "client_ip" },
+ { 'e', NULL, "expunged_count" },
{ '\0', NULL, NULL }
};
struct var_expand_table *tab;
******...
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
2008 Jul 04
2
Different PROXY for IMAP and POP3 using LDAP-auth
Hello everybody!
I'm trying to configure dovecot 1.1.1 with different proxy hosts and/or
ports for different protocols (IMAP, POP3). I'm using LDAP for
authentication.
I've tried:
1) Variable in "auth default" configuration:
[dovecot.conf]
passdb ldap {
args = /usr/local/etc/dovecot-ldap-%Ls.conf
}
userdb ldap {
args =