[jcifs] LsaLookupNames (reloaded)

Giampaolo Tomassoni Giampaolo at Tomassoni.biz
Fri May 23 15:08:46 GMT 2008


Dears,

I'm attaching to this message the second release of my own contribution to
the jcifs project. It is a patch against jcifs-1.2.20c.

The contributed code allows to obtain SIDs from domain names a-la
LsaLookupNames().

Returned SIDs have their domainName and acctName fields correctly set, apart
the fact that the casefold of acctName may not be exactly the one stored in
the server or domain. If you need it, a resolve() call on the returned SIDs
may be issued in order to obtain the exact acctName.

Example of use:

	NtlmPasswordAuthentication ntlm = new NtlmPasswordAuthentication(
		"THEDOMAIN",
		"AUser",
		"ItsPassword"
	);

	SID sids[] = SID.getFromName(
		"thedc",
		ntlm,
		new String[] {
			"MaybeAUser",
			"OrPherapsAGroupOfUsers",
			"OrMaybeEvenAComputer"
		}
	);

Regards,

-------------------------------------
Giampaolo Tomassoni - I.T. Consultant
Piazza VIII Aprile 1948, 4
I-53043 Chiusi (SI) - Italy
Tel/Ph: +39-0578-21100

MAI mandare un messaggio a:
NEVER send an e-mail to:

 rainbowl at tomassoni.biz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jcifs_1.2.20c+LsaLookupNames.patch
Type: application/octet-stream
Size: 11522 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20080523/a2333fb1/jcifs_1.2.20cLsaLookupNames.obj


More information about the jcifs mailing list