diff options
author | JozanLeClerc <JozanLeClerc@noemail.net> | 2020-11-20 18:45:46 +0000 |
---|---|---|
committer | JozanLeClerc <JozanLeClerc@noemail.net> | 2020-11-20 18:45:46 +0000 |
commit | 615e4ee61cbabfd55fbc302e9a70c5d583e566b4 (patch) | |
tree | a0f08150ef7f8051f9cb96ccc34bad5e6b9565cb /src/c_bsdsetsid.S | |
parent | For some reason it's bad (diff) | |
download | bsdsetsid-615e4ee61cbabfd55fbc302e9a70c5d583e566b4.tar.gz bsdsetsid-615e4ee61cbabfd55fbc302e9a70c5d583e566b4.tar.bz2 bsdsetsid-615e4ee61cbabfd55fbc302e9a70c5d583e566b4.tar.xz bsdsetsid-615e4ee61cbabfd55fbc302e9a70c5d583e566b4.tar.zst bsdsetsid-615e4ee61cbabfd55fbc302e9a70c5d583e566b4.zip |
In progress
FossilOrigin-Name: c06532c4cb721b06699233c4045bf084b1c800ae
Diffstat (limited to 'src/c_bsdsetsid.S')
-rw-r--r-- | src/c_bsdsetsid.S | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/c_bsdsetsid.S b/src/c_bsdsetsid.S index 70556a5..c7061f9 100644 --- a/src/c_bsdsetsid.S +++ b/src/c_bsdsetsid.S @@ -39,7 +39,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * bsdsetsid: src/c_bsdsetsid.S - * 2020-11-20 19:30 + * 2020-11-20 19:45 * Joe * * This is the entrypoint of the program. @@ -95,10 +95,13 @@ c_parent: xor %rax, %rax movb $0x7, %al /* SYS_wait4 */ syscall - mov %rsi, %rax + movq (%rsi), %rax + and $0xff00, %rax + shr $0x8, %rax + push %rax jmp c_hex_dec c_parent_next: - mov %r10, %rdi + pop %rdi movb $0x7, %al xor %rax, %rax movb $0x1, %al /* SYS_exit */ @@ -119,8 +122,6 @@ c_child: movb $0x3b, %al /* SYS_execve */ syscall jc e_execve - test %rax, %rax - js e_execve c_exit: xor %rdi, %rdi |