Skip to content

Commit

Permalink
Challenge: Fix VM build
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorNelson committed Sep 9, 2024
1 parent b06852c commit 9e4d2f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion challenge/vm/vm
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ def debug():


def build(path):
os.setuid(os.geteuid())
ruid, euid, suid = os.getresuid()
os.seteuid(ruid)

with open(path, "r") as f:
src = f.read()
Expand All @@ -229,6 +230,7 @@ def build(path):

subprocess.run(["make", "-C", workdir], stdout=sys.stderr, check=True)

os.seteuid(euid)
shutil.copy(f"{workdir}/debug.ko", "/challenge/debug.ko")


Expand Down

0 comments on commit 9e4d2f7

Please sign in to comment.