Skip to content

Commit

Permalink
fix(decl/syscalls): fix linkat syscall invocation
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
Co-authored-by: Aldo Lacuku <aldo@lacuku.eu
  • Loading branch information
ekoops committed Dec 2, 2024
1 parent b168a2b commit f955834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/test/step/syscall/linkat/linkat.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (l *linkAtSyscall) run(_ context.Context) error {
oldPathPtr := unsafe.Pointer(&l.args.OldPath[0])
//nolint:gosec // System call invocation requires access to the raw pointer.
newPathPtr := unsafe.Pointer(&l.args.NewPath[0])
if _, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(l.bindOnlyArgs.OldDirFD), uintptr(oldPathPtr),
if _, _, err := unix.Syscall6(unix.SYS_LINKAT, uintptr(l.bindOnlyArgs.OldDirFD), uintptr(oldPathPtr),
uintptr(l.bindOnlyArgs.NewDirFD), uintptr(newPathPtr), uintptr(l.args.Flags), 0); err != 0 {
return err
}
Expand Down

0 comments on commit f955834

Please sign in to comment.