Print this page
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/man/man1/pfexec.1
+++ new/usr/src/man/man1/pfexec.1
1 1 '\" te
2 2 .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
3 3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 6 .TH PFEXEC 1 "Mar 3, 2003"
7 7 .SH NAME
8 8 pfexec, pfsh, pfcsh, pfksh \- execute a command in a profile
9 9 .SH SYNOPSIS
10 10 .LP
11 11 .nf
12 12 \fB/usr/bin/pfexec\fR \fIcommand\fR
13 13 .fi
14 14
15 15 .LP
16 16 .nf
17 17 \fB/usr/bin/pfexec\fR \fB-P\fR \fIprivspec\fR \fIcommand\fR [ \fIarg\fR ]...
18 18 .fi
19 19
20 20 .LP
21 21 .nf
22 22 \fB/usr/bin/pfsh\fR [ \fIoptions\fR ] [ \fIargument\fR ]...
23 23 .fi
24 24
25 25 .LP
26 26 .nf
27 27 \fB/usr/bin/pfcsh\fR [ \fIoptions\fR ] [ \fIargument\fR ]...
28 28 .fi
29 29
30 30 .LP
31 31 .nf
32 32 \fB/usr/bin/pfksh\fR [ \fIoptions\fR ] [ \fIargument\fR ]...
33 33 .fi
34 34
35 35 .SH DESCRIPTION
36 36 .sp
37 37 .LP
38 38 The \fBpfexec\fR program is used to execute commands with the attributes
39 39 specified by the user's profiles in the \fBexec_attr\fR(4) database. It is
40 40 invoked by the profile shells, \fBpfsh\fR, \fBpfcsh\fR, and \fBpfksh\fR which
41 41 are linked to the Bourne shell, C shell, and Korn shell, respectively.
42 42 .sp
43 43 .LP
44 44 Profiles are searched in the order specified in the user's entry in the
45 45 \fBuser_attr\fR(4) database. If the same command appears in more than one
46 46 profile, the profile shell uses the first matching entry.
47 47 .sp
48 48 .LP
49 49 The second form, \fBpfexec\fR \fB-P\fR \fIprivspec\fR, allows a user to obtain
50 50 the additional privileges awarded to the user's profiles in \fBprof_attr\fR(4).
51 51 The privileges specification on the commands line is parsed using
52 52 \fBpriv_str_to_set\fR(3C). The resulting privileges are intersected with the
53 53 union of the privileges specified using the "\fBprivs\fR" keyword in
54 54 \fBprof_attr\fR(4) for all the user's profiles and added to the inheritable set
55 55 before executing the command.
56 56 .sp
57 57 .LP
58 58 For \fBpfexec\fR to function correctly, the \fBpfexecd\fR daemon must be running
59 59 in the current zone. This is normally managed by the
60 60 "\fBsvc:/system/pfexec:default\fR" SMF service (see \fBsmf\fR(5)).
61 61 .SH USAGE
62 62 .sp
63 63 .LP
64 64 \fBpfexec\fR is used to execute commands with predefined process attributes,
65 65 such as specific user or group \fBID\fRs.
66 66 .sp
67 67 .LP
68 68 Refer to the \fBsh\fR(1), \fBcsh\fR(1), and \fBksh\fR(1) man pages for complete
69 69 usage descriptions of the profile shells.
70 70 .SH EXAMPLES
71 71 .LP
72 72 \fBExample 1 \fRObtaining additional user privileges
73 73 .sp
74 74 .in +2
75 75 .nf
76 76 example% \fBpfexec -P all chown user file\fR
77 77 .fi
78 78 .in -2
79 79 .sp
80 80
81 81 .sp
82 82 .LP
83 83 This command runs \fBchown user file\fR with all privileges assigned to the
84 84 current user, not necessarily all privileges.
85 85
86 86 .SH EXIT STATUS
87 87 .sp
88 88 .LP
89 89 The following exit values are returned:
90 90 .sp
91 91 .ne 2
92 92 .na
93 93 \fB\fB0\fR \fR
94 94 .ad
95 95 .RS 6n
96 96 Successful completion.
97 97 .RE
98 98
99 99 .sp
100 100 .ne 2
101 101 .na
102 102 \fB\fB1\fR \fR
103 103 .ad
104 104 .RS 6n
105 105 An error occurred.
106 106 .RE
107 107
108 108 .SH SEE ALSO
109 109 .sp
110 110 .LP
111 111 \fBcsh\fR(1), \fBksh\fR(1), \fBprofiles\fR(1), \fBsh\fR(1), \fBexec_attr\fR(4),
112 112 \fBprof_attr\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5), \fBsmf\fR(5)
|
↓ open down ↓ |
112 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX