aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <JozanLeClerc@noemail.net>2020-11-23 18:59:16 +0000
committerJozanLeClerc <JozanLeClerc@noemail.net>2020-11-23 18:59:16 +0000
commit43be50983b62ff4fddbcddb32e0013a69b4be6a6 (patch)
tree29eccf33fb0ae4732173c91e24f6471735f16a01
parentMinor changes (diff)
downloadbsdsetsid-43be50983b62ff4fddbcddb32e0013a69b4be6a6.tar.gz
bsdsetsid-43be50983b62ff4fddbcddb32e0013a69b4be6a6.tar.bz2
bsdsetsid-43be50983b62ff4fddbcddb32e0013a69b4be6a6.tar.xz
bsdsetsid-43be50983b62ff4fddbcddb32e0013a69b4be6a6.tar.zst
bsdsetsid-43be50983b62ff4fddbcddb32e0013a69b4be6a6.zip
In progress
FossilOrigin-Name: 2a899506793d483080dbc3b0ae762c4d98b002b6
-rw-r--r--src/c_bsdsetsid.S11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/c_bsdsetsid.S b/src/c_bsdsetsid.S
index 0d5278b..5b71669 100644
--- a/src/c_bsdsetsid.S
+++ b/src/c_bsdsetsid.S
@@ -102,7 +102,8 @@ main:
jz c_child
c_parent:
- jmp c_exit
+# jmp c_exit
+ jmp c_parent_old
c_child:
xor %rax, %rax
@@ -117,9 +118,11 @@ c_child:
mov $0x1, %rcx
mov (%rsi, %rcx, 8), %rdi
lea 0(%rsi, %rcx, 8), %rsi
- movb $0x3b, %al /* SYS_execve */
- syscall
- jc e_execve
+# movb $0x3b, %al /* SYS_execve */
+# syscall
+ callq execve
+ test %rax, %rax
+ js e_execve
c_exit:
xor %rdi, %rdi