Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kernel/inc/process/process.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ typedef struct task_struct {
/// The Process Group Id of the process
pid_t pgid;
/// The Group ID (GID) of the process
pid_t rgid;
gid_t rgid;
/// The effective Group ID (GID) of the process
pid_t gid;
gid_t gid;
/// The User ID (UID) of the user owning the process.
uid_t ruid;
/// The effective User ID (UID) of the process.
Expand Down
4 changes: 2 additions & 2 deletions kernel/src/process/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static int __load_executable(const char *path, task_struct *task, uint32_t *entr
// The credentials are restored if the load fails: a failed execve must
// leave the caller exactly as it was.
uid_t saved_uid = task->uid;
pid_t saved_gid = task->gid;
gid_t saved_gid = task->gid;
start:
pr_debug("__load_executable(`%s`, %p `%s`, %p)\n", path, task, task->name, entry);
vfs_file_t *file = vfs_open(path, O_RDONLY, 0);
Expand Down Expand Up @@ -701,7 +701,7 @@ int sys_execve(pt_regs_t *f)
mm_struct_t *new_mm = NULL;
// Credentials are restored if any of the post-load steps fails.
uid_t prev_uid = current->uid;
pid_t prev_gid = current->gid;
gid_t prev_gid = current->gid;
int ret = __load_executable(filename, current, &entry, &new_mm);
if (ret <= 0) {
pr_err("Failed to load executable!\n");
Expand Down
4 changes: 0 additions & 4 deletions kernel/src/sys/utsname.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ static inline int __gethostname(char *name, size_t len)
if (!name) {
return -EFAULT;
}
// Check if len is negative.
if (len < 0) {
return -EINVAL;
}
// Open the file.
vfs_file_t *file = vfs_open("/etc/hostname", O_RDONLY, 0);
if (file == NULL) {
Expand Down
Loading