Article View: borland.public.cppbuilder.nativeapi
Article #6819Username/password
From: John
Date: Wed, 13 Apr 2005 01:06
Date: Wed, 13 Apr 2005 01:06
48 lines
2483 bytes
2483 bytes
Hope this is a suitable newsgroup for this question (previously asked in
students ng).
Instead of asking users for username/password when starting an
application.
I would like to integrate security aspect closer to WinXP.
What I thought is creating a security group.
Something close to LookupAccountSid when peUse has the value SidTypeGroup.
Is it feasible and how ?
How can I make an existing user SID becoming a member of this newly created
group ?
Just to clarify my point.
When we want to know to which security groups belong a user we do
something like (see code below). From there all group memberships are
known.
Therefore it would be nice if we could create a security group with actual
usage entirely dedicated to a specific application.
Users would avoid to identify themselves over and over again since they
already did that at boot up time.
Thnks in advance for any suggestions.
-------------------------------------------------------------------------
hProcess = GetCurrentProcess();
if ( !hProcess ) {
PERR( TEXT("GetCurrentProcess") );
return 1;
}
if ( !OpenProcessToken(hProcess, (TOKEN_READ | TOKEN_QUERY_SOURCE),
&hAccessToken) ) {
PERR( TEXT("OpenProcessToken") );
return 1;
}
ticInfoClass = TokenGroups;
dwTokInfoBufSz = SZ_TOK_INFO_BUF;
if ( !GetTokenInformation(hAccessToken,
ticInfoClass,
ucTokInfoBuf,
(DWORD) SZ_TOK_INFO_BUF,
&dwTokInfoBufSz) ) {
PERR( TEXT("GetTokenInformation") );
return 1;
}
-------------------------------------------------------------------------
Technical Details
Message-ID:
<opso5b0dactqe2av@news.noeatingpuzzlepieces>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a06201d7cf4b13ca,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Content-Type: text/plain; charset=iso-8859-15; format=flowed Newsgroups: borland.public.cppbuilder.nativeapi Subject: Username/password From: John <john@nospam> MIME-Version: 1.0 Date: Tue, 12 Apr 2005 21:06:03 -0400 Message-ID: <opso5b0dactqe2av@news.noeatingpuzzlepieces> User-Agent: Opera7.11/Win32 M2 build 2887 NNTP-Posting-Host: 66.158.145.173 X-Trace: newsgroups.borland.com 1113354364 66.158.145.173 (12 Apr 2005 18:06:04 -0800) Lines: 48 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail