3 # A wrapper script to launch psql command in regression test
5 # Copyright (c) 2010-2024, PostgreSQL Global Development Group
7 # -------------------------------------------------------------------------
10 echo "usage: `basename $0` <command> [options...]"
15 if [ ! -e "$RUNCON" ]; then
16 echo "runcon command is not found"
24 CONTEXT
="unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0-s0:c0.c255"
26 while IFS
='\\n' read LINE
28 if echo "$LINE" |
grep -q "^-- @SECURITY-CONTEXT="; then
29 if [ -s "$TEMP" ]; then
30 if [ -n "$CONTEXT" ]; then
31 "$RUNCON" "$CONTEXT" $
* < "$TEMP"
37 CONTEXT
=`echo "$LINE" | sed 's/^-- @SECURITY-CONTEXT=//g'`
38 LINE
="SELECT sepgsql_getcon(); -- confirm client privilege"
43 if [ -s "$TEMP" ]; then
44 if [ -n "$CONTEXT" ]; then
45 "$RUNCON" "$CONTEXT" $
* < "$TEMP"