mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-17 01:10:28 +03:00
Kernel/FUSE: Fill in uid, gid, and pid records
This commit is contained in:
parent
a343c7cde4
commit
7acc5763ed
Notes:
sideshowbarker
2024-07-16 18:06:41 +09:00
Author: https://github.com/implicitfield Commit: https://github.com/SerenityOS/serenity/commit/7acc5763ed Pull-request: https://github.com/SerenityOS/serenity/pull/24281 Reviewed-by: https://github.com/ADKaster ✅
@ -9,6 +9,7 @@
|
||||
#include <Kernel/FileSystem/FUSE/Definitions.h>
|
||||
#include <Kernel/FileSystem/OpenFileDescription.h>
|
||||
#include <Kernel/Library/KBuffer.h>
|
||||
#include <Kernel/Tasks/Process.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
@ -41,10 +42,10 @@ public:
|
||||
header->unique = unique;
|
||||
header->nodeid = nodeid;
|
||||
|
||||
// FIXME: Fill in proper values for these.
|
||||
header->uid = 0;
|
||||
header->gid = 0;
|
||||
header->pid = 1;
|
||||
auto current_process_credentials = Process::current().credentials();
|
||||
header->uid = current_process_credentials->euid().value();
|
||||
header->gid = current_process_credentials->egid().value();
|
||||
header->pid = Process::current().pid().value();
|
||||
|
||||
u8* payload = bit_cast<u8*>(request->data() + sizeof(fuse_in_header));
|
||||
memcpy(payload, request_body.data(), request_body.size());
|
||||
|
Loading…
Reference in New Issue
Block a user