[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash as a static lib in my application

From: Russell Lewis
Subject: Re: Bash as a static lib in my application
Date: Thu, 18 Jun 2020 06:20:49 -0700

Have you looked into Docker containers?  You could then give each user a
private and throw-away environment, which would make the severity issues a
lot easier to deal with.  And inside the container, your app could use Bash
as a child process.  (Please excuse the *horribly* over-simplified

On Thu, Jun 18, 2020, 05:47 Praneeth Tss <> wrote:

> Hi,
>      Need some advice on my approach. So, my motive was to develop an
> application which has a console on a web page and execute shell commands
> from the browser. I have sorted out all the communication between the
> browser and the user machine.
> These are the approaches I have taken once my c++ application receives the
> command from browser
> i) Use forkpty and fork a child process of bash of an existing terminal
> instance and pipe in commands and take out the stdout.
> ii.) Build a static library out of bash and use it in my application.
> Execute the command and get the output from the bash lib's code.
> I don't want to go with the first approach due to security reasons. So, I
> need some advice if the second approach is feasible or if there are any
> issues that I can get into with the second approach. Any help would be
> appreciated.
> Regards,
> Praneeth TSS

reply via email to

[Prev in Thread] Current Thread [Next in Thread]