Article View: borland.public.cppbuilder.nativeapi
Article #2140Re: Assistance with AccessCheck() requested
From: Bob Gonder
Date: Thu, 12 Apr 2007 04:37
Date: Thu, 12 Apr 2007 04:37
59 lines
3033 bytes
3033 bytes
Andrue Cope wrote:
>> Perhaps some actual code would help others rule that out?
>
>Yeah that's possible I suppose. It's certainly not obvious what I
>should be asking for and what GENERIC_MAPPING should be.
>
>From my manual traversal of the ACL I can see that the single ACE has
>permissions of 0x20003 and so I've tried asking for that, for 0x3 and
0x00 02 00 03
Specific Rights == 3
Standard rights == READ_CONTROL
GenericRights == 0
So perhaps
GENERIC_MAPPING gm = { 0x20003, 0, 0, 0x20003 };
DWORD AccessMask = GENERIC_READ;
MapGenericMask( &AccessMask, &gm );
As I read this, GENERIC_READ causes MapGenericMask to copy GenericRead
from gm, so we should be able to skip that part and just use
DWORD AccessMask = 0x20003;
Unless we are supposed to be getting GENERIC_MAPPING from the system?
AccessCheck( something, something, AccessMask, &gm, etc.
One wonders why you need to call MapGenericMask if you are going to be
passing gm anyway.
Are you doing this for some files at driver level? If so, look at
http://msdn2.microsoft.com/en-us/library/aa490870.aspx
GENERIC_MAPPING* IoGetFileObjectGenericMapping(void);
Here's an example of using AcessCheck
Date: Tue, 23 May 2006 18:16:05 -0400
From: Colin B Maharaj
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: WHat is my account type
References: <lko372tv8d3pmfa8aljurjaqc4st3e5g9n@4ax.com>
Message-ID: <447389a3@newsgroups.borland.com>
An older message that looks similar
From: "Stephane Baillargeon"
Newsgroups: borland.public.cppbuilder.winapi
Subject: RE:Administrator priviliges
Date: Fri, 18 Jan 2002 17:17:10 -0500
Message-ID: <3c489efd_2@dnews>
Xref: dnews borland.public.cppbuilder.winapi:52777
Go to Google/More/Groups and search on the Message-ID
http://groups.google.com/group/borland.public.cppbuilder.nativeapi/browse_thread/thread/283096f94514b8ce
http://groups.google.com/group/borland.public.cppbuilder.winapi/browse_thread/thread/c3cf04a2b1ba722c
Technical Details
Message-ID:
<vt8r1310fd4tgivoavro3ssdgadjomt8fr@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<461cd310$1@newsgroups.borland.com> <remp1315lj4ontsa4qtu32e9rm0matb6rr@4ax.com> <461ceb64$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8e080841c8729530 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Assistance with AccessCheck() requested Date: Wed, 11 Apr 2007 21:37:18 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <vt8r1310fd4tgivoavro3ssdgadjomt8fr@4ax.com> References: <461cd310$1@newsgroups.borland.com> <remp1315lj4ontsa4qtu32e9rm0matb6rr@4ax.com> <461ceb64$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.88.78 X-Trace: newsgroups.borland.com 1176352635 69.69.88.78 (11 Apr 2007 21:37:15 -0800) Lines: 62 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail