pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedDisallow execution of shell commands from psql
2+ messages / 2 participants
[nested] [flat]
* Disallow execution of shell commands from psql
@ 2023-01-10 18:01 Wiwwo Staff <wiwwo@wiwwo.com>
2023-01-11 12:54 ` Re: Disallow execution of shell commands from psql hubert depesz lubaczewski <depesz@depesz.com>
0 siblings, 1 reply; 2+ messages in thread
From: Wiwwo Staff @ 2023-01-10 18:01 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hi!
Happy new (gregorian calendar) year!
Somehow related to the proposal of having a `psql --idle` option, is there
a way to disallow the command `\!` (and anything of the likes in psql?
Sure, I can set the SHELL env var at run-time, but I still want to have
postgres user to be a normal user, with its shell etc, which means it can
change this SHELL setting somewhere.
Any tip?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Disallow execution of shell commands from psql
2023-01-10 18:01 Disallow execution of shell commands from psql Wiwwo Staff <wiwwo@wiwwo.com>
@ 2023-01-11 12:54 ` hubert depesz lubaczewski <depesz@depesz.com>
0 siblings, 0 replies; 2+ messages in thread
From: hubert depesz lubaczewski @ 2023-01-11 12:54 UTC (permalink / raw)
To: Wiwwo Staff <wiwwo@wiwwo.com>; +Cc: pgsql-general@lists.postgresql.org
On Tue, Jan 10, 2023 at 07:01:24PM +0100, Wiwwo Staff wrote:
> Hi!
> Happy new (gregorian calendar) year!
>
> Somehow related to the proposal of having a `psql --idle` option, is there
> a way to disallow the command `\!` (and anything of the likes in psql?
>
> Sure, I can set the SHELL env var at run-time, but I still want to have
> postgres user to be a normal user, with its shell etc, which means it can
> change this SHELL setting somewhere.
As far as I know, it's not possible. Why is that a problem though?
\! will run command as the user that ran psql. So it's not a security
issue. What's the problem then?
Best regards,
depesz
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-01-11 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 18:01 Disallow execution of shell commands from psql Wiwwo Staff <wiwwo@wiwwo.com>
2023-01-11 12:54 ` hubert depesz lubaczewski <depesz@depesz.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox