Skip to content

Commit

Permalink
LibC: Remove a few comments now that we have man pages for this.
Browse files Browse the repository at this point in the history
  • Loading branch information
nico authored and awesomekling committed Jul 3, 2020
1 parent 1f32307 commit cbbd55b
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions Kernel/Process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2149,8 +2149,6 @@ int Process::sys$seteuid(uid_t euid)
{
REQUIRE_PROMISE(id);

// This has FreeBSD semantics.
// Linux and Solaris also allow m_euid.
if (euid != m_uid && euid != m_suid && !is_superuser())
return -EPERM;

Expand All @@ -2162,8 +2160,6 @@ int Process::sys$setegid(gid_t egid)
{
REQUIRE_PROMISE(id);

// This has FreeBSD semantics.
// Linux and Solaris also allow m_egid.
if (egid != m_gid && egid != m_sgid && !is_superuser())
return -EPERM;

Expand All @@ -2175,13 +2171,9 @@ int Process::sys$setuid(uid_t uid)
{
REQUIRE_PROMISE(id);

// Linux and Solaris require real or saved.
// FreeBSD requires real or effective.
if (uid != m_uid && uid != m_euid && !is_superuser())
return -EPERM;

// Solaris and Linux only set uid and suid if is_superuser(),
// FreeBSD always sets all 3.
m_uid = uid;
m_euid = uid;
m_suid = uid;
Expand All @@ -2192,13 +2184,9 @@ int Process::sys$setgid(gid_t gid)
{
REQUIRE_PROMISE(id);

// Linux and Solaris require real or saved.
// FreeBSD requires real or effective.
if (gid != m_gid && gid != m_egid && !is_superuser())
return -EPERM;

// Solaris and Linux only set uid and suid if is_superuser(),
// FreeBSD always sets all 3.
m_gid = gid;
m_egid = gid;
m_sgid = gid;
Expand Down

0 comments on commit cbbd55b

Please sign in to comment.