summaryrefslogtreecommitdiff
path: root/bin/slave-build-connect
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-06-19 10:18:22 +0200
committerErich Eckner <git@eckner.net>2019-06-19 10:18:22 +0200
commit31fa73701b80256cd844a9c62cb01f1c662a32e5 (patch)
tree17f227097881ac7705ca415ef34f1be807f78762 /bin/slave-build-connect
parent91fbe3980795b7ad88330ab29b0a975e4bde9ed5 (diff)
downloadbuilder-31fa73701b80256cd844a9c62cb01f1c662a32e5.tar.xz
bin/slave-build-connect: block slaves which have `build_slaves`.`access_allowed`==0
Diffstat (limited to 'bin/slave-build-connect')
-rwxr-xr-xbin/slave-build-connect3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/slave-build-connect b/bin/slave-build-connect
index a3724cc..fa36219 100755
--- a/bin/slave-build-connect
+++ b/bin/slave-build-connect
@@ -27,11 +27,12 @@ if [ "x${SSH_ORIGINAL_COMMAND%% *}" = 'xget-assignment' ] || \
printf ' FROM `build_slaves`'
mysql_join_build_slaves_ssh_keys
mysql_join_ssh_keys_persons
- printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \
+ printf ' WHERE `build_slaves`.`name`=from_base64("%s")' \
"$(
printf '%s' "$1" | \
base64 -w0
)"
+ printf ' AND `build_slaves`.`access_allowed`;\n'
} | \
mysql_run_query | \
tr '\t' ' '