summaryrefslogtreecommitdiffstats
path: root/sys-utils/setarch.8
diff options
context:
space:
mode:
authorKarel Zak2018-08-07 11:31:14 +0200
committerKarel Zak2018-08-07 11:31:14 +0200
commit05541825553524e2ac353eb6c62c8b5ad049de24 (patch)
treec8339fa9c061732279409a110fd9d375e1abe57d /sys-utils/setarch.8
parenttests: add cal --span tests (diff)
downloadkernel-qcow2-util-linux-05541825553524e2ac353eb6c62c8b5ad049de24.tar.gz
kernel-qcow2-util-linux-05541825553524e2ac353eb6c62c8b5ad049de24.tar.xz
kernel-qcow2-util-linux-05541825553524e2ac353eb6c62c8b5ad049de24.zip
setarch: make <arch> optional
Let's allow to change personality flags without execution domain modification. Old way: setarch `arch` --addr-no-randomize myprog New way: setarch --addr-no-randomize myprog Addresses: https://github.com/karelzak/util-linux/issues/668 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/setarch.8')
-rw-r--r--sys-utils/setarch.827
1 files changed, 21 insertions, 6 deletions
diff --git a/sys-utils/setarch.8 b/sys-utils/setarch.8
index 2a701fa57..d0fd5b945 100644
--- a/sys-utils/setarch.8
+++ b/sys-utils/setarch.8
@@ -1,27 +1,36 @@
.TH SETARCH 8 "December 2017" "util-linux" "System Administration"
.SH NAME
-setarch \- change reported architecture in new program environment and set personality flags
+setarch \- change reported architecture in new program environment and/or set personality flags
.SH SYNOPSIS
.B setarch
-.I arch
+.RI [ arch ]
[options]
.RI [ program
.RI [ argument ...]]
.sp
+.B setarch
+.BR \-\-list | \-h | \-V
+.sp
.B arch
[options]
.RI [ program
.RI [ argument ...]]
-.sp
-.B setarch
-.BR \-\-list | \-h | \-V
.SH DESCRIPTION
.B setarch
-currently only affects the output of \fBuname -m\fR.
+modifies execution domains and process personality flags.
+.PP
+The execution domains currently only affects the output of \fBuname -m\fR.
For example, on an AMD64 system, running \fBsetarch i386 \fIprogram\fR
will cause \fIprogram\fR to see i686 instead of x86_64 as the machine type.
It also allows to set various personality options.
The default \fIprogram\fR is \fB/bin/sh\fR.
+.PP
+Since version 2.33 the
+.I arch
+comnand line argument is optional and
+.B setarch
+may be used to change personality flags (ADDR_LIMIT_*, SHORT_INODE, etc) without
+modification of the execution domain.
.SH OPTIONS
.TP
.B \-\-list
@@ -105,6 +114,8 @@ Display version information and exit.
.BR \-h , " \-\-help"
Display help text and exit.
.SH EXAMPLES
+setarch --addr-no-randomize mytestprog
+.br
setarch ppc32 rpmbuild --target=ppc --rebuild foo.src.rpm
.br
setarch ppc32 -v -vL3 rpmbuild --target=ppc --rebuild bar.src.rpm
@@ -118,6 +129,10 @@ Elliot Lee
.MT jnovy@redhat.com
Jindrich Novy
.ME
+.br
+.MT kzak@redhat.com
+Karel Zak
+.ME
.SH "SEE ALSO"
.BR personality (2),
.BR select (2)