Skip to content

Commit

Permalink
Check and disallow creation of BE's / datasets with whitespace,
Browse files Browse the repository at this point in the history
nicknames are the only location we support this
  • Loading branch information
Kris Moore committed Jan 21, 2016
1 parent f41b8fe commit c2915a3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions beadm
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,12 @@ case ${1} in
__usage
fi

if echo "$NEWBE" | grep -q " "
then
echo "ERROR: White-space in dataset name not permitted"
exit 1
fi

# Do some sanity checking
if [ ${OPTION_r} -eq 1 ]
then
Expand Down Expand Up @@ -1091,6 +1097,12 @@ EOF
if [ "${RENAMENICK}" = "NO" ]
then
# Renaming a dataset

if echo "${nName}" | grep -q " "
then
echo "ERROR: White-space in dataset name not permitted"
exit 1
fi
__be_exist ${POOL}/${BEDS}/${oName}
if [ "${BOOTFS}" = "${POOL}/${BEDS}/${oName}" ]
then
Expand Down

0 comments on commit c2915a3

Please sign in to comment.