Re: Hardening PostgreSQL via (optional) ban on local file system access - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Hardening PostgreSQL via (optional) ban on local file system access
Date
Msg-id Yr3clQDNHgPQGx08@momjian.us
Whole thread Raw
In response to Re: Hardening PostgreSQL via (optional) ban on local file system access  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Hardening PostgreSQL via (optional) ban on local file system access
List pgsql-hackers
On Thu, Jun 30, 2022 at 11:52:20AM -0400, Robert Haas wrote:
> I don't think this would be very convenient in most scenarios, and I
> think it would also be difficult to implement correctly. I don't think
> you can get by with just having superuser() return false sometimes
> despite pg_authid.rolsuper being true. There's a lot of subtle
> assumptions in the code to the effect that the properties of a session
> are basically stable unless some SQL is executed which changes things.
> I think if we start injecting hacks like this it may seem to work in
> light testing but we'll never get to the end of the bug reports.

Yeah, seems it would have to be specified per-session, but how would you
specify a specific session before the session starts?

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Indecision is a decision.  Inaction is an action.  Mark Batterson




pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: vacuum verbose no longer reveals anything about pins
Next
From: Robert Haas
Date:
Subject: Re: making relfilenodes 56 bits