Merge lp:~lool/ujail/misc-fixes into lp:ujail/proof-of-concept

Proposed by Loïc Minier on 2009-12-29
Status: Merged
Merged at revision: 4
Proposed branch: lp:~lool/ujail/misc-fixes
Merge into: lp:ujail/proof-of-concept
Diff against target: 72 lines (+16/-12)
4 files modified
.bzrignore (+3/-0)
Makefile (+10/-9)
proof_of_concept.c (+1/-1)
proof_of_concept_nopatch.c (+2/-2)
To merge this branch: bzr merge lp:~lool/ujail/misc-fixes
Reviewer Review Type Date Requested Status
Stephan Peijnik 2009-12-29 Approve on 2009-12-30
Review via email: mp+16644@code.launchpad.net
To post a comment you must log in.
Stephan Peijnik (speijnik) wrote :

Thanks for those fixes.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2009-12-29 15:50:28 +0000
4@@ -0,0 +1,3 @@
5+hello
6+proof_of_concept
7+proof_of_concept_nopatch
8
9=== modified file 'Makefile'
10--- Makefile 2009-12-08 09:46:47 +0000
11+++ Makefile 2009-12-29 15:50:28 +0000
12@@ -1,16 +1,17 @@
13 #!/usr/bin/make -f
14
15-OBJS=proof_of_concept.o
16-OBJS_nopatch=proof_of_concept_nopatch.o
17+# x86-64 not yet supported, but can build and run the x86 version
18+ifeq ($(shell uname -m),x86_64)
19+CFLAGS += -m32
20+endif
21+
22+CFLAGS += -Wall -Werror
23+
24 all: build
25
26-build: ${OBJS} ${OBJS_nopatch}
27- gcc -Wall -Werror -o ujail-poc ${OBJS}
28- gcc -Wall -Werror -o ujail-poc-nopatch ${OBJS_nopatch}
29- gcc -Wall -Werror -o hello hello.c
30+PROGS := proof_of_concept proof_of_concept_nopatch hello
31
32-.c.o:
33- gcc -Wall -Werror -o $@ -c $^
34+build: $(PROGS)
35
36 clean:
37- rm -f ujail-poc ujail-poc-nopatch hello ${OBJS} ${OBJS_nopatch}
38\ No newline at end of file
39+ rm -f $(PROGS)
40
41=== modified file 'proof_of_concept.c'
42--- proof_of_concept.c 2009-12-07 16:16:56 +0000
43+++ proof_of_concept.c 2009-12-29 15:50:28 +0000
44@@ -40,7 +40,7 @@
45 long patch_data = 0x01b80cd;
46 long backup;
47
48- printf("test.c starting...\n");
49+ printf(__FILE__ " starting...\n");
50 child_pid = fork();
51
52 if (child_pid == 0) {
53
54=== modified file 'proof_of_concept_nopatch.c'
55--- proof_of_concept_nopatch.c 2009-12-08 09:46:47 +0000
56+++ proof_of_concept_nopatch.c 2009-12-29 15:50:28 +0000
57@@ -1,5 +1,5 @@
58 /*
59- * proof_of_concept.c
60+ * proof_of_concept_nopatch.c
61 *
62 * Copyright (C) 2009 Stephan Peijnik <debian at sp dot or dot at>
63 *
64@@ -39,7 +39,7 @@
65 /* patch data: x86 opcodes for int $0x80 */
66 int int_ins_size = 2;
67
68- printf("test.c starting...\n");
69+ printf(__FILE__ " starting...\n");
70 child_pid = fork();
71
72 if (child_pid == 0) {

Subscribers

People subscribed via source and target branches

to all changes: