1,405 views

Restrict access to process

The following code is really simple. It restricts access to the current process. In this way no other process can open the process handle and for example terminate this process.
uses
  JwaWindows,
  JwsclSecureObjects,
  JwsclDescriptor,
  JwsclToken,
  JwsclTypes,
  JwsclAcl,
  JwsclKnownSid;
var
  SD : TJwSecurityDescriptor;
  hProcess : TJwProcessHandle;
begin
  JwInitWellKnownSIDs;
  hProcess := OpenProcess(READ_CONTROL or WRITE_DAC, false, GetCurrentProcessId());
  if hProcess <> 0 [...]

1,938 views

Setting file security with JWSCL

Sometimes it is necessary to change the security settings of a file or folder for getting or denying write access. With JWSCL this task is made very easy. However there are some pitfalls to avoid.
The following code will also be available in the example section of the source code. The application gets a file or [...]

1,968 views

How to use a Security Attribute structure Part #2

This discussion continues How to use a SecurityAttribute structure.
Last time we used the SecurityAttribute parameter in CreateFile to change the security descriptor of the newly created file. However this approach did not add inherited access control elements from the parent folder. We are about to change that.
Filesystem and Registry-key inheritance is implemented since Windows 2000 [...]

628 views

Vista: integrity label

I just found this complete example project. It shows how to get the integrity label of a file/folder in Windows Vista.
Get Vista integrity label source.

Paypal donation (EUR)

Amount:
Website(Optional):

Archives

 

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031