From c677f1cc4e606b7f20e9dce4b8dc03e397abcac1 Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Tue, 10 May 2011 12:19:28 +0200 Subject: [PATCH] qrexec and qfile-*: compile with -pie For full ASLR. --- appvm/Makefile | 10 +++++----- qrexec/Makefile | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/appvm/Makefile b/appvm/Makefile index 4687de65..893e9e99 100644 --- a/appvm/Makefile +++ b/appvm/Makefile @@ -1,14 +1,14 @@ CC=gcc -CFLAGS=-g -Wall -I../common +CFLAGS=-g -Wall -I../common -fPIC -pie all: dvm_file_editor qfile-agent-dvm qfile-agent qfile-unpacker dvm_file_editor: dvm_file_editor.o ../common/ioall.o - $(CC) -g -o dvm_file_editor dvm_file_editor.o ../common/ioall.o + $(CC) -pie -g -o dvm_file_editor dvm_file_editor.o ../common/ioall.o qfile-agent-dvm: qfile-agent-dvm.o ../common/ioall.o ../common/gui-fatal.o - $(CC) -g -o qfile-agent-dvm qfile-agent-dvm.o ../common/ioall.o ../common/gui-fatal.o + $(CC) -pie -g -o qfile-agent-dvm qfile-agent-dvm.o ../common/ioall.o ../common/gui-fatal.o qfile-agent: qfile-agent.o ../common/ioall.o ../common/gui-fatal.o copy_file.o - $(CC) -g -o qfile-agent qfile-agent.o ../common/ioall.o ../common/gui-fatal.o copy_file.o + $(CC) -pie -g -o qfile-agent qfile-agent.o ../common/ioall.o ../common/gui-fatal.o copy_file.o qfile-unpacker: qfile-unpacker.o ../common/ioall.o ../common/gui-fatal.o copy_file.o unpack.o - $(CC) -g -o qfile-unpacker qfile-unpacker.o ../common/ioall.o ../common/gui-fatal.o copy_file.o unpack.o + $(CC) -pie -g -o qfile-unpacker qfile-unpacker.o ../common/ioall.o ../common/gui-fatal.o copy_file.o unpack.o clean: rm -f qfile-agent-dvm qfile-agent qfile-unpacker dvm_file_editor *.o *~ diff --git a/qrexec/Makefile b/qrexec/Makefile index 6ecd0711..fc2c8fdf 100644 --- a/qrexec/Makefile +++ b/qrexec/Makefile @@ -1,14 +1,14 @@ CC=gcc -CFLAGS+=-g -Wall -I../vchan -I../common +CFLAGS+=-g -Wall -I../vchan -I../common -pie -fPIC XENLIBS=-lvchan -lu2mfn -lxenstore -lxenctrl COMMONIOALL=../common/ioall.o all: qrexec_daemon qrexec_agent qrexec_client qrexec_daemon: qrexec_daemon.o unix_server.o $(COMMONIOALL) txrx-vchan.o buffer.o write_stdin.o - $(CC) -L../vchan -L../u2mfn -g -o qrexec_daemon qrexec_daemon.o unix_server.o $(COMMONIOALL) txrx-vchan.o write_stdin.o buffer.o $(XENLIBS) + $(CC) -pie -L../vchan -L../u2mfn -g -o qrexec_daemon qrexec_daemon.o unix_server.o $(COMMONIOALL) txrx-vchan.o write_stdin.o buffer.o $(XENLIBS) qrexec_agent: qrexec_agent.o exec.o txrx-vchan.o write_stdin.o buffer.o $(COMMONIOALL) - $(CC) -L../vchan -L../u2mfn -g -o qrexec_agent qrexec_agent.o exec.o txrx-vchan.o write_stdin.o buffer.o $(COMMONIOALL) $(XENLIBS) + $(CC) -pie -L../vchan -L../u2mfn -g -o qrexec_agent qrexec_agent.o exec.o txrx-vchan.o write_stdin.o buffer.o $(COMMONIOALL) $(XENLIBS) qrexec_client: qrexec_client.o $(COMMONIOALL) exec.o - $(CC) -g -o qrexec_client qrexec_client.o $(COMMONIOALL) exec.o + $(CC) -pie -g -o qrexec_client qrexec_client.o $(COMMONIOALL) exec.o clean: rm -f *.o *~ qrexec_daemon qrexec_agent qrexec_client