mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-17 16:50:22 +00:00
Fix 3749, handle '+' and '-' in id when merging /etc/passwd (#3771)
* Fix 3749, handle '+' and '-' in id when merging /etc/passwd * Add some comments
This commit is contained in:
@@ -76,7 +76,9 @@ for i in $*; do
|
||||
delim="|"
|
||||
for u in $removeusers
|
||||
do
|
||||
userlist=$userlist$u$delim
|
||||
# For special char +/-, need to escape
|
||||
[[ "${u:0:1}x" =~ ^\+|\-x ]] && uu="\\$u" || uu="$u"
|
||||
userlist=$userlist$uu$delim
|
||||
done
|
||||
# remove the last delimiter
|
||||
userlisttmp="${userlist%?}"
|
||||
|
Reference in New Issue
Block a user