-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At some point hitherto, Derek D. Martin hath spake thusly:
> Hi all,
> 
> I wrote a small shell to allow for restricting access to scp and/or
> sftp.

Unfortunately, the version I sent has a stupid bug.  This is what
happens when coding with too much alcohol and not enough sleep.  ;-)

Patch is below.

- ------------- cut here ---------------------

*** rssh.c.old  Fri Aug 16 11:34:57 2002
- --- rssh.c      Fri Aug 16 11:35:51 2002
***************
*** 52,60 ****
      int  allowed_command = 0;
      int  flag = 0;
  
- -     /* convert argv[2] into an arg vector suitable for execvp() */
- -     argvec = build_arg_vector(argv[2]);
- - 
      /*  check argv[0] for scp or sftp to see what's allowed */
      if ( !strcmp(basename(argv[0]), "scpsh") ) 
          allowed_command = _ALLOW_SCP;
- --- 52,57 ----
***************
*** 68,73 ****
- --- 65,73 ----
  
      /* if first arg is anything but -c, it's no good */
      if ( strcmp("-c", argv[1]) ) do_exit_message(allowed_command);
+ 
+     /* convert argv[2] into an arg vector suitable for execvp() */
+     argvec = build_arg_vector(argv[2]);
  
      /* check to see if we got an allowed command */
      if ( (!strcmp(argvec[0], _PATH_SFTP_SERVER)) && 

- -- 
Derek Martin               ddm@pizzashack.org    
- ---------------------------------------------
I prefer mail encrypted with PGP/GPG!
GnuPG Key ID: 0x81CFE75D
Retrieve my public key at http://pgp.mit.edu
Learn more about it at http://www.gnupg.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9XRzUdjdlQoHP510RAtcyAKCcuWlV+CpIpRzmtYZDXjldptQP3QCeMA3t
Zy6mT8R7yKTEuDxZxWE3QLk=
=Dlfg
-----END PGP SIGNATURE-----

