Re: Vista IPC using named pipes - ERROR_ACCESS_DENIED



"John Bigbooty" <BOGUSevileye0702BOGUS@xxxxxxxxxxxxxxxxxx> wrote in message
news:461a6f7a.7281421@xxxxxxxxxxxxxxxxxxxxx
The problem is when I attempt to open the pipe in the UI application,
I get ERROR_ACCESS_DENIED.

By default, when you create a pipe it is accessible only by other
applications running under the same user account. My guess is that your
service runs as local system while the application with the user interface
runs as the logged on user.

If you are willing to open up access to your pipe to all clients, you can do
something like this:

// I didn't compile this, beware or typos, etc

BYTE sd[SECURITY_DESCRIPTOR_MIN_LENGTH];
SECURITY_ATTRIBUTES sa;

sa.nLength = sizeof(sa);
sa.bInheritHandle = TRUE;
sa.lpSecurityDescriptor = &sd;

InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(&sd, TRUE, (PACL) 0, FALSE);

CreateNamedPipe(..., &sa);

Alternatively, you can restrict access to the accounts you favor.

Regards,
Will


.



Relevant Pages

  • Re: password for comp on lan
    ... >i'm using windows xp sp2..i want to restrict access to my ... >user account and cant get restrict users frm accessing my ... Steve Winograd, MS-MVP (Windows Networking) ... Please post any reply as a follow-up message in the news group ...
    (microsoft.public.windowsxp.network_web)
  • Re: Intranet Security Question
    ... No matter who is on the other end of the ... > the user account is the one I told you about. ... No changes should be made to IIS configuration at all. ...
    (microsoft.public.frontpage.programming)
  • Re: Controlling Access To Server COM Ports?
    ... Do you mean you wish to restrict access to who has the ability to use ... You can configure mapping access within the user account itself - i.e. ...
    (microsoft.public.windows.terminal_services)
  • Re: What is specific to user accounts?
    ... Hardware devices are used globally on the computer for all users. ... believe the easiest way to restrict access for a particular user account ... *There are no dumb questions, just the people that do not ask ...
    (microsoft.public.windows.vista.administration_accounts_passwords)
  • Can I restrict internet access for an individual user account?
    ... I am trying to restrict access for one user account to the internet and to MSN. ...
    (microsoft.public.windowsxp.setup_deployment)