Skip to content

syscalls#13

Closed
talg wants to merge 4 commits intolfi-project:masterfrom
talg:syscalls
Closed

syscalls#13
talg wants to merge 4 commits intolfi-project:masterfrom
talg:syscalls

Conversation

@talg
Copy link
Collaborator

@talg talg commented Jun 12, 2025

  • added support for dup/dup3 system calls.
  • fcntl support, search for lfi tools in /opt

@zyedidia
Copy link
Member

zyedidia commented Jun 12, 2025

Looks like on the x86-64 machine the test fails with:

stdout:
expected:
fcntl F_DUPFD: original fd=3, dup fd=5
fcntl F_GETFL: fd=3 has flags=0x20001
fcntl F_GETFD: fd=3 has fd_flags=0x0
fcntl F_SETFD: fd=3 now has fd_flags=0x1
fcntl F_DUPFD_CLOEXEC correctly returned error (not supported)
fcntl test passed
got:
fcntl F_DUPFD: original fd=3, dup fd=5
fcntl F_GETFL: fd=3 has flags=0x8001
fcntl F_GETFD: fd=3 has fd_flags=0x0
fcntl F_SETFD: fd=3 now has fd_flags=0x1
fcntl F_DUPFD_CLOEXEC correctly returned error (not supported)
fcntl test passed
stderr:
exit status 1

I think this is expected behavior. Maybe the test should just use asserts and not print the file status flags since those could change depending on the host.

@talg talg closed this Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants