More sepgsql weirdness

From: Dave Page <dpage(at)pgadmin(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: More sepgsql weirdness
Date: 2021-04-13 14:33:23
Message-ID: CA+OCxozBBWGXdi_dY8G5bZmNR2y7G5HRyAWWYg=VpB-=8WX2DA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On a system with selinux and sepgsql configured, search path resolution
appears to fail if sepgsql is in enforcing mode, but selinux is in
permissive mode (which, as I understand it, should cause sepgsql to behave
as if it's in permissive mode anyway - and does for other operations).
Regardless of whether my understanding of the interaction of the two
permissive modes is correct, I don't believe the following should happen:

mls=# SELECT current_user;

current_user

--------------

postgres

(1 row)

mls=# SHOW search_path;

search_path

-----------------

"$user", public

(1 row)

mls=# \dn+ public

List of schemas

Name | Owner | Access privileges | Description

--------+----------+----------------------+------------------------

public | postgres | postgres=UC/postgres+| standard public schema

| | =UC/postgres |

(1 row)

mls=# CREATE TABLE tb_users(uid int primary key, name text, mail text,
address text, salt text, phash text);

ERROR: no schema has been selected to create in

LINE 1: CREATE TABLE tb_users(uid int primary key, name text, mail t...

^

mls=# CREATE TABLE public.tb_users(uid int primary key, name text, mail
text, address text, salt text, phash text);

CREATE TABLE

mls=# drop table tb_users;

ERROR: table "tb_users" does not exist

mls=# drop table public.tb_users;

DROP TABLE

This is on head, pulled yesterday.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2021-04-13 14:37:47 Re: Truncate in synchronous logical replication failed
Previous Message Bharath Rupireddy 2021-04-13 14:31:23 Re: Identify missing publications from publisher while create/alter subscription.