Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite914a14

Browse files
committed
sepgsql DROP support.
KaiGai Kohei
1 parent07d1edb commite914a14

File tree

11 files changed

+481
-86
lines changed

11 files changed

+481
-86
lines changed

‎contrib/sepgsql/database.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,33 @@ sepgsql_database_post_create(Oid databaseId, const char *dtemplate)
118118
pfree(tcontext);
119119
}
120120

121+
/*
122+
* sepgsql_database_drop
123+
*
124+
* It checks privileges to drop the supplied database
125+
*/
126+
void
127+
sepgsql_database_drop(OiddatabaseId)
128+
{
129+
ObjectAddressobject;
130+
char*audit_name;
131+
132+
/*
133+
* check db_database:{drop} permission
134+
*/
135+
object.classId=DatabaseRelationId;
136+
object.objectId=databaseId;
137+
object.objectSubId=0;
138+
audit_name=getObjectDescription(&object);
139+
140+
sepgsql_avc_check_perms(&object,
141+
SEPG_CLASS_DB_DATABASE,
142+
SEPG_DB_DATABASE__DROP,
143+
audit_name,
144+
true);
145+
pfree(audit_name);
146+
}
147+
121148
/*
122149
* sepgsql_database_relabel
123150
*

‎contrib/sepgsql/expected/create.out

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp