<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Am 23.12.2013 20:05, schrieb Wayne
Davison:<br>
</div>
<blockquote
cite="mid:CAHSx_SvaGGTT0HZCSnWQO3U8G25wq2+LLhBbW-z_e9u5D7ArxQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Dec 10, 2013 at 1:28 AM,
Florian Sager <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:sager@agitos.de" target="_blank">sager@agitos.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":2dy" style="overflow:hidden">So I configured in
the config file ($USER is set in the environment):<br>
>>><br>
path = /home/%USER%/test<br>
<<<<br>
</div>
</blockquote>
</div>
<br>
$USER has to be set in the daemon's environment. If it is
set, it will be substituted. If it is not set, rsync leaves
it unchanged. Since it worked fine in my testing, I'd imagine
that whatever is starting your daemon process is not setting
USER.<br>
<br clear="all">
<div>..wayne..</div>
</div>
</div>
</blockquote>
Hi Wayne,<br>
<br>
are you sure you tried it with the 'path' directive?<br>
<br>
The replacement of %USER% is working if I take another
non-P_PATH/P_STRING value, so the following code does the expansion:<br>
<pre wrap=""> /* now switch on the type of variable it is */
switch (parm_table[parmnum].type) {
case P_PATH:
case P_STRING:
/* delay expansion of vars */
break;
default:
/* expand any %VARS% now */
parmvalue = expand_vars(parmvalue);
break;
}
</pre>
The important thing is the comment 'delay expansion of vars': these
vars should be expanded later in the code because e.g. the path will
be different for different users connecting.<br>
But this 'delayed expansion' isn't done anywhere in the code ... at
least I cannot find another method call of 'expand_vars', do you?<br>
<br>
Best regards,<br>
Florian<br>
<br>
</body>
</html>