03 Mar
Posted by: Christian Wimmer in: Common, JEDI Windows API Headers, JEDI Windows Security Code Lib
Suggestion box
Do you want to know something about security? How to use a special class or method? Need a snipet code using JWSCL? Just type here your question.
However, we do not create whole applications. That’s your business
.
7 Responses
satoo
18|Mar|2008 11. how can i get username of process (in win2000, winxp, terminal service) started under other user? i do following: OpenProcess, OpenProcessToken, LookupAccountSid (or OpenProcess, GetSecurityInfo, LookupAccountSid). i get truth only if i use both of method
2. CachedGetUserFromSid how to use it? i call it with good sid (IsValidSid before) but i take AV.
3. lsass uses cpu if i use LookupAccountSid etc, but taskman.exe don’t load system through lsass. how taskman is working?
Christian Wimmer
19|Mar|2008 21. You can use either GetTokenInformation with TokenUser as parameter, or impersonate the token and call GetUserName to get the user name. However OpenProcess needs the DEBUG privilege to open foreign processes.
2. Without reading your code I can only guess which I don’t do now.
JWSCL implements this function in JwsclSid.pas at function TJwSecurityId.GetCachedUserFromSid : WideString;
3. You can use Mark Russinovich’s ProcessExplorer to find out more about your system.
rweijnen
19|Mar|2008 3@cachedgetuserfromsid: are you reserving memory?
satoo
24|Mar|2008 4thx a lot. i was stupid (a little
) it’s works fine. another question: how can i get user’s domain. result of CachedGetUserFromSid is USERNAME_ONLY, but some users have similar local and domain users; some users are members of other domain….
sorry of my russian’s english
Christian Wimmer
24|Mar|2008 5The SID already contains the domain SID. See also here. So you can use the API GetWindowsAccountDomainSid to get the users’ domain as a SID or you can use LookupAccountSid to get the user’s name and domain.
Try out the JWSCL – it helps a lot.
Oliver
04|Apr|2008 6Привет,
… а может быть кто-нибудь тоже понимает на-русском. Но наверное редко здесь
// Оливер
satoo
10|Aug|2008 7я не тормоз
рсс подписку не видел. чего изволите?
Leave a reply
You must be logged in to post a comment.
Search
Paypal donation (EUR)
Download Win 7 Search Provider
Categories
Archives
Tags
Recent Posts
Recent Comments
Blogroll
JEDI Sites
Pages
A design creation of Design Disease
Copyright © 2007 - JEDI Windows API - is proudly powered by WordPress
InSense 1.0 Theme by Design Disease brought to you by HostGator Web Hosting.