summaryrefslogtreecommitdiffstats
path: root/db-functions
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2013-03-19 19:53:38 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-11-02 10:18:36 +0100
commitfbce7db101feaba0d69bf185b54270c1aa6d65ab (patch)
treee859e97597c01d9d79c7bbf2ab2078ac40c90dfb /db-functions
parent0992cc36f525898ff07032d0ee697ecb62fedc07 (diff)
downloaddbscripts-fbce7db101feaba0d69bf185b54270c1aa6d65ab.tar.gz
dbscripts-fbce7db101feaba0d69bf185b54270c1aa6d65ab.tar.xz
sourceballs: fix ACL issues on nymeria
ACLs from the WORKDIR were used, leading to problems as these weren't world-readable. Fix follows ftpdir-cleanup. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'db-functions')
-rw-r--r--db-functions9
1 files changed, 9 insertions, 0 deletions
diff --git a/db-functions b/db-functions
index b3a4293..4a9a42a 100644
--- a/db-functions
+++ b/db-functions
@@ -15,6 +15,15 @@ restore_umask () {
umask $UMASK >/dev/null
}
+# just like mv -f, but we touch the file and then copy the content so
+# default ACLs in the target dir will be applied
+mv_acl() {
+ rm -f "$2"
+ touch "$2"
+ cat "$1" >"$2" || return 1
+ rm -f "$1"
+}
+
# set up general environment
WORKDIR=$(mktemp -d "${TMPDIR}/${0##*/}.XXXXXXXXXX")
if [ -n "${SVNUSER}" ]; then