Print this page
OS-5440 pfexec and the case of the missing error message
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
| 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
|
↓ open down ↓ |
45 lines elided |
↑ open up ↑ |
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 +.sp
57 +.LP
58 +For \fBpfexec\fR to function correctly, the \fBpfexecd\fR daemon must be running
59 +in the current zone. This is normally managed by the
60 +"\fBsvc:/system/pfexec:default\fR" SMF service (see \fBsmf\fR(5)).
56 61 .SH USAGE
57 62 .sp
58 63 .LP
59 64 \fBpfexec\fR is used to execute commands with predefined process attributes,
60 65 such as specific user or group \fBID\fRs.
61 66 .sp
62 67 .LP
63 68 Refer to the \fBsh\fR(1), \fBcsh\fR(1), and \fBksh\fR(1) man pages for complete
64 69 usage descriptions of the profile shells.
65 70 .SH EXAMPLES
66 71 .LP
67 72 \fBExample 1 \fRObtaining additional user privileges
68 73 .sp
69 74 .in +2
70 75 .nf
71 76 example% \fBpfexec -P all chown user file\fR
72 77 .fi
73 78 .in -2
74 79 .sp
75 80
76 81 .sp
77 82 .LP
78 83 This command runs \fBchown user file\fR with all privileges assigned to the
79 84 current user, not necessarily all privileges.
80 85
81 86 .SH EXIT STATUS
82 87 .sp
83 88 .LP
84 89 The following exit values are returned:
85 90 .sp
86 91 .ne 2
87 92 .na
88 93 \fB\fB0\fR \fR
89 94 .ad
90 95 .RS 6n
91 96 Successful completion.
92 97 .RE
93 98
94 99 .sp
95 100 .ne 2
96 101 .na
|
↓ open down ↓ |
31 lines elided |
↑ open up ↑ |
97 102 \fB\fB1\fR \fR
98 103 .ad
99 104 .RS 6n
100 105 An error occurred.
101 106 .RE
102 107
103 108 .SH SEE ALSO
104 109 .sp
105 110 .LP
106 111 \fBcsh\fR(1), \fBksh\fR(1), \fBprofiles\fR(1), \fBsh\fR(1), \fBexec_attr\fR(4),
107 -\fBprof_attr\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5)
112 +\fBprof_attr\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5), \fBsmf\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX