Re: More network functions...

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: More network functions...
Date: 2004-05-19 04:27:48
Message-ID: E20878E0-A94C-11D8-B85D-000A95C705DC@chittenden.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

>> *) inet_(client|server)_(addr|port)() and necessary documentation for
>> the four functions.
>> *) area(PATH) and documentation.
>> *) Checks for TEMP privs when creating objects in the temp schema
>> (checks for any object created in a temp namespace).
>> *) With the above change, current_user is now being used to check if
>> CREATE TEMP TABLE should succeed.
>> [ and it gets weirder from there ]
>
> Er, what?
>
> Could we possibly have this separated into multiple patches with some
> coherent purpose to each?

Sure.

patch-network.txt contains the following bits:

*) inet_(client|server)_(addr|port)() and necessary documentation for
the four functions.

> Also, please justify the temp-related changes. I was not aware that we
> had any breakage there.

patch-tmp-schema.txt contains the following bits:

*) Changes pg_namespace_aclmask() so that the superuser is always able
to create objects in the temp namespace.
*) Changes pg_namespace_aclmask() so that if this is a temp namespace,
objects are only allowed to be created in the temp namespace if the
user has TEMP privs on the database. This encompasses all object
creation, not just TEMP tables.
*) InitTempTableNamespace() checks to see if the current user, not the
session user, has access to create a temp namespace.

The first two changes are necessary to support the third change. Now
it's possible to revoke all temp table privs from non-super users and
limiting all creation of temp tables/schemas via a function that's
executed with elevated privs (security definer). Before this change,
it was not possible to have a setuid function to create a temp
table/schema if the session user had no TEMP privs.

Originally you'd brought up some concerns about security problems, but
this patch I believe addresses all of your prior concerns.

patch-area-path.txt contains:

*) Can now determine the area of a closed path.

patch-dfmgr.txt contains:

*) Small tweak to add the library path that's being expanded.

I was using $lib/foo.so and couldn't easily figure out what the error
message, "invalid macro name in dynamic library path" meant without
looking through the source code. With the path in there, at least I
know where to start looking in my config file.

-sc

Attachment Content-Type Size
patch-area-path.txt text/plain 2.4 KB
patch-dfmgr.txt text/plain 682 bytes
patch-getaddrinfo-all.txt text/plain 4.1 KB
patch-network.txt text/plain 6.6 KB
patch-tmp-schema.txt text/plain 2.3 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Потеряев =?koi8-r?b?IOku5S4=?= 2004-05-19 05:11:33 Re: PITR Phase 1 - partial backport to 7.3.4, 7.3.5
Previous Message Bruce Momjian 2004-05-19 04:22:39 Re: Bug in CVS pg_dump against 7.0.x