🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6820

Re: Username/password

#6820
From: John
Date: Wed, 13 Apr 2005 01:20
58 lines
2776 bytes
Sorry for horrible look.

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: <opso5coiv0tqe2av@news.noeatingpuzzlepieces>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <opso5b0dactqe2av@news.noeatingpuzzlepieces>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a06201d7cf4b13ca
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Username/password
References: <opso5b0dactqe2av@news.noeatingpuzzlepieces>
Message-ID: <opso5coiv0tqe2av@news.noeatingpuzzlepieces>
Content-Type: text/plain; charset=iso-8859-15; format=flowed
From: John <john@nospam>
MIME-Version: 1.0
Date: Tue, 12 Apr 2005 21:20:32 -0400
User-Agent: Opera7.11/Win32 M2 build 2887
NNTP-Posting-Host: 66.158.145.173
X-Trace: newsgroups.borland.com 1113355234 66.158.145.173 (12 Apr 2005 18:20:34 -0800)
Lines: 58
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail