[freetds] mission: emulate "trusted login"

James K. Lowden jklowden at freetds.org
Tue Feb 3 20:10:59 EST 2009


Peter Deacon wrote:
> Used LsaLogonUser years back to authenticate to windows by passing 
> challenge/response material from a client.

Hmm. Inspection of ntwlib.dll shows a reference to security.dll and a call
to AcceptSecurityContext.  Security.dll exports a tidy package of worthy
functions, 

	AcceptSecurityContext
	AcquireCredentialsHandle
	AddSecurityPackage
	ApplyControlToken
	CompleteAuthToken
	DecryptMessage
	DeleteSecurityContext
	DeleteSecurityPackage
	EncryptMessage
	EnumerateSecurityPackages
	ExportSecurityContext
	FreeContextBuffer
	FreeCredentialsHandle
	ImpersonateSecurityContext
	ImportSecurityContext
	InitSecurityInterface
	InitializeSecurityContext
	MakeSignature
	QueryContextAttributes
	QueryCredentialsAttributes
	QuerySecurityContextToken
	QuerySecurityPackageInfo
	RevertSecurityContext
	SealMessage
	UnsealMessage
	VerifySignature

Also found: 

	http://alt.pluralsight.com/samplecontent/sspi_auth.cpp

This provides the usual primitive example of something you don't want and
vague hints about the possibility of doing what you do want:  

	http://technet.microsoft.com/en-us/library/bb742535.aspx

	"It is conceivable that a TCP/IP provider could use SSPI to encapsulate
security functionality such that it can be invoked by a WinSock
application."

Indeed.  

--jkl



More information about the FreeTDS mailing list