[scponly] won't someone _please_ think of the archives ? (scponly
+ unison + chroot)
Ensel Sharon
user at dhp.com
Mon Oct 9 19:24:49 EDT 2006
On Wed, 4 Oct 2006, Paul Hyder wrote:
> Ensel Sharon wrote:
> > ...
> > Ok - I can do this - but just a quick clarification ... are all of these
> > edit/patch locations specific to unison - that is, all of them are in
> > unison-related chunks of scponly.c ?
> >
> > Or was it broken for everything, and these are changes that affect all
> > operations, not just unison ?
>
> The modified code and messages related to setting HOME are specific to unison.
> (Moving the definition chdir_path is a bit more dangerous, it might be
> better to duplicate the code.)
Sorry it took so long to test.
I put in the edits you listed, and things compiled/run cleanly, however
the behavior has not changed.
The error messages, the paths output, etc. - all are identical. I figured
I must have done something wrong, but it's all good.
Refer to the original posting - the behavior is identical.
I got the debug log:
Oct 9 16:19:28 hostname sshd[21707]: Accepted keyboard-interactive/pam
for username from 192.168.0.1 port 60207 ssh2
Oct 9 16:19:29 hostname scponly[21711]: chrooted binary in place, will
chroot()
Oct 9 16:19:29 hostname scponly[21711]: 3 arguments in total.
Oct 9 16:19:29 hostname scponly[21711]: arg 0 is scponlyc
Oct 9 16:19:29 hostname scponly[21711]: arg 1 is -c
Oct 9 16:19:29 hostname scponly[21711]: arg 2 is unison -server
Oct 9 16:19:29 hostname scponly[21711]: opened log at LOG_AUTHPRIV, opts
0x00000009
Oct 9 16:19:29 hostname scponly[21711]: retrieved home directory of
"/home//username" for user "username"
Oct 9 16:19:29 hostname scponly[21711]: chrooting to dir: "/home"
Oct 9 16:19:29 hostname scponly[21711]: chdiring to dir: "/username"
Oct 9 16:19:29 hostname scponly[21711]: setting uid to username
Oct 9 16:19:29 hostname scponly[21711]: processing request: "unison
-server"
Oct 9 16:19:29 hostname scponly[21711]: Found "HOME" and setting it to
"/home//username"
Oct 9 16:19:29 hostname scponly[21711]: Environment contains
"HOME=/home//username"
Oct 9 16:19:29 hostname scponly[21711]: set HOME environment variable to
/username (username: username(username), IP/port: 192.168.0.1 60207 22)
Oct 9 16:19:29 hostname scponly[21711]: running: /usr/local/bin/unison
-server (username: username(username), IP/port: 192.168.0.1 60207 22)
I think the problem is where HOME env var is set to only /username ...
The odd thing is that the output for the remote user is the same as before
- with error messages that detail the entire absolute path into the
chroot, which is bad bad bad ...
Thanks.
More information about the scponly
mailing list