views:

21

answers:

0

I'm building a custom authentication subpackage for MSV1_0 for Windows 7. I've used the msvsubauth sample in from the Windows SDK and I have 2 questions regarding some problems I'm facing with that:

  1. When I'm trying just to make sure that the routine get's invoked and set the Auth0 property in the registry to my package and add a simple code at the end of the Msv1_0SubAuthenticationRoutine that creates a file:

    //
    // Cleanup up before returning.
    //
    
    
    Cleanup:
    hTestFile = CreateFile(
                  TEXT("C:\\lsa\\lsa.txt"), 
                  GENERIC_READ|GENERIC_WRITE, 0, 
                  NULL, CREATE_ALWAYS, 
                  FILE_ATTRIBUTE_NORMAL, NULL);
    
    
    if(hTestFile != INVALID_HANDLE_VALUE) {
          CloseHandle(hTestFile);
    }
    
    
    return Status;
    
    
    }  // Msv1_0SubAuthenticationRoutine
    

    Apparently the package gets invoked because when I enter my password I get an error message from windows "the parameter is incorrect" which is a good sign. But why I'm getting that error? when the exactly same code is executed from a separate .exe file it runs perfectly and creates the test text file. I've checked the permissions and set "full control" for "everyone". Any ideas? the SDK doesn't exactly mention what kind of isolation LSA is creating for code within auth packages.

  2. The second problem is testing the AP. Currently with every change I rebuild the library, copy it to a test VM and then to the System32 folder and reboot it. Is there an easier way to do that?

Thank in advance!