Forced on us by security tightning in Mariadb 10.4
if (!(unprivileged || removed_privilege))
exim_fail("exim: changing group failed: %s\n", strerror(errno));
else
if (!(unprivileged || removed_privilege))
exim_fail("exim: changing group failed: %s\n", strerror(errno));
else
DEBUG(D_any) debug_printf("changing group to %ld failed: %s\n",
(long int)exim_gid, strerror(errno));
DEBUG(D_any) debug_printf("changing group to %ld failed: %s\n",
(long int)exim_gid, strerror(errno));
}
/* Handle a request to scan a file for malware */
}
/* Handle a request to scan a file for malware */
acl_smtp_rcpt = check_recipient
PARTIAL = 127.0.0.1::PORT_N
acl_smtp_rcpt = check_recipient
PARTIAL = 127.0.0.1::PORT_N
-SSPEC = PARTIAL/test/root/
+SSPEC = PARTIAL/test/root/pass
****
sudo rm test-stdout test-stderr
#
****
sudo rm test-stdout test-stderr
#
echo Starting DB server
background
DIR/bin.sys/mysqld --datadir=DIR/mysql --log-error=DIR/mysql/log --bind-address=* --port=PORT_N --socket=DIR/mysql/sock --pid-file=DIR/mysql/pidfile
****
#
echo Starting DB server
background
DIR/bin.sys/mysqld --datadir=DIR/mysql --log-error=DIR/mysql/log --bind-address=* --port=PORT_N --socket=DIR/mysql/sock --pid-file=DIR/mysql/pidfile
****
#
-# wait for db startup, insert some data
+### wait for db startup, set password on the root user
echo Waiting for DB server startup
echo Waiting for DB server startup
+sudo perl
+system 'mysql --protocol=socket --socket=`pwd`/mysql/sock --connect_timeout=10 -u root -e "set password = password(\"pass\")"';
+****
+#
+### create testdb and extra users
+echo Create testdb and extra users
-system 'mysqladmin --protocol=TCP -P PORT_N --connect_timeout=2 --wait=5 -u root create test';
+system 'mysqladmin --protocol=TCP -P PORT_N -u root -ppass create test';
-open($fh, '-|', 'mysql --protocol=TCP -P PORT_N -u root -D test -e "select 1 from mysql.user where User = \'root\' and Host = \'HOSTIPV4\'"');
+open($fh, '-|', 'mysql --protocol=TCP -P PORT_N -u root -ppass -D test -e "select 1 from mysql.user where User = \'root\' and Host = \'HOSTIPV4\'"');
my $line = <$fh>;
if (length($line) == 0) {
my $line = <$fh>;
if (length($line) == 0) {
- system 'mysql --protocol=TCP -P PORT_N -u root -D test -e "create user \'root\'@\'HOSTIPV4\'"';
+ system 'mysql --protocol=TCP -P PORT_N -u root -ppass -D test -e "create user \'root\'@\'HOSTIPV4\'"';
-open($fh, '-|', 'mysql --protocol=TCP -P PORT_N -u root -D test -e "select 1 from mysql.user where User = \'CALLER\' and Host = \'HOSTIPV4\'"');
+open($fh, '-|', 'mysql --protocol=TCP -P PORT_N -u root -ppass -D test -e "select 1 from mysql.user where User = \'CALLER\' and Host = \'HOSTIPV4\'"');
$line = <$fh>;
if (length($line) == 0) {
$line = <$fh>;
if (length($line) == 0) {
- system 'mysql --protocol=TCP -P PORT_N -u root -D test -e "create user \'CALLER\'@\'HOSTIPV4\'"';
+ system 'mysql --protocol=TCP -P PORT_N -u root -ppass -D test -e "create user \'CALLER\'@\'HOSTIPV4\'"';
-system 'mysql --protocol=TCP -P PORT_N -u root -D test \
+****
+#
+#
+# wait for db startup, insert some data
+echo Insert some data
+perl
+system 'mysql --protocol=TCP -P PORT_N -u root -ppass -D test \
-e "CREATE TABLE them ( name text, id text ); \
INSERT INTO them VALUES ( \'Philip Hazel\', \'ph10\' ); \
INSERT INTO them VALUES ( \'Aristotle\', \'aaaa\' ); \
-e "CREATE TABLE them ( name text, id text ); \
INSERT INTO them VALUES ( \'Philip Hazel\', \'ph10\' ); \
INSERT INTO them VALUES ( \'Aristotle\', \'aaaa\' ); \
${lookup mysql {servers=127.0.0.1::PORT_N:x; select name from them where id='ph10';}}
${lookup mysql {servers=127.0.0.1::PORT_N/test/root/:x; select name from them where id='ph10';}}
${lookup mysql {servers=HOSTIPV4::PORT_N/test/root/:127.0.0.1::PORT_N; select name from them where id='ph10';}}
${lookup mysql {servers=127.0.0.1::PORT_N:x; select name from them where id='ph10';}}
${lookup mysql {servers=127.0.0.1::PORT_N/test/root/:x; select name from them where id='ph10';}}
${lookup mysql {servers=HOSTIPV4::PORT_N/test/root/:127.0.0.1::PORT_N; select name from them where id='ph10';}}
-${lookup mysql {servers=localhost(DIR/mysql/sock)/test/root/; select name from them where id='ph10';}}
+${lookup mysql {servers=localhost(DIR/mysql/sock)/test/root/pass; select name from them where id='ph10';}}
x
${lookup mysql {SELECT name FROM them WHERE id IN ('ph10', 'aaaa');}}
${lookup mysql {SELECT * FROM them WHERE id IN ('ph10', 'aaaa');}}
x
${lookup mysql {SELECT name FROM them WHERE id IN ('ph10', 'aaaa');}}
${lookup mysql {SELECT * FROM them WHERE id IN ('ph10', 'aaaa');}}
-system 'mysqladmin --protocol=TCP -P PORT_N -u root shutdown';
+system 'mysqladmin --protocol=TCP -P PORT_N -u root -ppass shutdown';
****
killdaemon
sudo rm -fr DIR/mysql
****
killdaemon
sudo rm -fr DIR/mysql
+### start a db server
+### wait for db startup, set password on the root user
+### create testdb and extra users
Exim version x.yz ....
configuration file is TESTSUITE/test-config
admin user
Exim version x.yz ....
configuration file is TESTSUITE/test-config
admin user
search_open: mysql "NULL"
cached open
search_find: file="NULL"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
- key="servers=localhost(TESTSUITE/mysql/sock)/test/root/; select name from them where id='ph10';" partial=-1 affix=NULL starflags=0 opts=NULL
+ key="servers=localhost(TESTSUITE/mysql/sock)/test/root/pass; select name from them where id='ph10';" partial=-1 affix=NULL starflags=0 opts=NULL
LRU list:
internal_search_find: file="NULL"
LRU list:
internal_search_find: file="NULL"
- type=mysql key="servers=localhost(TESTSUITE/mysql/sock)/test/root/; select name from them where id='ph10';" opts=NULL
- database lookup required for servers=localhost(TESTSUITE/mysql/sock)/test/root/; select name from them where id='ph10';
- MySQL query: "servers=localhost(TESTSUITE/mysql/sock)/test/root/; select name from them where id='ph10';" opts 'NULL'
+ type=mysql key="servers=localhost(TESTSUITE/mysql/sock)/test/root/pass; select name from them where id='ph10';" opts=NULL
+ database lookup required for servers=localhost(TESTSUITE/mysql/sock)/test/root/pass; select name from them where id='ph10';
+ MySQL query: "servers=localhost(TESTSUITE/mysql/sock)/test/root/pass; select name from them where id='ph10';" opts 'NULL'
MYSQL new connection: host=localhost port=0 socket=TESTSUITE/mysql/sock database=test user=root
lookup yielded: Philip Hazel
search_open: mysql "NULL"
MYSQL new connection: host=localhost port=0 socket=TESTSUITE/mysql/sock database=test user=root
lookup yielded: Philip Hazel
search_open: mysql "NULL"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
- key="select name from them where id = 'c'" partial=-1 affix=NULL starflags=0 opts="servers=127.0.0.1::1223/test/root/"
+ key="select name from them where id = 'c'" partial=-1 affix=NULL starflags=0 opts="servers=127.0.0.1::1223/test/root/pass"
LRU list:
internal_search_find: file="NULL"
LRU list:
internal_search_find: file="NULL"
- type=mysql key="select name from them where id = 'c'" opts="servers=127.0.0.1::1223/test/root/"
+ type=mysql key="select name from them where id = 'c'" opts="servers=127.0.0.1::1223/test/root/pass"
cached data found but wrong opts; database lookup required for select name from them where id = 'c'
cached data found but wrong opts; database lookup required for select name from them where id = 'c'
- MySQL query: "select name from them where id = 'c'" opts 'servers=127.0.0.1::1223/test/root/'
+ MySQL query: "select name from them where id = 'c'" opts 'servers=127.0.0.1::1223/test/root/pass'
MYSQL using cached connection for 127.0.0.1:1223/test/root
MYSQL: no data found
lookup failed
MYSQL using cached connection for 127.0.0.1:1223/test/root
MYSQL: no data found
lookup failed
-check set acl_m0 = ok: ${lookup mysql,servers=127.0.0.1::1223/test/root/ {select name from them where id = '$local_part'}}
+check set acl_m0 = ok: ${lookup mysql,servers=127.0.0.1::1223/test/root/pass {select name from them where id = '$local_part'}}
= ok:
search_open: mysql "NULL"
cached open
= ok:
search_open: mysql "NULL"
cached open
search_open: mysql "NULL"
cached open
search_find: file="NULL"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
- key="servers=127.0.0.1::1223/test/root/; select name from them where id = 'c'" partial=-1 affix=NULL starflags=0 opts=NULL
+ key="servers=127.0.0.1::1223/test/root/pass; select name from them where id = 'c'" partial=-1 affix=NULL starflags=0 opts=NULL
LRU list:
internal_search_find: file="NULL"
LRU list:
internal_search_find: file="NULL"
- type=mysql key="servers=127.0.0.1::1223/test/root/; select name from them where id = 'c'" opts=NULL
- database lookup required for servers=127.0.0.1::1223/test/root/; select name from them where id = 'c'
- MySQL query: "servers=127.0.0.1::1223/test/root/; select name from them where id = 'c'" opts 'NULL'
- lookup deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted
+ type=mysql key="servers=127.0.0.1::1223/test/root/pass; select name from them where id = 'c'" opts=NULL
+ database lookup required for servers=127.0.0.1::1223/test/root/pass; select name from them where id = 'c'
+ MySQL query: "servers=127.0.0.1::1223/test/root/pass; select name from them where id = 'c'" opts 'NULL'
+ lookup deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted
warn: condition test deferred in ACL "check_recipient"
LOG: MAIN
warn: condition test deferred in ACL "check_recipient"
LOG: MAIN
- H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted
+ H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted
processing "warn" (TESTSUITE/test-config 36)
check set acl_m0 = ok: hostlist
check hosts = net-mysql;select * from them where id='$local_part'
processing "warn" (TESTSUITE/test-config 36)
check set acl_m0 = ok: hostlist
check hosts = net-mysql;select * from them where id='$local_part'
warn: condition test failed in ACL "check_recipient"
processing "warn" (TESTSUITE/test-config 39)
check set acl_m0 = FAIL: hostlist
warn: condition test failed in ACL "check_recipient"
processing "warn" (TESTSUITE/test-config 39)
check set acl_m0 = FAIL: hostlist
-check hosts = <& net-mysql;servers=127.0.0.1::1223/test/root/; select * from them where id='$local_part'
+check hosts = <& net-mysql;servers=127.0.0.1::1223/test/root/pass; select * from them where id='$local_part'
search_open: mysql "NULL"
cached open
search_find: file="NULL"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
- key="servers=127.0.0.1::1223/test/root/; select * from them where id='c'" partial=-1 affix=NULL starflags=0 opts=NULL
+ key="servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'" partial=-1 affix=NULL starflags=0 opts=NULL
LRU list:
internal_search_find: file="NULL"
LRU list:
internal_search_find: file="NULL"
- type=mysql key="servers=127.0.0.1::1223/test/root/; select * from them where id='c'" opts=NULL
-database lookup required for servers=127.0.0.1::1223/test/root/; select * from them where id='c'
-MySQL query: "servers=127.0.0.1::1223/test/root/; select * from them where id='c'" opts 'NULL'
-lookup deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted
-host in "<& net-mysql;servers=127.0.0.1::1223/test/root/; select * from them where id='c'"? list match deferred for net-mysql;servers=127.0.0.1::1223/test/root/; select * from them where id='c'
+ type=mysql key="servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'" opts=NULL
+database lookup required for servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'
+MySQL query: "servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'" opts 'NULL'
+lookup deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted
+host in "<& net-mysql;servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'"? list match deferred for net-mysql;servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'
warn: condition test deferred in ACL "check_recipient"
LOG: MAIN
warn: condition test deferred in ACL "check_recipient"
LOG: MAIN
- H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted
+ H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted
processing "warn" (TESTSUITE/test-config 44)
check set acl_m0 = FAIL: hostlist
processing "warn" (TESTSUITE/test-config 44)
check set acl_m0 = FAIL: hostlist
-check hosts = <& net-mysql,servers=127.0.0.1::1223/test/root/; select * from them where id='$local_part'
+check hosts = <& net-mysql,servers=127.0.0.1::1223/test/root/pass; select * from them where id='$local_part'
search_open: mysql "NULL"
cached open
search_find: file="NULL"
search_open: mysql "NULL"
cached open
search_find: file="NULL"
- key=" select * from them where id='c'" partial=-1 affix=NULL starflags=0 opts="servers=127.0.0.1::1223/test/root/"
+ key=" select * from them where id='c'" partial=-1 affix=NULL starflags=0 opts="servers=127.0.0.1::1223/test/root/pass"
LRU list:
internal_search_find: file="NULL"
LRU list:
internal_search_find: file="NULL"
- type=mysql key=" select * from them where id='c'" opts="servers=127.0.0.1::1223/test/root/"
+ type=mysql key=" select * from them where id='c'" opts="servers=127.0.0.1::1223/test/root/pass"
database lookup required for select * from them where id='c'
database lookup required for select * from them where id='c'
-MySQL query: " select * from them where id='c'" opts 'servers=127.0.0.1::1223/test/root/'
-lookup deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted
-host in "<& net-mysql,servers=127.0.0.1::1223/test/root/; select * from them where id='c'"? list match deferred for net-mysql,servers=127.0.0.1::1223/test/root/; select * from them where id='c'
+MySQL query: " select * from them where id='c'" opts 'servers=127.0.0.1::1223/test/root/pass'
+lookup deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted
+host in "<& net-mysql,servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'"? list match deferred for net-mysql,servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'
warn: condition test deferred in ACL "check_recipient"
LOG: MAIN
warn: condition test deferred in ACL "check_recipient"
LOG: MAIN
- H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/" is tainted
+ H=[10.0.0.0] Warning: ACL "warn" statement skipped: condition test deferred: MySQL server "127.0.0.1:1223/test/root/pass" is tainted
processing "accept" (TESTSUITE/test-config 47)
check domains = +local_domains
d in "@"? no (end of list)
processing "accept" (TESTSUITE/test-config 47)
check domains = +local_domains
d in "@"? no (end of list)
+### start a db server
+### wait for db startup, set password on the root user
+### create testdb and extra users
> Philip Hazel
> Philip Hazel
>
> Philip Hazel
> Philip Hazel
>
250 OK\r
550 relay not permitted\r
221 myhost.test.ex closing connection\r
250 OK\r
550 relay not permitted\r
221 myhost.test.ex closing connection\r
+
+******** SERVER ********
+### start a db server
+### wait for db startup, set password on the root user
+### create testdb and extra users