// Path: src/main/java/com/asolutions/scmsshd/commands/filters/BadCommandException.java
// public class BadCommandException extends Exception {
// 
// 	private static final long serialVersionUID = 4904880805323643780L;
// 
// 	public BadCommandException(String reason) {
// 		super(reason);
// 	}
// 
// 	public BadCommandException() {
// 	}
// 
// }
// 
// Path: src/main/java/com/asolutions/scmsshd/commands/filters/git/GitCommandSeamer.java
// public class GitCommandSeamer {
// 
// 	private String command;
// 
// 	public GitCommandSeamer(String command) {
// 		this.command = command;
// 		this.command = this.command.replaceFirst("^git (\\w)", "git-$1");
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return command;
// 	}
// 
// }


import com.asolutions.scmsshd.commands.filters.BadCommandException;
import com.asolutions.scmsshd.commands.filters.git.GitCommandSeamer;
package com.asolutions.scmsshd.commands;


public class AllowedCommandChecker {

	private static String commands[] = {"git-upload-pack", "git-receive-pack", };
	
	public AllowedCommandChecker(String cmd) throws BadCommandException {
// Path: src/main/java/com/asolutions/scmsshd/commands/filters/BadCommandException.java
// public class BadCommandException extends Exception {
// 
// 	private static final long serialVersionUID = 4904880805323643780L;
// 
// 	public BadCommandException(String reason) {
// 		super(reason);
// 	}
// 
// 	public BadCommandException() {
// 	}
// 
// }
// 
// Path: src/main/java/com/asolutions/scmsshd/commands/filters/git/GitCommandSeamer.java
// public class GitCommandSeamer {
// 
// 	private String command;
// 
// 	public GitCommandSeamer(String command) {
// 		this.command = command;
// 		this.command = this.command.replaceFirst("^git (\\w)", "git-$1");
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return command;
// 	}
// 
// }


// Path: src/main/java/com/asolutions/scmsshd/commands/AllowedCommandChecker.java
import com.asolutions.scmsshd.commands.filters.BadCommandException;
import com.asolutions.scmsshd.commands.filters.git.GitCommandSeamer;

package com.asolutions.scmsshd.commands;


public class AllowedCommandChecker {

	private static String commands[] = {"git-upload-pack", "git-receive-pack", };
	
	public AllowedCommandChecker(String cmd) throws BadCommandException {
		cmd = new GitCommandSeamer(cmd).toString();