After manually fixing
MDEV-23015, this program still fails to set a password for a user. This is because it is trying to update the mysql.user table, which is not a good practice in general and will not even work in MariaDB 10.4 and up.
The error you get when trying to set a password is:
Column 'Password' is not updatable at /usr/bin/mariadb-setpermission line 200, <STDIN> line 8.