Re: The " \! " and " \l " commands - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: The " \! " and " \l " commands
Date
Msg-id Pine.LNX.4.30.0202011608040.687-100000@peter.localdomain
Whole thread Raw
In response to The " \! " and " \l " commands  ("Suporte" <Suporte@wwrent.com.br>)
Responses Re: The " \! " and " \l " commands  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-hackers
Suporte writes:

> Does anyone know how to disable the " \! " and " \l " commands ?

For outright disablement, you edit the file src/bin/psql/commands.c,
remove the portions that deal with these commands, and rebuild.

But...

> Users connect on another solaris through SSH with a shell developed by
> me in perl, and connect to the PGSQL_SERVER through psql. The problem
> is: when the user is on the PGSQL PROMPT and he types " \! /bin/sh ",
> he gets the /bin/sh on the server.

You could start the psql program with SHELL=/bin/false in the environment.

(I don't see what your situation has to do with \l.)

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: PostgreSQL crashes with Qmail-SQL
Next
From: Peter Eisentraut
Date:
Subject: Re: TODO Perl documentation question