Adam Jensen <han...@riseup.net> writes:

> But when I test it with:
> scp blah ba...@minerva.bohemia.net:/

> Password for ba...@minerva.bohemia.net:
> rssh_chroot_helper: wordexp() bad syntax
> lost connection

This error message means that:

    wordexp(str, &result, WRDE_NOCMD|WRDE_DOOFFS)

is returning WRDE_SYNTAX on your system.  According to wordexp(3), this
means:

       WRDE_SYNTAX
              Shell syntax error, such as unbalanced parentheses or
              unmatched quotes.

wordexp here is being used to parse the command that ssh is sending under
the hood when you scp.  Apparently there's something about that FreeBSD
wordexp doesn't like, or somehow the command line is being parsed
incorrectly.

My bet on why this is succeeding outside the chroot and not succeeding
inside the chroot is this tantalizing statement in the FreeBSD wordexp(3)
man page:

     The wordexp() function is implemented as a wrapper around the
     undocumented wordexp shell built-in command.

I'll bet that /bin/sh in your chroot is not the same as /bin/sh outside
your chroot, it's not recognizing this shell built-in, and libc is
incorrectly interpreting this as a syntax error.

-- 
Russ Allbery (ea...@eyrie.org)              <http://www.eyrie.org/~eagle/>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
rssh-discuss mailing list
rssh-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rssh-discuss

Reply via email to