Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-14015

advapi32/sec/safer.c: more implementation seems needed so XP/S03 cmd.exe can run .cmd files

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: RosDlls
    • Labels:

      Description

      CORE-6942 seems not to be enough for this case.

      In CORE-8002, hbelusca wrote

      What I know is that Windows 2000 cmd.exe can be fully used on ReactOS.
      On the contrary Windows XP/2003 cmd.exe cannot be completely used because, whenever you try to start a .bat/.cmd or .exe from within, it calls (at least) one advapi32 security function that is only stubbed in ReactOS/Wine and, certainly because it returns failure, makes Windows' cmd.exe abort launching the file.

      bootcd-0.4.7-dev-688-g361664d:

      I tried to run a .cmd file.

      Win 2000 cmd.exe:
      works fine.

      Win XP cmd.exe:
      fails, with the following debug log

      (win32ss/user/winsrv/consrv/lineinput.c:434) TODO: Expand aliases
      WARNING:  SetThreadUILanguage at dll/win32/kernel32/client/thread.c:923 is UNIMPLEMENTED!
      fixme:(dll/win32/advapi32/sec/safer.c:66) (1, 0012FB54, 0012FB50, 00000000) stub
      fixme:(dll/win32/advapi32/sec/safer.c:157) (00000042, 00000000, 0013501C, 0x1, 00000000) stub
      fixme:(dll/win32/advapi32/sec/safer.c:83) (00000042) stub
      WARNING:  SetThreadUILanguage at dll/win32/kernel32/client/thread.c:923 is UNIMPLEMENTED!
      (dll/win32/kernel32/client/console/readwrite.c:69) IntReadConsole(ExeName = CMD.EXE)
      

      Line 66 and 83 returns success.
      Line 157 returns failure.
      It is assumed the latter should be implemented further.

      (MS) SaferComputeTokenFromLevel()

      SaferComputeTokenFromLevel()

        43 SaferIdentifyLevel(
        66     FIXME("(%lu, %p, %p, %p) stub\n", dwNumProperties, pCodeProperties, pLevelHandle, pReserved);
        69     return TRUE;
       
        80 SaferCloseLevel(
        83     FIXME("(%p) stub\n", hLevelHandle);
        89     return TRUE;
       
       148 BOOL
       149 WINAPI
       150 SaferComputeTokenFromLevel(
       151     _In_ SAFER_LEVEL_HANDLE LevelHandle,
       152     _In_opt_ HANDLE InAccessToken,
       153     _Out_ PHANDLE OutAccessToken,
       154     _In_ DWORD dwFlags,
       155     _Inout_opt_ PVOID pReserved)
       156 {
       157     FIXME("(%p, %p, %p, 0x%lx, %p) stub\n", LevelHandle, InAccessToken, OutAccessToken, dwFlags, pReserved);
       158     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
       159     return FALSE;
       160 }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bug zilla Bug Zilla
                Reporter:
                Serge Gautherie Serge Gautherie
              • Votes:
                3 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: