Date: Thu, 28 Mar 2002 22:05:09 +0200 (EET) From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Domas Mituzas <domas.mituzas@delfi.lt> Cc: Jason Stone <jason@shalott.net>, Fernan Aguero <fernan@iib.unsam.edu.ar>, FreeBSD Security <freebsd-security@freebsd.org> Subject: Re: using ssh to run remote commands? Message-ID: <20020328220341.D1966-100000@hades> In-Reply-To: <20020328105535.W10792-100000@axis.tdd.lt>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-03-28 11:03, Domas Mituzas wrote:
> /* $Id: main.c,v 1.6 2001/11/03 14:33:23 midom Exp $ */
>
> #include <unistd.h>
> #include <stdio.h>
> #include <string.h>
>
> #define MAXARGS 10
>
> #define ONLY "bin/"
>
> int
> main(int ac, char **av)
> {
> char **ap, *argv[MAXARGS], *is;
> /*
> * skip first two arguments - the first gives shell name, that we
> * know and the second gives "-c" that we also know
> */
> av += 2;
> is = av[0];
> if (ac < 2)
> exit(0);
* me puts paranoid hat on.
Still, you might want to make sure that these two are in fact what you
expect. I'm not sure if it *can* affect the way your shells work, but it
won't hurt to check :-)
Giorgos Keramidas FreeBSD Documentation Project
keramida@{freebsd.org,ceid.upatras.gr} http://www.FreeBSD.org/docproj/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020328220341.D1966-100000>
