fixed arguments

pull/1/head
qtkite 3 years ago
parent 0c965176e8
commit 4c99873f1d

@ -1,13 +1,11 @@
// to-do:
// write argument parser
// create cli program
// maybe make a ui for this
// make a ui for this
//
#include "dcontrol.hpp"
#include "wmic.hpp"
#include "trusted.hpp"
int main(int argc, int **argv)
int main(int argc, char **argv)
{
if (!trusted::has_admin())
{
@ -19,9 +17,10 @@ int main(int argc, int **argv)
// Because we are a primary token, we can't swap ourselves with an impersonation token.
// There will always be a need to re-create the process with the token as primary.
//
if (!trusted::is_system_group() && argc != 2)
if (!trusted::is_system_group() && argc == 1)
{
auto path = util::get_current_path();
auto pid = trusted::start_trusted();
return EXIT_SUCCESS;
}

@ -256,7 +256,9 @@ namespace trusted
//
bool create_process()
{
auto pid = start_trusted();
return true;
}
// Check current permissions for SYSTEM

Loading…
Cancel
Save