aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-27 22:10:08 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-27 22:10:08 +0000
commit0906940147719272b6881a8b66e528665644d283 (patch)
tree018e9639df859b8c5a5270c49cdc1a9f2430b435 /kiss
parent0a590f0e38c126825912405045d9b2b12d6c44c9 (diff)
downloadcpt-0906940147719272b6881a8b66e528665644d283.tar.gz
kiss: Ensure all arguments sent to dosu are quoted
FossilOrigin-Name: 00aa2010d48a143dc45b32e1c813cc6eb976f8ef3d5aa205eddd186ee0e0f1ed
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss16
1 files changed, 8 insertions, 8 deletions
diff --git a/kiss b/kiss
index 7db2fd4..3b7de2e 100755
--- a/kiss
+++ b/kiss
@@ -804,9 +804,9 @@ pkg_remove() {
[ "${file##/etc/*}" ] || continue
if [ -d "$KISS_ROOT/$file" ]; then
- dosu rmdir "$KISS_ROOT/$file" 2>/dev/null || continue
+ dosu rmdir "'$KISS_ROOT/$file'" 2>/dev/null || continue
else
- dosu rm -f "$KISS_ROOT/$file"
+ dosu rm -f "'$KISS_ROOT/$file'"
fi
done < "$sys_db/$1/manifest"
@@ -884,7 +884,7 @@ pkg_install() {
pkg_rsync() {
dosu rsync --chown=root:root --chmod=Du-s,Dg-s,Do-s \
-WhHKa --no-compress "$1" --exclude /etc \
- "$tar_dir/$pkg_name/" "$KISS_ROOT/"
+ "'$tar_dir/$pkg_name/'" "'$KISS_ROOT/'"
}
# Install the package by using 'rsync' and overwrite any existing files
@@ -894,7 +894,7 @@ pkg_install() {
# If '/etc/' exists in the package, install it but don't overwrite.
[ -d "$tar_dir/$pkg_name/etc" ] &&
dosu rsync --chown=root:root -WhHKa --no-compress --ignore-existing \
- "$tar_dir/$pkg_name/etc" "$KISS_ROOT/"
+ "'$tar_dir/$pkg_name/etc'" "'$KISS_ROOT/'"
# Remove any leftover files if this is an upgrade.
[ "$old_manifest" ] && {
@@ -911,18 +911,18 @@ pkg_install() {
# Remove files.
if [ -f "$file" ] && [ ! -L "$file" ]; then
- dosu rm -f "$file"
+ dosu rm -f "'$file'"
# Remove file symlinks.
elif [ -L "$file" ] && [ ! -d "$file" ]; then
- dosu unlink "$file" ||:
+ dosu unlink "'$file'" ||:
# Skip directory symlinks.
elif [ -L "$file" ] && [ -d "$file" ]; then :
# Remove directories if empty.
elif [ -d "$file" ]; then
- dosu rmdir "$file" 2>/dev/null ||:
+ dosu rmdir "'$file'" 2>/dev/null ||:
fi
done ||:
}
@@ -938,7 +938,7 @@ pkg_install() {
if [ -x "$sys_db/$pkg_name/post-install" ]; then
log "$pkg_name" "Running post-install script"
- dosu "$sys_db/$pkg_name/post-install" ||:
+ dosu "'$sys_db/$pkg_name/post-install'" ||:
fi
log "$pkg_name" "Installed successfully"