[scponly] how do I use rsync with scponly ?

Ensel Sharon user at dhp.com
Tue Mar 21 12:34:25 EST 2006



On Tue, 21 Mar 2006, Ensel Sharon wrote:

> 
> 
> On Tue, 21 Mar 2006, Kaleb Pederson wrote:
> 
> > Per 'man 3 getopt':
> > 
> > The  getopt_long()  function  works like getopt() except that it also accepts 
> > long options, started out by two dashes.  (If the program accepts only long 
> > options, then optstring should be specified as an empty string (""), not 
> > NULL.)  Long option names may be abbreviated if the abbreviation is unique or 
> > is an exact match for some defined option.  A long option may take a 
> > parameter, of the form --arg=param or --arg param.
> > 
> > And... the call in scponly is:
> > 
> > while ((ch = getopt(ac, av, cmdarg->opts)) != -1) {...}
> 
> 
> Ok, I see this line in helper.c
> 
> So this is the _only_ line I need to change getopt to getopt_long, or do I
> need to change it in other places in this file ?


Ok, I changed getopt to getopt_long in only that one line, and the
behavior did not change.

What did change is that suddenly, in the debug output, scponly is printing
debug messages from a completely different time zone than system, or the
other messages going into my syslog:

Mar 21 09:30:55 server sshd[522]: Accepted keyboard-interactive/pam for
username from 10.10.10.10 port 62155 ssh2
Mar 21 17:30:55 server scponly[526]: option e is not permitted for use
with /usr/local/bin/rsync (arg was rver)(username: username(username),
IP/port: 10.10.10.10 62155 22))
Mar 21 09:30:55 server kernel: Mar 21 17:30:55 server scponly[526]: option
e is not permitted for use with /usr/local/bin/rsync (arg was
rver)(username: username(username), IP/port: 10.10.10.10 62155 22))
Mar 21 17:30:55 server scponly[526]: requested command
(/usr/local/bin/rsync --server -vlogDtprz . /username) tried to use
disallowed argument (username: username(username), IP/port: 10.10.10.10
62155 22))
Mar 21 09:30:55 server kernel: Mar 21 17:30:55 server
scponly[526]: requested command (/usr/local/bin/rsync --server -vlogDtprz
. /username) tried to use disallowed argument
(username: username(username), IP/port
: 10.10.10.10 62155 22))


So that's odd, but I don't care at all compared to how badly I need to be
able to rsync.  Is it possible I need to s/getopt/getopt_long/g in
helper.c ?

Thanks.





More information about the scponly mailing list