private static void processCommand(RepositoryManager repositoryMgr, String cmd)
			throws IOException {
		UserManager userMgr = repositoryMgr.getUserManager();
		String[] args = splitCommand(cmd);
		switch (args[0]) {
			case ADD_USER_COMMAND:  // add user
				String sid = args[1];
				char[] pwdHash = null;
				if (args.length == 4 && args[2].contentEquals(PASSWORD_OPTION)) {
					pwdHash = args[3].toCharArray();
				}
				try {
					userMgr.addUser(sid, pwdHash);
				}
				catch (DuplicateNameException e) {
					log.error("Add User Failed: " + e.getMessage());
				}
				break;
			case REMOVE_USER_COMMAND: // remove user
				sid = args[1];
				if (!userMgr.removeUser(sid)) {
					log.info("User not found: '" + sid + "'");
				}
				break;
			case RESET_USER_COMMAND: // reset user
				sid = args[1];
				pwdHash = null;
				if (args.length == 4 && args[2].contentEquals(PASSWORD_OPTION)) {
					pwdHash = args[3].toCharArray();
				}
				if (!userMgr.resetPassword(sid, pwdHash)) {
					log.info("Failed to reset password for user '" + sid + "'");
				}
				else if (pwdHash != null) {
					log.info("User '" + sid + "' password reset to specified password");
				}
				else {
					log.info("User '" + sid + "' password reset to default password");
				}
				break;
			case SET_USER_DN_COMMAND: // set/add user with DN for PKI
				sid = args[1];
				X500Principal x500User = new X500Principal(args[2]);
				if (userMgr.isValidUser(sid)) {
					userMgr.setDistinguishedName(sid, x500User);
				}
				else {
					try {
						userMgr.addUser(sid, x500User);
					}
					catch (DuplicateNameException e) {
						log.error("Add User Failed: " + e.getMessage());
						return;
					}
				}
				log.info("User '" + sid + "' DN set (" + x500User.getName() + ")");
				break;
			case GRANT_USER_COMMAND: // grant repository access
				sid = args[1];
				int permission = parsePermission(args[2]);
				String repName = args[3];
				if (!userMgr.isValidUser(sid)) {
					log.error("Failed to grant access for '" + sid +
						"', user has not been added to server.");
					return;
				}
				if (permission < 0) {
					log.error("Failed to process grant command.  Invalid permission: " + args[2]);
					return;
				}
				Repository rep = repositoryMgr.getRepository(repName);
				if (rep == null) {
					log.error("Failed to grant access for '" + sid + "', repository '" + repName +
						"' not found.");
					return;
				}
				rep.setUserPermission(sid, permission);
				break;
			case REVOKE_USER_COMMAND: // grant repository access
				sid = args[1];
				repName = args[2];
				rep = repositoryMgr.getRepository(repName);
				if (rep == null) {
					log.error("Failed to revoke access for '" + sid + "', repository '" + repName +
						"' not found.");
					return;
				}
				rep.removeUser(sid);
				break;
			default:
				log.error("Failed to process unrecognized command: " + args[0]);
		}
	}
Process the specified command.
@param repositoryMgr server's repository manager
@param cmd command string
@throws IOException if IO error occurs while processing command
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/CommandProcessor.java