rebar3 and restricted shell

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

rebar3 and restricted shell

Caragea Silviu
Hello guys,

I have an erlang release (via rebar3) where I enabled in vm.args the restricted shell using :
+Bi -stdlib restricted_shell my_module

This works nice but there is one problem:

When doing myapp remote_console the same vm.args is applied including the above settings which makes impossible to exit from remote_console shell.

The old rebar2 only applies few settings from vm.args like cookie, name (mostly the one used to be able to connect) to the node. So there this was not the problem.

Do you have any suggestion ?

Silviu


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: rebar3 and restricted shell

Tristan Sloughter-4
Hey Silviu, yea, this is a known pain that we haven't decided on the best solution for yet. I think it is going to be to just require a second vm.args if you want anything in it beyond what you mentioned was in the rebar2 one for remote console.. not sure.

The issue is it isn't always only cookie and name that are needed to use a remote console, I think this first came up with net_ticktime.

As there became more options people want kept we moved to a blacklist from a whitelist for vm.args.

The change needed would be in relx, not rebar3, and is either to have the restricted shell argument removed when in extended_script when it removes name/sname, support for providing a separate remote console vm.args so we don't have to do any filtering at all, or templating of vm.args somehow to specify which are for remote console and which are for normal runs.

Tristan


On Thu, Dec 6, 2018, at 07:38, Caragea Silviu wrote:
Hello guys,

I have an erlang release (via rebar3) where I enabled in vm.args the restricted shell using :
+Bi -stdlib restricted_shell my_module

This works nice but there is one problem:

When doing myapp remote_console the same vm.args is applied including the above settings which makes impossible to exit from remote_console shell.

The old rebar2 only applies few settings from vm.args like cookie, name (mostly the one used to be able to connect) to the node. So there this was not the problem.

Do you have any suggestion ?

Silviu
_______________________________________________
erlang-questions mailing list


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions