]> git.ipfire.org Git - people/ms/nightly-builds.git/commitdiff
Acquire a Kerberos ticket before uploading files
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 15 Aug 2019 11:39:24 +0000 (12:39 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 15 Aug 2019 11:39:24 +0000 (12:39 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
build.sh

index fbd6d0881911cd5e98149fd61d082887a0aeb1fb..11428234c2b9caee1e7ad90095d74532ae6d4042 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -114,6 +114,11 @@ build() {
 sync() {
        mkdir -p "${UPLOAD_DIR}"
 
+       # Acquire a Kerberos ticket for authentication
+       if ! klist &>/dev/null; then
+               kinit -k -t /etc/krb5.keytab "host/${HOSTNAME}"
+       fi
+
        rsync -avHz --progress ${RSYNC_ARGS} \
                "${UPLOAD_DIR}/" "${UPLOAD_TO}"
 }