~ubuntu-branches/ubuntu/precise/policycoreutils/precise

« back to all changes in this revision

Viewing changes to newrole/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Manoj Srivastava
  • Date: 2007-04-20 10:53:23 UTC
  • mfrom: (1.2.7 upstream) (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20070420105323-zqj86zw2nr99t2bt
Tags: 2.0.7-1
* New upstream trunk release
  * Merged sepolgen and audit2allow patches to leave generated files in
    the current directory from Karl MacMillan. 
  * Merged small fix to correct include of errcodes.h in semodule_deps
    from Dan Walsh. 
  * Merged new audit2allow from Karl MacMillan. This audit2allow depends
    on the new sepolgen python module. Note that you must run the
    sepolgen-ifgen tool to generate the data needed by audit2allow to
    generate refpolicy. 

* Added build and runtime dependencies on sepolgen
* Fixed watch file to correctly reflect the fact that this is the trunk
  version. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
LOCALEDIR = /usr/share/locale
7
7
PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null)
8
8
AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
9
 
# If LOG_AUDIT_PRIV is y, then newrole will be made into setuid root program.
10
 
# This is so that we have the CAP_AUDIT_WRITE capability. newrole will
11
 
# shed all privileges and change to the user's uid.
12
 
LOG_AUDIT_PRIV ?= n
 
9
# Enable capabilities to permit newrole to generate audit records.
 
10
# This will make newrole a setuid root program.
 
11
# The capabilities used are: CAP_AUDIT_WRITE.
 
12
AUDIT_LOG_PRIV ?= n
 
13
# Enable capabilities to permit newrole to utilitize the pam_namespace module.
 
14
# This will make newrole a setuid root program.
 
15
# The capabilities used are: CAP_SYS_ADMIN, CAP_CHOWN, CAP_FOWNER and
 
16
# CAP_DAC_OVERRIDE. 
 
17
NAMESPACE_PRIV ?= n
 
18
# If LSPP_PRIV is y, then newrole will be made into setuid root program.
 
19
# Enabling this option will force AUDIT_LOG_PRIV and NAMESPACE_PRIV to be y.
 
20
LSPP_PRIV ?= n
13
21
VERSION = $(shell cat ../VERSION)
14
22
 
15
23
CFLAGS ?= -Werror -Wall -W
26
34
        override CFLAGS += -DUSE_AUDIT
27
35
        LDLIBS += -laudit
28
36
endif
29
 
ifeq (${LOG_AUDIT_PRIV},y)
30
 
        override CFLAGS += -DLOG_AUDIT_PRIV
 
37
ifeq (${LSPP_PRIV},y)
 
38
        override AUDIT_LOG_PRIV=y
 
39
        override NAMESPACE_PRIV=y
 
40
endif
 
41
ifeq (${AUDIT_LOG_PRIV},y)
 
42
        override CFLAGS += -DAUDIT_LOG_PRIV
 
43
        IS_SUID=y
 
44
endif
 
45
ifeq (${NAMESPACE_PRIV},y)
 
46
        override CFLAGS += -DNAMESPACE_PRIV
 
47
        IS_SUID=y
 
48
endif
 
49
ifeq (${IS_SUID},y)
 
50
        MODE := 4555
31
51
        LDLIBS += -lcap
32
 
        MODE := 4555
33
52
else
34
 
        MODE := 555
 
53
        MODE := 0555
35
54
endif
36
55
 
37
56
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
46
65
        install -m 644 newrole.1 $(MANDIR)/man1/
47
66
ifeq (${PAMH}, /usr/include/security/pam_appl.h)
48
67
        test -d $(ETCDIR)/pam.d || install -m 755 -d $(ETCDIR)/pam.d
 
68
ifeq (${LSPP_PRIV},y)
 
69
        install -m 644 newrole-lspp.pamd $(ETCDIR)/pam.d/newrole
 
70
else
49
71
        install -m 644 newrole.pamd $(ETCDIR)/pam.d/newrole
50
72
endif
 
73
endif
51
74
 
52
75
clean:
53
76
        rm -f $(TARGETS) *.o