Answer the question
In order to leave comments, you need to log in
What is the difference between syscall setreuid in C/C++ and asm?
I came across a problem incomprehensible to my meager mind: when calling setreuid (0,0) in asm, I catch an (unclear to me) error (sk. 1), with this system call in the C ++ / C program, -1 is also returned, but when run with sudo ( skt 4) returns 0 (successful), disassembling the file shows that the registers and syscol are the same (skt 2-3), so what's the problem then, because I also run the asm file as root?
Answer the question
In order to leave comments, you need to log in
what is the problem then
nasm -static -f elf32
and ld -m elf_i386
(and then _NR_setreuid will be 70).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question