summaryrefslogtreecommitdiffhomepage
path: root/dev/base
diff options
context:
space:
mode:
authorAmlal <amlal@el-mahrouss-logic.com>2024-09-25 08:26:08 +0200
committerAmlal <amlal@el-mahrouss-logic.com>2024-09-25 08:26:08 +0200
commitdaa4f8c748d290feba8a71e889743a8a3097ad7d (patch)
tree4b4869dbe3ec5f7c1d78c3d88241db96d006a445 /dev/base
parent8f62fbe30655e4d18837f196f01bb203126f474f (diff)
Refactor codebase: Move Objects to obj/, fix flags, remove .vscode, add syscalls
- Refactored Objects directory to obj/ for better organization. - Fixed incorrect flags in the build process. - Removed .vscode folder to clean up unnecessary IDE settings. - Added syscall implementations for enhanced functionality. Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev/base')
-rw-r--r--dev/base/EncryptFS/EncryptFS.hxx22
-rw-r--r--dev/base/EncryptFS/ReadMe.md8
-rw-r--r--dev/base/EncryptFS/build.json2
-rw-r--r--dev/base/EncryptFS/disk_crypt.hxx28
-rw-r--r--dev/base/EncryptFS/source_deploy.xml5
-rw-r--r--dev/base/EncryptFS/src/EncryptBlock.cxx14
-rw-r--r--dev/base/EncryptFS/src/Key.cxx12
-rw-r--r--dev/base/EncryptFS/src/disk_crypt.cxx14
-rw-r--r--dev/base/ReadMe.md2
-rw-r--r--dev/base/RunDLL64/build.json2
-rw-r--r--dev/base/RunDLL64/src/dll.cxx (renamed from dev/base/RunDLL64/src/LauncherMain.cxx)2
-rw-r--r--dev/base/RunXPCOM/build.json2
-rw-r--r--dev/base/RunXPCOM/src/xpcom.cxx (renamed from dev/base/RunXPCOM/src/LauncherMain.cxx)2
13 files changed, 56 insertions, 59 deletions
diff --git a/dev/base/EncryptFS/EncryptFS.hxx b/dev/base/EncryptFS/EncryptFS.hxx
deleted file mode 100644
index 368df9ae..00000000
--- a/dev/base/EncryptFS/EncryptFS.hxx
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -------------------------------------------
-
- Copyright ZKA Technologies.
-
- File: Encrypt.hxx
- Purpose: Encrypted File System
-
- Revision History:
-
- 8/8/2024: Added file (amlel)
-
-------------------------------------------- */
-
-#pragma once
-
-#include <FSKit/NeFS.hxx>
-
-namespace EncryptFS
-{
- using namespace Kernel;
-
-} \ No newline at end of file
diff --git a/dev/base/EncryptFS/ReadMe.md b/dev/base/EncryptFS/ReadMe.md
index 69968538..e84670cc 100644
--- a/dev/base/EncryptFS/ReadMe.md
+++ b/dev/base/EncryptFS/ReadMe.md
@@ -1,5 +1,11 @@
# ZKA Encrypted File System.
-This is ZKA's Encrypted file system DLL.
+### Purpose:
+
+This is ZKA's Encrypted File System DLL.
+
+### Building:
+
+`btb build.json`
###### (c) ZKA Technologies, all rights reserved.
diff --git a/dev/base/EncryptFS/build.json b/dev/base/EncryptFS/build.json
index efb86ab3..3b41b059 100644
--- a/dev/base/EncryptFS/build.json
+++ b/dev/base/EncryptFS/build.json
@@ -3,7 +3,7 @@
"compiler_std": "c++20",
"headers_path": ["../", "./"],
"sources_path": ["src/*.cxx"],
- "output_name": "encryptfs.dll",
+ "output_name": "efs.sys",
"compiler_flags": [
"-ffreestanding",
"-shared",
diff --git a/dev/base/EncryptFS/disk_crypt.hxx b/dev/base/EncryptFS/disk_crypt.hxx
new file mode 100644
index 00000000..0b80a930
--- /dev/null
+++ b/dev/base/EncryptFS/disk_crypt.hxx
@@ -0,0 +1,28 @@
+/* -------------------------------------------
+
+ Copyright ZKA Technologies.
+
+ File: Encrypt.hxx
+ Purpose: Encrypted File System
+
+ Revision History:
+
+ 8/8/2024: Added file (amlel)
+
+------------------------------------------- */
+
+#pragma once
+
+#include <FSKit/NeFS.hxx>
+
+/**************************************** */
+/// @brief Locks an EFS partition.
+/**************************************** */
+
+Kernel::Int32 efs_lock_partition(Kernel::Char* partition_name, Kernel::Char* password, Kernel::Size length);
+
+/**************************************** */
+/// @brief Unlocks an EFS partition.
+/**************************************** */
+
+Kernel::Int32 efs_unlock_partition(Kernel::Char* partition_name, Kernel::Char* password, Kernel::Size length);
diff --git a/dev/base/EncryptFS/source_deploy.xml b/dev/base/EncryptFS/source_deploy.xml
deleted file mode 100644
index 01bd14cd..00000000
--- a/dev/base/EncryptFS/source_deploy.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<SourceDeploy>
-<HiddenFiles>
- <SourceFile>src/*.cxx</SourceFile>
-</HiddenFiles>
-</SourceDeploy>
diff --git a/dev/base/EncryptFS/src/EncryptBlock.cxx b/dev/base/EncryptFS/src/EncryptBlock.cxx
deleted file mode 100644
index b3f2fc56..00000000
--- a/dev/base/EncryptFS/src/EncryptBlock.cxx
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -------------------------------------------
-
- Copyright ZKA Technologies.
-
-------------------------------------------- */
-
-#include <cstddef>
-#include <cstdint>
-
-enum
-{
- eEFSFlagEncrypted = 0x3f,
- eEFSFlagEncryptedEPM = 0xf3,
-};
diff --git a/dev/base/EncryptFS/src/Key.cxx b/dev/base/EncryptFS/src/Key.cxx
deleted file mode 100644
index 166d04b3..00000000
--- a/dev/base/EncryptFS/src/Key.cxx
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -------------------------------------------
-
- Copyright ZKA Technologies.
-
-------------------------------------------- */
-
-#include <new>
-#include <cstddef>
-#include <cstdint>
-
-typedef int32_t efs_encrypt_token_t;
-typedef void* efs_encrypted_blob_t;
diff --git a/dev/base/EncryptFS/src/disk_crypt.cxx b/dev/base/EncryptFS/src/disk_crypt.cxx
new file mode 100644
index 00000000..e8d64bfe
--- /dev/null
+++ b/dev/base/EncryptFS/src/disk_crypt.cxx
@@ -0,0 +1,14 @@
+/* -------------------------------------------
+
+ Copyright ZKA Technologies.
+
+------------------------------------------- */
+
+#include <base/EncryptFS/disk_crypt.hxx>
+
+enum
+{
+ eEFSFlagEncryptedFree = 0x00,
+ eEFSFlagEncryptedUnlock = 0x3f,
+ eEFSFlagEncryptedLock = 0xf3,
+};
diff --git a/dev/base/ReadMe.md b/dev/base/ReadMe.md
index df73d757..46443aea 100644
--- a/dev/base/ReadMe.md
+++ b/dev/base/ReadMe.md
@@ -1,5 +1,7 @@
# ZKA User DLLs/Programs.
+## Description:
+
- Used to provide features to a program from the sci.dll.
###### Copyright ZKA Technologies, all rights reserved.
diff --git a/dev/base/RunDLL64/build.json b/dev/base/RunDLL64/build.json
index a69dbb11..c53373a9 100644
--- a/dev/base/RunDLL64/build.json
+++ b/dev/base/RunDLL64/build.json
@@ -8,7 +8,7 @@
"-ffreestanding",
"-fno-rtti",
"-fno-exceptions",
- " -Wl,--subsystem=17"
+ "-Wl,--subsystem=17"
],
"cpp_macros": [
"__RUNDLL_AMD64__",
diff --git a/dev/base/RunDLL64/src/LauncherMain.cxx b/dev/base/RunDLL64/src/dll.cxx
index ed1ab65c..560a404d 100644
--- a/dev/base/RunDLL64/src/LauncherMain.cxx
+++ b/dev/base/RunDLL64/src/dll.cxx
@@ -2,7 +2,7 @@
typedef int (*MainKind)(int, char**);
-int WinMain(int argc, char* argv[])
+int main(int argc, char* argv[])
{
if (argc < 3)
return -1;
diff --git a/dev/base/RunXPCOM/build.json b/dev/base/RunXPCOM/build.json
index a932d733..45d249b8 100644
--- a/dev/base/RunXPCOM/build.json
+++ b/dev/base/RunXPCOM/build.json
@@ -8,7 +8,7 @@
"-ffreestanding",
"-fno-rtti",
"-fno-exceptions",
- " -Wl,--subsystem=17"
+ "-Wl,--subsystem=17"
],
"cpp_macros": [
"__SCM_AMD64__",
diff --git a/dev/base/RunXPCOM/src/LauncherMain.cxx b/dev/base/RunXPCOM/src/xpcom.cxx
index b6047435..9536b070 100644
--- a/dev/base/RunXPCOM/src/LauncherMain.cxx
+++ b/dev/base/RunXPCOM/src/xpcom.cxx
@@ -5,7 +5,7 @@ typedef SInt32 (*RPCProcKind)(IUnknown*);
/**
* @brief Main procedure for DLL runner.
*/
-int WinMain(int argc, char* argv[])
+int main(int argc, char* argv[])
{
if (argc < 4)
return -1;