diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-01-23 20:44:48 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-01-23 20:48:27 -0500 |
commit | 968bc6fac91d6aaca594488ab85c179b686cbbdd (patch) | |
tree | 3cb8fa7ee4101723733e5ed5a06803f9c299c2d7 /src | |
parent | e5487f65fdbd05716ade642a3ae1c5c6e85b6f22 (diff) | |
download | postgresql-968bc6fac91d6aaca594488ab85c179b686cbbdd.tar.gz postgresql-968bc6fac91d6aaca594488ab85c179b686cbbdd.zip |
sepgsql, an SE-Linux integration for PostgreSQL
This is still pretty rough - among other things, the documentation
needs work, and the messages need a visit from the style police -
but this gets the basic framework in place.
KaiGai Kohei
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.global.in | 1 | ||||
-rw-r--r-- | src/test/regress/pg_regress.c | 6 | ||||
-rw-r--r-- | src/test/regress/pg_regress.h | 1 | ||||
-rw-r--r-- | src/test/regress/pg_regress_main.c | 7 |
4 files changed, 14 insertions, 1 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in index ebeee0c3b2b..d6b7b4769df 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -158,6 +158,7 @@ with_python = @with_python@ with_tcl = @with_tcl@ with_openssl = @with_openssl@ with_ossp_uuid = @with_ossp_uuid@ +with_selinux = @with_selinux@ with_libxml = @with_libxml@ with_libxslt = @with_libxslt@ with_system_tzdata = @with_system_tzdata@ diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index 79655cd653c..a3211622b9e 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -84,6 +84,7 @@ bool debug = false; char *inputdir = "."; char *outputdir = "."; char *psqldir = PGBINDIR; +char *launcher = NULL; static _stringlist *loadlanguage = NULL; static int max_connections = 0; static char *encoding = NULL; @@ -1871,6 +1872,7 @@ help(void) printf(_(" --dlpath=DIR look for dynamic libraries in DIR\n")); printf(_(" --temp-install=DIR create a temporary installation in DIR\n")); printf(_(" --use-existing use an existing installation\n")); + printf(_(" --launcher=CMD use CMD as launcher of psql\n")); printf(_("\n")); printf(_("Options for \"temp-install\" mode:\n")); printf(_(" --no-locale use C locale\n")); @@ -1922,6 +1924,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc {"create-role", required_argument, NULL, 18}, {"temp-config", required_argument, NULL, 19}, {"use-existing", no_argument, NULL, 20}, + {"launcher", required_argument, NULL, 21}, {NULL, 0, NULL, 0} }; @@ -2015,6 +2018,9 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc case 20: use_existing = true; break; + case 21: + launcher = strdup(optarg); + break; default: /* getopt_long already emitted a complaint */ fprintf(stderr, _("\nTry \"%s -h\" for more information.\n"), diff --git a/src/test/regress/pg_regress.h b/src/test/regress/pg_regress.h index 26069f642e7..606c7a1a70b 100644 --- a/src/test/regress/pg_regress.h +++ b/src/test/regress/pg_regress.h @@ -41,6 +41,7 @@ extern _stringlist *dblist; extern bool debug; extern char *inputdir; extern char *outputdir; +extern char *launcher; /* * This should not be global but every module should be able to read command diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 710e55841a7..3e43dd72b8e 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -33,6 +33,7 @@ psql_start_test(const char *testname, char outfile[MAXPGPATH]; char expectfile[MAXPGPATH]; char psql_cmd[MAXPGPATH * 3]; + size_t offset = 0; /* * Look for files in the output dir first, consistent with a vpath search. @@ -58,7 +59,11 @@ psql_start_test(const char *testname, add_stringlist_item(resultfiles, outfile); add_stringlist_item(expectfiles, expectfile); - snprintf(psql_cmd, sizeof(psql_cmd), + if (launcher) + offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, + "%s ", launcher); + + snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, SYSTEMQUOTE "\"%s%spsql\" -X -a -q -d \"%s\" < \"%s\" > \"%s\" 2>&1" SYSTEMQUOTE, psqldir ? psqldir : "", psqldir ? "/" : "", |