1 #! /usr/bin/ksh
2 #
3 #
4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
7 # 1.0 of the CDDL.
8 #
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
12 #
13
14 # Copyright 2015, Richald Lowe.
15
16 # Verify that aslr musses things up, by comparing the mappings of 2 identical processes
17
18 LC_ALL=C # Collation is important
19
20 /usr/bin/psecflags -s aslr $$
21
22 tmpdir=/tmp/test.$$
23
24 mkdir $tmpdir
25 cd $tmpdir
26
27 cleanup() {
28 cd /
29 rm -fr $tmpdir
30 }
31
32 trap 'cleanup' EXIT
33
34 check() {
35 typeset name=$1
36 typeset command=$2
|
1 #! /usr/bin/ksh
2 #
3 #
4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
7 # 1.0 of the CDDL.
8 #
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
12 #
13
14 # Copyright 2015, Richard Lowe.
15
16 # Verify that aslr messes things up, by comparing the mappings of 2 identical
17 # processes
18
19 LC_ALL=C # Collation is important
20
21 /usr/bin/psecflags -s aslr $$
22
23 tmpdir=/tmp/test.$$
24
25 mkdir $tmpdir
26 cd $tmpdir
27
28 cleanup() {
29 cd /
30 rm -fr $tmpdir
31 }
32
33 trap 'cleanup' EXIT
34
35 check() {
36 typeset name=$1
37 typeset command=$2
|