cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 9b004053351da814e38c82797885057a02dce7d4
parent dd3525f3fdb422b3d133c39ff0b12da0a69b0cbc
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Wed, 22 Apr 2020 15:02:28 +0300

kiss: ensure that the owner actually exists

Diffstat:
Mkiss | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/kiss b/kiss @@ -1166,9 +1166,12 @@ pkg_fetch() { # ownership of files and directories in the rare # case that the repository is owned by a 3rd user. ( - user=$(stat -c %U "$PWD") + user=$(stat -c %U "$PWD") || user=root - [ "${user:=root}" = root ] || + id -u "$user" >/dev/null 2>&1 || + user=root + + [ "$user" = root ] || log "Dropping permissions to $user for pull" case $su in