Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Commit

Permalink
Compile su-exec dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
hackermd committed Jul 12, 2017
1 parent 25ae445 commit 8ce9681
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions tmdeploy/share/playbooks/tissuemaps/roles/common/tasks/suexec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,27 @@
- name: Clone su-exec repository
git:
repo: https://github.com/ncopa/su-exec.git
dest: /usr/local/lib/su-exec
dest: /usr/local/src/su-exec
version: v0.2

- name: Statically compile su-exec
command: cc -Wall -Werror -static -o /usr/local/sbin/su-exec su-exec.c
- name: Compile su-exec
command: make
environment:
CFLAGS: '-Wall -Werror -g -pipe -O2'
LDFLAGS: '-Wl,--as-needed'
args:
chdir: /usr/local/lib/su-exec
chdir: /usr/local/src/su-exec

- name: Install su-exec
copy:
src: /usr/local/src/su-exec/su-exec
dest: /usr/local/sbin/su-exec
owner: root
group: root
mode: 0700
remote_src: yes

- name: Remove su-exec repository
file:
path: /usr/local/lib/su-exec
path: /usr/local/src/su-exec
state: absent

0 comments on commit 8ce9681

Please sign in to comment.