Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a1b36445d | ||
|
|
d46b4f7823 | ||
|
|
c443499dc0 | ||
|
|
9c31ac1a07 | ||
|
|
640edf5fd4 | ||
|
|
e2c9545395 | ||
|
|
6bd3a519b5 |
9 changed files with 7679 additions and 6639 deletions
|
|
@ -1 +0,0 @@
|
|||
postgresql-8.3.5.tar.bz2
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
postgresql-8.3.8.tar.bz2
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: sepostgresql
|
||||
# $Id$
|
||||
NAME := sepostgresql
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
|
|
@ -1,3 +1,52 @@
|
|||
diff -rpNU3 base/src/bin/initdb/initdb.c sepgsql/src/bin/initdb/initdb.c
|
||||
--- base/src/bin/initdb/initdb.c 2009-09-10 20:11:35.000000000 +0900
|
||||
+++ sepgsql/src/bin/initdb/initdb.c 2009-09-10 20:54:22.000000000 +0900
|
||||
@@ -94,6 +94,7 @@ static bool debug = false;
|
||||
static bool noclean = false;
|
||||
static bool show_setting = false;
|
||||
static char *xlog_dir = "";
|
||||
+static char *pgace_feature = "none";
|
||||
|
||||
|
||||
/* internal vars */
|
||||
@@ -1224,6 +1225,11 @@ setup_config(void)
|
||||
"#default_text_search_config = 'pg_catalog.simple'",
|
||||
repltok);
|
||||
|
||||
+ snprintf(repltok, sizeof(repltok),
|
||||
+ "pgace_feature = '%s'", pgace_feature);
|
||||
+ conflines = replace_token(conflines,
|
||||
+ "#pgace_feature = 'none'", repltok);
|
||||
+
|
||||
snprintf(path, sizeof(path), "%s/postgresql.conf", pg_data);
|
||||
|
||||
writefile(path, conflines);
|
||||
@@ -2395,6 +2401,7 @@ usage(const char *progname)
|
||||
printf(_(" -U, --username=NAME database superuser name\n"));
|
||||
printf(_(" -W, --pwprompt prompt for a password for the new superuser\n"));
|
||||
printf(_(" --pwfile=FILE read password for the new superuser from file\n"));
|
||||
+ printf(_(" --pgace-feature=FEATURE specify an enhanced security feature\n"));
|
||||
printf(_(" -?, --help show this help, then exit\n"));
|
||||
printf(_(" -V, --version output version information, then exit\n"));
|
||||
printf(_("\nLess commonly used options:\n"));
|
||||
@@ -2429,6 +2436,7 @@ main(int argc, char *argv[])
|
||||
{"auth", required_argument, NULL, 'A'},
|
||||
{"pwprompt", no_argument, NULL, 'W'},
|
||||
{"pwfile", required_argument, NULL, 9},
|
||||
+ {"pgace-feature", required_argument, NULL, 10},
|
||||
{"username", required_argument, NULL, 'U'},
|
||||
{"help", no_argument, NULL, '?'},
|
||||
{"version", no_argument, NULL, 'V'},
|
||||
@@ -2543,6 +2551,9 @@ main(int argc, char *argv[])
|
||||
case 9:
|
||||
pwfilename = xstrdup(optarg);
|
||||
break;
|
||||
+ case 10:
|
||||
+ pgace_feature = xstrdup(optarg);
|
||||
+ break;
|
||||
case 's':
|
||||
show_setting = true;
|
||||
break;
|
||||
diff -rpNU3 base/src/bin/pg_dump/pg_ace_dump.h sepgsql/src/bin/pg_dump/pg_ace_dump.h
|
||||
--- base/src/bin/pg_dump/pg_ace_dump.h 1970-01-01 09:00:00.000000000 +0900
|
||||
+++ sepgsql/src/bin/pg_dump/pg_ace_dump.h 2008-10-14 15:38:18.000000000 +0900
|
||||
|
|
@ -287,8 +336,8 @@ diff -rpNU3 base/src/bin/pg_dump/pg_ace_dump.h sepgsql/src/bin/pg_dump/pg_ace_du
|
|||
+
|
||||
+#endif
|
||||
diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
||||
--- base/src/bin/pg_dump/pg_dump.c 2008-02-03 01:11:28.000000000 +0900
|
||||
+++ sepgsql/src/bin/pg_dump/pg_dump.c 2008-07-11 14:10:51.000000000 +0900
|
||||
--- base/src/bin/pg_dump/pg_dump.c 2009-09-10 20:11:35.000000000 +0900
|
||||
+++ sepgsql/src/bin/pg_dump/pg_dump.c 2009-09-10 20:54:22.000000000 +0900
|
||||
@@ -50,6 +50,7 @@ int optreset;
|
||||
|
||||
#include "pg_backup_archiver.h"
|
||||
|
|
@ -340,7 +389,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
|
||||
printf(_("\nConnection options:\n"));
|
||||
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
|
||||
@@ -1160,7 +1169,8 @@ dumpTableData_insert(Archive *fout, void
|
||||
@@ -1171,7 +1180,8 @@ dumpTableData_insert(Archive *fout, void
|
||||
if (fout->remoteVersion >= 70100)
|
||||
{
|
||||
appendPQExpBuffer(q, "DECLARE _pg_dump_cursor CURSOR FOR "
|
||||
|
|
@ -350,7 +399,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
fmtQualifiedId(tbinfo->dobj.namespace->dobj.name,
|
||||
classname));
|
||||
}
|
||||
@@ -1774,11 +1784,14 @@ dumpBlobComments(Archive *AH, void *arg)
|
||||
@@ -1791,11 +1801,14 @@ dumpBlobComments(Archive *AH, void *arg)
|
||||
Oid blobOid;
|
||||
char *comment;
|
||||
|
||||
|
|
@ -366,7 +415,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
comment = PQgetvalue(res, i, 1);
|
||||
|
||||
printfPQExpBuffer(commentcmd, "COMMENT ON LARGE OBJECT %u IS ",
|
||||
@@ -2926,6 +2939,7 @@ getTables(int *numTables)
|
||||
@@ -2933,6 +2946,7 @@ getTables(int *numTables)
|
||||
"d.refobjsubid as owning_col, "
|
||||
"(SELECT spcname FROM pg_tablespace t WHERE t.oid = c.reltablespace) AS reltablespace, "
|
||||
"array_to_string(c.reloptions, ', ') as reloptions "
|
||||
|
|
@ -374,7 +423,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
"from pg_class c "
|
||||
"left join pg_depend d on "
|
||||
"(c.relkind = '%c' and "
|
||||
@@ -2935,6 +2949,7 @@ getTables(int *numTables)
|
||||
@@ -2942,6 +2956,7 @@ getTables(int *numTables)
|
||||
"where relkind in ('%c', '%c', '%c', '%c') "
|
||||
"order by c.oid",
|
||||
username_subquery,
|
||||
|
|
@ -382,7 +431,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
RELKIND_SEQUENCE,
|
||||
RELKIND_RELATION, RELKIND_SEQUENCE,
|
||||
RELKIND_VIEW, RELKIND_COMPOSITE_TYPE);
|
||||
@@ -3131,6 +3146,7 @@ getTables(int *numTables)
|
||||
@@ -3138,6 +3153,7 @@ getTables(int *numTables)
|
||||
}
|
||||
tblinfo[i].reltablespace = strdup(PQgetvalue(res, i, i_reltablespace));
|
||||
tblinfo[i].reloptions = strdup(PQgetvalue(res, i, i_reloptions));
|
||||
|
|
@ -390,7 +439,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
|
||||
/* other fields were zeroed above */
|
||||
|
||||
@@ -4362,11 +4378,13 @@ getTableAttrs(TableInfo *tblinfo, int nu
|
||||
@@ -4369,11 +4385,13 @@ getTableAttrs(TableInfo *tblinfo, int nu
|
||||
appendPQExpBuffer(q, "SELECT a.attnum, a.attname, a.atttypmod, a.attstattarget, a.attstorage, t.typstorage, "
|
||||
"a.attnotnull, a.atthasdef, a.attisdropped, a.attislocal, "
|
||||
"pg_catalog.format_type(t.oid,a.atttypmod) as atttypname "
|
||||
|
|
@ -404,7 +453,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
tbinfo->dobj.catId.oid);
|
||||
}
|
||||
else if (g_fout->remoteVersion >= 70100)
|
||||
@@ -4425,6 +4443,7 @@ getTableAttrs(TableInfo *tblinfo, int nu
|
||||
@@ -4432,6 +4450,7 @@ getTableAttrs(TableInfo *tblinfo, int nu
|
||||
tbinfo->typstorage = (char *) malloc(ntups * sizeof(char));
|
||||
tbinfo->attisdropped = (bool *) malloc(ntups * sizeof(bool));
|
||||
tbinfo->attislocal = (bool *) malloc(ntups * sizeof(bool));
|
||||
|
|
@ -412,7 +461,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
tbinfo->notnull = (bool *) malloc(ntups * sizeof(bool));
|
||||
tbinfo->attrdefs = (AttrDefInfo **) malloc(ntups * sizeof(AttrDefInfo *));
|
||||
tbinfo->inhAttrs = (bool *) malloc(ntups * sizeof(bool));
|
||||
@@ -4456,6 +4475,8 @@ getTableAttrs(TableInfo *tblinfo, int nu
|
||||
@@ -4463,6 +4482,8 @@ getTableAttrs(TableInfo *tblinfo, int nu
|
||||
tbinfo->inhAttrs[j] = false;
|
||||
tbinfo->inhAttrDef[j] = false;
|
||||
tbinfo->inhNotNull[j] = false;
|
||||
|
|
@ -421,7 +470,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
}
|
||||
|
||||
PQclear(res);
|
||||
@@ -6459,8 +6480,10 @@ dumpFunc(Archive *fout, FuncInfo *finfo)
|
||||
@@ -6466,8 +6487,10 @@ dumpFunc(Archive *fout, FuncInfo *finfo)
|
||||
"provolatile, proisstrict, prosecdef, "
|
||||
"proconfig, procost, prorows, "
|
||||
"(SELECT lanname FROM pg_catalog.pg_language WHERE oid = prolang) as lanname "
|
||||
|
|
@ -432,7 +481,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
finfo->dobj.catId.oid);
|
||||
}
|
||||
else if (g_fout->remoteVersion >= 80100)
|
||||
@@ -6698,6 +6721,8 @@ dumpFunc(Archive *fout, FuncInfo *finfo)
|
||||
@@ -6705,6 +6728,8 @@ dumpFunc(Archive *fout, FuncInfo *finfo)
|
||||
if (prosecdef[0] == 't')
|
||||
appendPQExpBuffer(q, " SECURITY DEFINER");
|
||||
|
||||
|
|
@ -441,7 +490,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
/*
|
||||
* COST and ROWS are emitted only if present and not default, so as not to
|
||||
* break backwards-compatibility of the dump without need. Keep this code
|
||||
@@ -8779,6 +8804,8 @@ dumpTableSchema(Archive *fout, TableInfo
|
||||
@@ -8786,6 +8811,8 @@ dumpTableSchema(Archive *fout, TableInfo
|
||||
if (tbinfo->notnull[j] && !tbinfo->inhNotNull[j])
|
||||
appendPQExpBuffer(q, " NOT NULL");
|
||||
|
||||
|
|
@ -450,7 +499,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
actual_atts++;
|
||||
}
|
||||
}
|
||||
@@ -8826,6 +8853,8 @@ dumpTableSchema(Archive *fout, TableInfo
|
||||
@@ -8833,6 +8860,8 @@ dumpTableSchema(Archive *fout, TableInfo
|
||||
if (tbinfo->reloptions && strlen(tbinfo->reloptions) > 0)
|
||||
appendPQExpBuffer(q, "\nWITH (%s)", tbinfo->reloptions);
|
||||
|
||||
|
|
@ -459,7 +508,7 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
appendPQExpBuffer(q, ";\n");
|
||||
|
||||
/* Loop dumping statistics and storage statements */
|
||||
@@ -10243,6 +10272,10 @@ fmtCopyColumnList(const TableInfo *ti)
|
||||
@@ -10250,6 +10279,10 @@ fmtCopyColumnList(const TableInfo *ti)
|
||||
|
||||
appendPQExpBuffer(q, "(");
|
||||
needComma = false;
|
||||
|
|
@ -471,8 +520,8 @@ diff -rpNU3 base/src/bin/pg_dump/pg_dump.c sepgsql/src/bin/pg_dump/pg_dump.c
|
|||
{
|
||||
if (attisdropped[i])
|
||||
diff -rpNU3 base/src/bin/pg_dump/pg_dump.h sepgsql/src/bin/pg_dump/pg_dump.h
|
||||
--- base/src/bin/pg_dump/pg_dump.h 2008-01-07 23:51:33.000000000 +0900
|
||||
+++ sepgsql/src/bin/pg_dump/pg_dump.h 2008-06-15 22:27:55.000000000 +0900
|
||||
--- base/src/bin/pg_dump/pg_dump.h 2009-02-02 11:47:17.000000000 +0900
|
||||
+++ sepgsql/src/bin/pg_dump/pg_dump.h 2009-02-02 11:58:34.000000000 +0900
|
||||
@@ -238,6 +238,7 @@ typedef struct _tableInfo
|
||||
char relkind;
|
||||
char *reltablespace; /* relation tablespace */
|
||||
|
|
@ -103,9 +103,9 @@ diff -rpNU3 base/src/backend/security/sepgsql/policy/sepostgresql-devel.if sepgs
|
|||
+## There are no interface declaration
|
||||
diff -rpNU3 base/src/backend/security/sepgsql/policy/sepostgresql-devel.te sepgsql/src/backend/security/sepgsql/policy/sepostgresql-devel.te
|
||||
--- base/src/backend/security/sepgsql/policy/sepostgresql-devel.te 1970-01-01 09:00:00.000000000 +0900
|
||||
+++ sepgsql/src/backend/security/sepgsql/policy/sepostgresql-devel.te 2008-10-13 17:08:55.000000000 +0900
|
||||
@@ -0,0 +1,127 @@
|
||||
+policy_module(sepostgresql-devel, 3.14)
|
||||
+++ sepgsql/src/backend/security/sepgsql/policy/sepostgresql-devel.te 2009-02-26 21:30:17.000000000 +0900
|
||||
@@ -0,0 +1,120 @@
|
||||
+policy_module(sepostgresql-devel, 3.23)
|
||||
+
|
||||
+gen_require(`
|
||||
+ class db_database all_db_database_perms;
|
||||
|
|
@ -115,7 +115,6 @@ diff -rpNU3 base/src/backend/security/sepgsql/policy/sepostgresql-devel.te sepgs
|
|||
+ class db_tuple all_db_tuple_perms;
|
||||
+ class db_blob all_db_blob_perms;
|
||||
+
|
||||
+ attribute domain, home_type, tmpfile;
|
||||
+ attribute sepgsql_client_type;
|
||||
+ attribute sepgsql_unconfined_type;
|
||||
+
|
||||
|
|
@ -126,7 +125,13 @@ diff -rpNU3 base/src/backend/security/sepgsql/policy/sepostgresql-devel.te sepgs
|
|||
+ attribute sepgsql_blob_type;
|
||||
+ attribute sepgsql_module_type;
|
||||
+
|
||||
+ # for regression test
|
||||
+ type bin_t;
|
||||
+ type user_home_t;
|
||||
+ type sepgsql_trusted_proc_t;
|
||||
+
|
||||
+ attribute tmpfile;
|
||||
+ attribute user_ptynode;
|
||||
+')
|
||||
+
|
||||
+#################################
|
||||
|
|
@ -134,44 +139,30 @@ diff -rpNU3 base/src/backend/security/sepgsql/policy/sepostgresql-devel.te sepgs
|
|||
+# Domain for Testcases
|
||||
+#
|
||||
+
|
||||
+type sepgsql_test_t;
|
||||
+domain_type(sepgsql_test_t)
|
||||
+role sepgsql_test_r;
|
||||
+
|
||||
+userdom_unpriv_user_template(sepgsql_test)
|
||||
+
|
||||
+ifdef(`postgresql_role', `
|
||||
+ postgresql_role(sepgsql_test_r, sepgsql_test_t)
|
||||
+',`
|
||||
+ postgresql_userdom_template(sepgsql_test, sepgsql_test_t, sepgsql_test_r)
|
||||
+')
|
||||
+
|
||||
+allow sepgsql_test_t tmpfile : dir search_dir_perms;
|
||||
+allow sepgsql_test_t tmpfile : file rw_file_perms;
|
||||
+allow sepgsql_test_t user_ptynode : chr_file rw_file_perms;
|
||||
+
|
||||
+optional_policy(`
|
||||
+ gen_require(`
|
||||
+ role unconfined_r;
|
||||
+ type unconfined_t;
|
||||
+ role unconfined_r;
|
||||
+ ')
|
||||
+ allow unconfined_t sepgsql_test_t : process transition;
|
||||
+ role unconfined_r types sepgsql_test_t;
|
||||
+ role unconfined_r types sepgsql_trusted_proc_t;
|
||||
+')
|
||||
+
|
||||
+corecmd_exec_bin(sepgsql_test_t)
|
||||
+allow sepgsql_test_t bin_t : file { entrypoint };
|
||||
+
|
||||
+files_read_usr_files(sepgsql_test_t)
|
||||
+files_read_etc_files(sepgsql_test_t)
|
||||
+libs_use_ld_so(sepgsql_test_t)
|
||||
+libs_use_shared_libs(sepgsql_test_t)
|
||||
+
|
||||
+term_use_all_terms(sepgsql_test_t)
|
||||
+
|
||||
+files_search_home(sepgsql_test_t)
|
||||
+allow sepgsql_test_t home_type : file rw_file_perms;
|
||||
+allow sepgsql_test_t home_type : dir search_dir_perms;
|
||||
+miscfiles_read_localization(sepgsql_test_t)
|
||||
+
|
||||
+allow sepgsql_test_t tmpfile : dir search_dir_perms;
|
||||
+allow sepgsql_test_t tmpfile : file rw_file_perms;
|
||||
+
|
||||
+postgresql_stream_connect(sepgsql_test_t)
|
||||
+postgresql_unpriv_client(sepgsql_test_t)
|
||||
+
|
||||
+optional_policy(`
|
||||
+ nscd_shm_use(sepgsql_test_t)
|
||||
+')
|
||||
+
|
||||
+#################################
|
||||
+#
|
||||
+# SE-PostgreSQL Declarations
|
||||
|
|
@ -207,6 +198,7 @@ diff -rpNU3 base/src/backend/security/sepgsql/policy/sepostgresql-devel.te sepgs
|
|||
+ auditallow domain sepgsql_database_type : db_database *;
|
||||
+ auditallow domain sepgsql_table_type : db_table *;
|
||||
+ auditallow domain sepgsql_table_type : db_column *;
|
||||
+ auditallow domain sepgsql_table_type : db_tuple { relabelfrom relabelto };
|
||||
+ auditallow domain sepgsql_procedure_type : db_procedure *;
|
||||
+ auditallow domain sepgsql_blob_type : db_blob *;
|
||||
+ auditallow domain sepgsql_module_type : db_database { install_module };
|
||||
|
|
@ -217,6 +209,7 @@ diff -rpNU3 base/src/backend/security/sepgsql/policy/sepostgresql-devel.te sepgs
|
|||
+ dontaudit domain sepgsql_database_type : db_database *;
|
||||
+ dontaudit domain sepgsql_table_type : db_table *;
|
||||
+ dontaudit domain sepgsql_table_type : db_column *;
|
||||
+ dontaudit domain sepgsql_table_type : db_tuple { relabelfrom relabelto };
|
||||
+ dontaudit domain sepgsql_procedure_type : db_procedure *;
|
||||
+ dontaudit domain sepgsql_blob_type : db_blob *;
|
||||
+ dontaudit domain sepgsql_module_type : db_database { install_module };
|
||||
|
|
@ -228,9 +221,9 @@ diff -rpNU3 base/src/backend/security/sepgsql/policy/sepostgresql-devel.te sepgs
|
|||
+# SE-PostgreSQL regression test mode switch
|
||||
+#
|
||||
+tunable_policy(`sepgsql_regression_test_mode',`
|
||||
+ allow sepgsql_client_type home_type : db_database { install_module };
|
||||
+ allow sepgsql_unconfined_type home_type : db_database { install_module };
|
||||
+ allow sepgsql_database_type home_type : db_database { load_module };
|
||||
+ allow sepgsql_client_type user_home_t : db_database { install_module };
|
||||
+ allow sepgsql_unconfined_type user_home_t : db_database { install_module };
|
||||
+ allow sepgsql_database_type user_home_t : db_database { load_module };
|
||||
+')
|
||||
diff -rpNU3 base/src/backend/security/sepgsql/policy/sepostgresql.fc.template sepgsql/src/backend/security/sepgsql/policy/sepostgresql.fc.template
|
||||
--- base/src/backend/security/sepgsql/policy/sepostgresql.fc.template 1970-01-01 09:00:00.000000000 +0900
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -7,9 +7,9 @@
|
|||
# pidfile: /var/run/postmaster.pid
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
PGVERSION="8.3.5"
|
||||
PGVERSION="8.3.8"
|
||||
PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9a-z]*\).*$/\1/'`
|
||||
SEPGVERSION="2.1183"
|
||||
SEPGVERSION="2.2300"
|
||||
|
||||
# source function library
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
|
@ -38,7 +38,7 @@ export SEPGSQL_FALLBACK_CONTEXT
|
|||
|
||||
# Check that networking is up.
|
||||
test "${NETWORKING}" = "no" && exit 0
|
||||
test -f "${SEPGSQL_BIN}/postmaster" || exit 1
|
||||
test -f "${SEPGSQL_BIN}/sepostgres" || exit 1
|
||||
|
||||
script_result=0
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ do_initdb() {
|
|||
test -x /sbin/restorecon && /sbin/restorecon -R "${SEPGSQL_DATA}"
|
||||
# Initialize the database
|
||||
cd ${SEPGSQL_BIN}
|
||||
/sbin/runuser -- sepgsql -c "./initdb.sepgsql -A 'ident sameuser' ${SEPGSQL_DATA}" \
|
||||
/sbin/runuser -- sepgsql -c "./initdb.sepgsql --pgace-feature=selinux -A 'ident sameuser' ${SEPGSQL_DATA}" \
|
||||
>> "${SEPGSQL_STARTUP_LOG}" 2>&1 < /dev/null
|
||||
if [ -f "${SEPGSQL_DATA}/PG_VERSION" ]; then
|
||||
echo_success
|
||||
|
|
|
|||
|
|
@ -7,22 +7,14 @@
|
|||
# SE-PostgreSQL status extension
|
||||
%define selinux_policy_stores targeted mls
|
||||
|
||||
# Check required policy version
|
||||
%define fedora9 %(rpm -E '%{dist}' | grep -cE '^\.fc[1-9]$')
|
||||
%if %{fedora9}
|
||||
%define required_policy_version 3.3.1
|
||||
%else
|
||||
%define required_policy_version 3.4.2
|
||||
%endif
|
||||
|
||||
|
||||
|
||||
%{!?ssl:%define ssl 1}
|
||||
|
||||
Summary: Security Enhanced PostgreSQL
|
||||
Name: sepostgresql
|
||||
Version: 8.3.5
|
||||
Release: 2.1183%{?sepgsql_extension}%{?dist}
|
||||
Version: 8.3.8
|
||||
Release: 2.2300%{?sepgsql_extension}%{?dist}
|
||||
License: BSD
|
||||
Group: Applications/Databases
|
||||
Url: http://code.google.com/p/sepgsql/
|
||||
|
|
@ -31,16 +23,13 @@ Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.t
|
|||
Source1: sepostgresql.init
|
||||
Source2: sepostgresql.8
|
||||
Source3: sepostgresql.logrotate
|
||||
Patch0: sepostgresql-sepgsql-8.3.5-2.patch
|
||||
Patch1: sepostgresql-policy-8.3.5-2.patch
|
||||
Patch2: sepostgresql-pg_dump-8.3.5-2.patch
|
||||
Patch0: sepostgresql-sepgsql-8.3.8-2.patch
|
||||
Patch1: sepostgresql-policy-8.3.8-2.patch
|
||||
Patch2: sepostgresql-pg_dump-8.3.8-2.patch
|
||||
Patch3: sepostgresql-fedora-prefix.patch
|
||||
BuildRequires: perl glibc-devel bison flex readline-devel zlib-devel >= 1.0.4
|
||||
BuildRequires: checkpolicy libselinux-devel >= 2.0.43
|
||||
BuildRequires: selinux-policy >= %{required_policy_version}
|
||||
%if %{fedora9}
|
||||
BuildRequires: selinux-policy-devel
|
||||
%endif
|
||||
BuildRequires: selinux-policy >= 3.4.2
|
||||
%if %{ssl}
|
||||
BuildRequires: openssl-devel
|
||||
%endif
|
||||
|
|
@ -50,7 +39,7 @@ Requires(preun): /sbin/chkconfig /sbin/service
|
|||
Requires(postun): policycoreutils
|
||||
Requires: postgresql-server = %{version}
|
||||
Requires: policycoreutils >= 2.0.16 libselinux >= 2.0.43
|
||||
Requires: selinux-policy >= %{required_policy_version}
|
||||
Requires: selinux-policy >= 3.4.2
|
||||
Requires: tzdata logrotate
|
||||
|
||||
%description
|
||||
|
|
@ -88,7 +77,6 @@ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
|
|||
|
||||
# parallel build, if possible
|
||||
make %{?_smp_mflags}
|
||||
# to create empty .fc file
|
||||
touch src/backend/security/sepgsql/policy/sepostgresql-devel.fc
|
||||
make -C src/backend/security/sepgsql/policy
|
||||
|
||||
|
|
@ -154,8 +142,9 @@ exit 0
|
|||
|
||||
for store in %{selinux_policy_stores}
|
||||
do
|
||||
# clean up legacy policy module (now it is unnecessary)
|
||||
%{_sbindir}/semodule -s ${store} -r sepostgresql >& /dev/null || :
|
||||
if %{_sbindir}/semodule -s ${store} -l | grep -Eq "^sepostgresql-devel"; then
|
||||
if %{_sbindir}/semodule -s ${store} -l 2>/dev/null | grep -Eq "^sepostgresql-devel"; then
|
||||
%{_sbindir}/semodule -s ${store} \
|
||||
-i %{_datadir}/selinux/${store}/sepostgresql-devel.pp >& /dev/null || :
|
||||
fi
|
||||
|
|
@ -187,7 +176,7 @@ fi
|
|||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYRIGHT README HISTORY
|
||||
%doc COPYRIGHT README
|
||||
%{_initrddir}/sepostgresql
|
||||
%{_sysconfdir}/logrotate.d/sepostgresql
|
||||
%{_bindir}/initdb.sepgsql
|
||||
|
|
@ -214,6 +203,30 @@ fi
|
|||
%attr(700,sepgsql,sepgsql) %dir %{_localstatedir}/lib/sepgsql/backups
|
||||
|
||||
%changelog
|
||||
* Thu Sep 10 2009 KaiGai Kohei <kaigai@kaigai.gr.jp> - 8.3.8-2300
|
||||
- upgrade base PostgreSQL v8.3.7->8.3.8
|
||||
|
||||
* Fri Apr 17 2009 KaiGai Kohei <kaigai@kaigai.gr.jp> - 8.3.7-1772
|
||||
- bugfix: /etc/init.d/sepostgresql initdb didn't work correctly
|
||||
|
||||
* Fri Mar 27 2009 KaiGai Kohei <kaigai@kaigai.gr.jp> - 8.3.7-2.1770
|
||||
- upgrade base PostgreSQL version 8.3.6->8.3.7
|
||||
|
||||
* Thu Feb 26 2009 KaiGai Kohei <kaigai@kaigai.gr.jp> - 8.3.6-2.1635
|
||||
- bugfix: possible information leak by the order of permission checks
|
||||
in row level permission checks.
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.3.6-3.1518
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Fri Feb 6 2009 <kaigai@kaigai.gr.jp> - 8.3.6-2.1523
|
||||
- upgrade base PostgreSQL version 8.3.5->8.3.6
|
||||
- backport features from 8.4devel tree
|
||||
- security policy fix for Fedora 9
|
||||
|
||||
* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 8.3.5-2.1183
|
||||
- rebuild with new openssl
|
||||
|
||||
* Wed Nov 5 2008 <kaigai@kaigai.gr.jp> - 8.3.5-2.1182
|
||||
- upgrade base PostgreSQL version 8.3.4->8.3.5
|
||||
- backport cumulative bugfixes from 8.4devel series
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
3bc028774d7a79e926be0c6a9c7ca209 postgresql-8.3.5.tar.bz2
|
||||
aac683d03f765dc58a3a0e5eaa1927bf postgresql-8.3.8.tar.bz2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue