Browse Source

Deleted old child path using embedded child

Yann Weber 1 year ago
parent
commit
3faa1cd209
3 changed files with 4 additions and 5 deletions
  1. 1
    0
      Makefile.am
  2. 1
    3
      src/asmsh.c
  3. 2
    2
      tests/tests_mmap.c

+ 1
- 0
Makefile.am View File

@@ -69,6 +69,7 @@ TO_LOCAL_CLEAN+=$(PACKAGE)_$(VERSION)-1.debian.tar.xz $(PACKAGE)_$(VERSION)-1.ds
69 69
 		$(DEB_PREF).changes \
70 70
 		$(DEB_PREF).deb \
71 71
 		$(PACKAGE)_$(VERSION).tar.gz \
72
+		$(PKGV) \
72 73
 		$(PACKAGE)-$(VERSION) \
73 74
 		$(RPM_BUILD) \
74 75
 		*.rpm

+ 1
- 3
src/asmsh.c View File

@@ -18,8 +18,6 @@
18 18
 #include <readline/readline.h>
19 19
 #include <readline/history.h>
20 20
 
21
-#define CHILD_EXEC_PATH "./child"
22
-
23 21
 #include "logger.h"
24 22
 #include "shell.h"
25 23
 #include "completion.h"
@@ -37,7 +35,7 @@ int main(int argc, char *argv[], char *envp[])
37 35
 	logger = asmsh_logger_new(ASMSH_INFO);
38 36
 	asmsh_logger_setup(logger);
39 37
 
40
-	if(asmsh_init(&sh, CHILD_EXEC_PATH))
38
+	if(asmsh_init(&sh, NULL))
41 39
 	{
42 40
 		asmsh_log_error("Unable to init shell : %s", strerror(errno));
43 41
 		asmsh_logger_dprint(2, logger);

+ 2
- 2
tests/tests_mmap.c View File

@@ -26,7 +26,7 @@ START_TEST (test_parse_line)
26 26
 		"123456-654321 ---p 00000000 0:0 0        [stack]"},
27 27
 		{{(void*)0, (void*)0x1000,
28 28
 		 PROT_READ | PROT_WRITE | PROT_EXEC | MAP_SHARED,
29
-		 1, (13<<8)+12, 123, "[stack]"},
29
+		 1, (0x13<<8)+0x12, 123, "[stack]"},
30 30
 		"0-01000 rwxs 00000001 13:12 123      [stack]"},
31 31
 		{{(void*)0x35b1800000, (void*)0x35b1820000,
32 32
 		 PROT_READ | PROT_EXEC | MAP_PRIVATE, 0x1f000, (8<<8)+2, 135522, "/usr/lib64/ld-2.15.so"},
@@ -69,7 +69,7 @@ START_TEST (test_parse_fd)
69 69
 		 PROT_READ | PROT_WRITE | MAP_SHARED, 0, 0, 0,
70 70
 		 "[heap]"},
71 71
 		{(void*)0x35b1a20000, (void*)0x35b1a21000,
72
-		 PROT_READ | PROT_WRITE | MAP_PRIVATE, 0x20000, (13<<8)+12, 135522,
72
+		 PROT_READ | PROT_WRITE | MAP_PRIVATE, 0x20000, (0x13<<8)+0x12, 135522,
73 73
 		 "/usr/lib64/ld-2.15.so"},
74 74
 		{(void*)0x35b1a21000, (void*)0x35b1a22000,
75 75
 		 PROT_READ | PROT_WRITE | MAP_PRIVATE, 0, 0, 0,

Loading…
Cancel
Save