Am 23.12.2013 20:05, schrieb Wayne Davison:
> On Tue, Dec 10, 2013 at 1:28 AM, Florian Sager <sa...@agitos.de
> <mailto:sa...@agitos.de>> wrote:
>
>     So I configured in the config file ($USER is set in the environment):
>     >>>
>     path = /home/%USER%/test
>     <<<
>
>
> $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.
>
> ..wayne..
Hi Wayne,

are you sure you tried it with the 'path' directive?

The replacement of %USER% is working if I take another
non-P_PATH/P_STRING value, so the following code does the expansion:

    /* 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;
    }

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.
But this 'delayed expansion' isn't done anywhere in the code ... at
least I cannot find another method call of 'expand_vars', do you?

Best regards,
Florian

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to