Re: SE-PgSQL patch review - Mailing list pgsql-hackers

From KaiGai Kohei
Subject Re: SE-PgSQL patch review
Date
Msg-id 4B0CBFD4.4040402@ak.jp.nec.com
Whole thread Raw
In response to Re: SE-PgSQL patch review  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
List pgsql-hackers
>>>> * It uses dedicated 'SExxx' error codes, but I think they should belong to
>>>>   the same family of ERRCODE_INSUFFICIENT_PRIVILEGE (42501).
>>> I already uses predefined error code, if exist.
>> What I meant was: there are no problem to add new error codes for SE-PgSQL,
>> but I think the values of the codes should be '42xxx' because those errors
>> are still "Class 42 - Access Rule Violation" from the view of users.
> 
> Ahh, OK. I'll fix it.

I also think ERRCODE_INVALID_SECURITY_CONTEXT is suitable for the Access
Rule Violation class ('44xxx').

However, it seems to me ERRCODE_SELINUX_INTERNAL_ERROR should be moved
to the System Error class ('58xxx'), because it will be raised due to
the problem on communicating with SELinux, not access violations.

And, we may be able to remove ERRCODE_SELINUX_AUDIT_LOG, because audit
logs are generated on access violation events (in most case, if security
policy is right), so ERRCODE_INSUFFICIENT_PRIVILEGE might be suitable
to call ereport(LOG, ...) with an audit log message.

Isn't it strange in manner?

Thanks,
-- 
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Hot standby and removing VACUUM FULL
Next
From: Daniel Farina
Date:
Subject: Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION