| 824 | } |
| 825 | |
| 826 | BOOL Ext2StartPipeSrv() |
| 827 | { |
| 828 | HMODULE hAdvapi32; |
| 829 | BOOL rc = FALSE; |
| 830 | |
| 831 | if (CanDoLocalMount()) { |
| 832 | return TRUE; |
| 833 | } |
| 834 | |
| 835 | /* query advapi32!CreateProcessWithToken */ |
| 836 | hAdvapi32 = GetModuleHandle("Advapi32.DLL"); |
| 837 | g_CreateProcessWithTokenW = (lpfnCreateProcessWithTokenW) |
| 838 | GetProcAddress(hAdvapi32, "CreateProcessWithTokenW"); |
| 839 | |
| 840 | if (!g_CreateProcessWithTokenW) { |
| 841 | rc = FALSE; |
| 842 | goto errorout; |
| 843 | } |
| 844 | |
| 845 | /* add more privilege for toke duplication */ |
| 846 | Ext2EnablePrivilege(SE_INCREASE_QUOTA_NAME); |
| 847 | Ext2EnablePrivilege(SE_TCB_NAME); |
| 848 | |
| 849 | /* start Ext2Srv.exe */ |
| 850 | rc = Ext2StartSrv(); |
| 851 | |
| 852 | errorout: |
| 853 | |
| 854 | return rc; |
| 855 | } |
| 856 | |
| 857 | VOID Ext2StopPipeSrv() |
| 858 | { |
nothing calls this directly
no test coverage detected