[scponly] won't someone _please_ think of the archives ? (scponly + unison + chroot)

Ensel Sharon user at dhp.com
Wed Oct 4 11:09:41 EDT 2006


Paul,

First off, many thanks - I really appreciate your help with this - I hope
that it turns out to be a real bug that I can help fix, and not just a
lame problem on my own end...



On Tue, 3 Oct 2006, Paul Hyder wrote:

> I don't have the platform to test this extensively but the output below
> indicates that HOME is being set to homedir instead of chdir_path.  Since
> chdir_path isn't a global variable it can't be used to set HOME for Unison.
> The 4.6 release code sets HOME to "/" which is equally bad.
> 
> You willing to add a few small edits to scponly.c, rebuild, and test it?
> (If you did apply a patch the line numbers below are approximate, they are
> from the 4.6 release code.)
> 
> -move the definition of chdir_path (scponly.c:230)
>   char chdir_path[FILENAME_MAX];
>  up to be with  homedir and chrootdir (near scponly.c:25 somewhere)
> 
> -change scponly.c:600 to be
>    if (!mysetenv("HOME",chdir_path))
> 
> -change scponly.c:602 to be
>    syslog(LOG_ERR, "could not set HOME environment variable to %s (%s)", chdir_path, logstamp());
> 
> 
> -change scponly.c:606 to be
>    syslog(LOG_DEBUG, "set HOME environment variable to %s (%s)", chdir_path, logstamp());
> 		
> This will ONLY work in a chroot with top level paths that utilize "//" syntax.
> (And is of course likely to need additional changes that I'm not seeing yet.
>  Anyone on the list have better suggestions?)
k

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 ?




More information about the scponly mailing list