Re: The " \! " and " \l " commands

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Suporte <Suporte(at)wwrent(dot)com(dot)br>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: The " \! " and " \l " commands
Date: 2002-02-01 21:11:22
Message-ID: Pine.LNX.4.30.0202011608040.687-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Frank Wiles 2002-02-01 21:28:19 TODO Perl documentation question
Previous Message Vince Vielhaber 2002-02-01 21:05:22 Re: PostgreSQL crashes with Qmail-SQL