summaryrefslogtreecommitdiffhomepage
path: root/public/tools/mgmt.oe/src/CommandLine.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-07-31 15:10:21 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-07-31 15:12:00 +0100
commitf05aa7d8e5a9668b27e43c8bd2718482caa0b59e (patch)
treebded1a1ee2ae6370c18a1390eaa9f253d6577f41 /public/tools/mgmt.oe/src/CommandLine.cc
parent43ace5813967229e03ac46cc00ea8ebf1a607740 (diff)
feat: mgmt.oe: openenclave management tool. (wip)
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'public/tools/mgmt.oe/src/CommandLine.cc')
-rw-r--r--public/tools/mgmt.oe/src/CommandLine.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/public/tools/mgmt.oe/src/CommandLine.cc b/public/tools/mgmt.oe/src/CommandLine.cc
new file mode 100644
index 00000000..3e8de78b
--- /dev/null
+++ b/public/tools/mgmt.oe/src/CommandLine.cc
@@ -0,0 +1,29 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <libSystem/SystemKit/Jail.h>
+#include <libSystem/SystemKit/System.h>
+
+/// @author Amlal El Mahrouss
+/// @brief OpenEnclave management tool
+
+static JAIL* kJailSrv = nullptr;
+
+SInt32 _NeMain(SInt32 argc, Char* argv[]) {
+ LIBSYS_UNUSED(argc);
+ LIBSYS_UNUSED(argv);
+
+ kJailSrv = JailGetCurrent();
+
+ MUST_PASS(kJailSrv);
+
+ PrintOut(nullptr, "%s", "mgmt.oe - OpenEnclave Management Tool.");
+
+ /// @note JailGetCurrent returns client as nullptr if we're not that client (we'll not be able to access the jail then)
+ if (kJailSrv->fClient == nullptr) return EXIT_FAILURE;
+
+ return EXIT_FAILURE;
+} \ No newline at end of file