From c950dd1e9022c2a8965d648d1ab7d3fe25aa3ad4 Mon Sep 17 00:00:00 2001 From: Thomas Eckert Date: Thu, 11 Oct 2018 19:00:44 +0200 Subject: [PATCH] quote "remote user", ensuring `user` is handled as one parameter --- cdist/conf/type/__user/gencode-remote | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cdist/conf/type/__user/gencode-remote b/cdist/conf/type/__user/gencode-remote index 8f2a422a..90e3707d 100755 --- a/cdist/conf/type/__user/gencode-remote +++ b/cdist/conf/type/__user/gencode-remote @@ -135,10 +135,10 @@ elif [ "$state" = "absent" ]; then if grep -q "^${name}:" "$__object/explorer/passwd"; then #user exists, but state != present, so delete it if [ -f "$__object/parameter/remove-home" ]; then - printf "userdel -r %s >/dev/null 2>&1\n" "${name}" + printf "userdel -r '%s' >/dev/null 2>&1\n" "${name}" echo "userdel -r" >> "$__messages_out" else - printf "userdel %s >/dev/null 2>&1\n" "${name}" + printf "userdel '%s' >/dev/null 2>&1\n" "${name}" echo "userdel" >> "$__messages_out" fi fi