summaryrefslogtreecommitdiff
path: root/usr/src/man/man1m/update_drv.1m
blob: e4070bbde17175835e9d01b19a65b6272c101bab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
'\" te
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
.\" 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.
.\" 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.
.\" 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]
.TH UPDATE_DRV 1M "Feb 10, 2009"
.SH NAME
update_drv \- modify device driver attributes
.SH SYNOPSIS
.LP
.nf
\fBupdate_drv\fR [\fB-f\fR | \fB-v\fR] [\fB-n\fR] \fIdriver_module\fR
.fi

.LP
.nf
\fBupdate_drv\fR [\fB-b\fR \fIbasedir\fR] [\fB-f\fR | \fB-v\fR] [\fB-n\fR] \fB-a\fR [\fB-m\fR '\fIpermission\fR']
     [\fB-i\fR '\fIidentify-name\fR'] [\fB-P\fR '\fIprivilege\fR'] [\fB-p\fR '\fIpolicy\fR'] \fIdriver_module\fR
.fi

.LP
.nf
\fBupdate_drv\fR [\fB-b\fR \fIbasedir\fR] [\fB-f\fR | \fB-v\fR] [\fB-n\fR] \fB-d\fR [\fB-m\fR '\fIpermission\fR']
     [\fB-i\fR '\fIidentify-name\fR'] [\fB-P\fR '\fIprivilege\fR'] [\fB-p\fR '\fIpolicy\fR'] \fIdriver_module\fR
.fi

.SH DESCRIPTION
.sp
.LP
The \fBupdate_drv\fR command informs the system about attribute changes to an
installed device driver. It can be used to re-read the \fBdriver.conf\fR(4)
file, or to add, modify, or delete a driver's minor node permissions or
aliases.
.sp
.LP
Without options, \fBupdate_drv\fR reloads the \fBdriver.conf\fR file.
.sp
.LP
Upon successfully updating the aliases, the driver binding takes effect upon
reconfig boot or hotplug of the device.
.sp
.LP
Upon successfully updating the permissions, only the new driver minor nodes get
created with the modified set of file permissions. Existing driver minor nodes
do not get modified.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.sp .6
.RS 4n
Add a \fIpermission\fR, \fIaliases\fR, \fIprivilege\fR or \fIpolicy\fR entry.
.sp
With the \fB-a\fR option specified, a permission entry (using the \fB-m\fR
option), or a driver's aliases entry (using the \fB-i\fR option), a device
privilege (using the \fB-P\fR option) or a a device policy (using the \fB-p\fR
option), can be added or updated. If a matching minor node permissions entry is
encountered (having the same driver name and the minor node), it is replaced.
If a matching aliases entry is encountered (having a different driver name and
the same alias), an error is reported.
.sp
The \fB-a\fR and \fB-d\fR options are mutually exclusive.
.RE

.sp
.ne 2
.na
\fB\fB-b\fR \fIbasedir\fR\fR
.ad
.sp .6
.RS 4n
Installs or modifies the driver on the system with a root directory of basedir
rather than installing on the system executing \fBupdate_drv\fR.
.LP
Note -
.sp
.RS 2
The root file system of any non-global zones must not be referenced with the
\fB-b\fR option. Doing so might damage the global zone's file system, might
compromise the security of the global zone, and might damage the non-global
zone's file system. See \fBzones\fR(5).
.RE
.RE

.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.sp .6
.RS 4n
Delete a \fIpermission\fR, \fIaliases\fR, \fIprivilege\fR or \fIpolicy\fR
entry.
.sp
The \fB-m\fR \fIpermission\fR, \fB-i\fR \fIidentify-name\fR, \fB-P\fR
\fIprivilege\fR or the \fB-p\fR \fIpolicy\fR option needs to be specified with
the \fB-d\fR option.
.sp
The \fB-d\fR and \fB-a\fR options are mutually exclusive.
.sp
If the entry doesn't exist \fBupdate_drv\fR returns an error.
.RE

.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.sp .6
.RS 4n
Force the system to reread the \fBdriver.conf\fR file even if the driver module
cannot be unloaded. See \fBNOTES\fR section for details.
.sp
\fBWithout\fR this option, when removing an alias for a driver,
\fBupdate_drv\fR updates the binding files for the next boot, but returns an
error if one or more devices that reference the driver-alias binding remains.
\fBWith\fR the \fB-f\fR option, \fBupdate_drv\fR does not return an error if
such devices remain.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR '\fIidentify-name\fR'\fR
.ad
.sp .6
.RS 4n
A white-space separated list of aliases for the driver. If \fB-a\fR or \fB-d\fR
option is not specified then this option is ignored. The \fIidentify-name\fR
string is mandatory. If all aliases need to be removed, \fBrem_drv\fR(1M) is
recommended.
.RE

.sp
.ne 2
.na
\fB\fB-m\fR '\fIpermission\fR'\fR
.ad
.sp .6
.RS 4n
Specify a white-space separated list of file system permissions for the device
node of the device driver. If \fB-a\fR or \fB-d\fR option is not specified
then, this option is ignored. The permission string is mandatory.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.sp .6
.RS 4n
Do not try to load and attach \fIdevice_driver\fR, just modify the system
configuration files for that driver.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR '\fIpolicy\fR'\fR
.ad
.sp .6
.RS 4n
With the \fB-a\fR option, policy is a white-space separated list of complete
device policies. For the \fB-d\fR option, policy is a white space separated
list of minor device specifications. The minor device specifications are
matched exactly against the entries in \fB/etc/security/device_policy\fR, that
is., no wildcard matching is performed.
.RE

.sp
.ne 2
.na
\fB\fB-P\fR '\fIprivilege\fR'\fR
.ad
.sp .6
.RS 4n
With the \fB-a\fR option, privilege is a comma separated list of additional
driver privileges. For the \fB-d\fR option, privilege is a single privilege.
The privileges are added to or removed from the \fB/etc/security/extra_privs\fR
file.
.RE

.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.sp .6
.RS 4n
Verbose.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRAdding or Modifying an Existing Minor Permissions Entry
.sp
.LP
The following command adds or modifies the exisitng minor permissions entry of
the \fBclone\fR driver:

.sp
.in +2
.nf
example# update_drv -a -m 'llc1 777 joe staff' clone
.fi
.in -2
.sp

.LP
\fBExample 2 \fRRemoving All Minor Permissions Entries
.sp
.LP
The following command removes all minor permission entries of the \fBusbprn\fR
driver, the USB printer driver:

.sp
.in +2
.nf
example# update_drv -d -m '* 0666 root sys' usbprn
.fi
.in -2
.sp

.LP
\fBExample 3 \fRAdding a Driver Aliases Entry
.sp
.LP
The following command adds a driver aliases entry of the \fBugen\fR driver with
the identity string of \fBusb459,20\fR:

.sp
.in +2
.nf
example# update_drv -a -i '"usb459,20"' ugen
.fi
.in -2
.sp

.LP
\fBExample 4 \fRRe-reading the \fBdriver.conf\fR File For the \fBohci\fR Driver
.sp
.LP
The following command re-reads the \fBdriver.conf\fR(4) file.

.sp
.in +2
.nf
 example# update_drv ohci
.fi
.in -2
.sp

.LP
\fBExample 5 \fRRequiring a Self-defined Privilege to Open a tcp Socket
.sp
.LP
The following command requires a self-defined privilege to open a tcp socket:

.sp
.in +2
.nf
example#   update_drv -a -P net_tcp -p \e
     'write_priv_set=net_tcp read_priv_set=net_tcp' tcp
.fi
.in -2
.sp

.LP
\fBExample 6 \fREstablishing a Path-oriented Alias
.sp
.LP
The following command establishes a path-oriented alias to force a specific
driver, \fBqlt\fR, to be used for a particular device path:

.sp
.in +2
.nf
example#   update_drv -a -i '"/pci@8,600000/SUNW,qlc@4"' qlt
.fi
.in -2
.sp

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.sp .6
.RS 4n
Successful completion.
.RE

.sp
.ne 2
.na
\fB>\fB0\fR\fR
.ad
.sp .6
.RS 4n
An error occurred.
.RE

.SH SEE ALSO
.sp
.LP
\fBadd_drv\fR(1M), \fBmodunload\fR(1M), \fBrem_drv\fR(1M),
\fBdriver.conf\fR(4), \fBattributes\fR(5), \fBprivileges\fR(5)
.SH NOTES
.sp
.LP
If \fB-a\fR or \fB-d\fR options are specified, \fBupdate_drv\fR does not reread
the \fBdriver.conf\fR file.
.sp
.LP
A forced update of the \fBdriver.conf\fR file reloads the \fBdriver.conf\fR
file without reloading the driver binary module. In this case, devices which
cannot be detached reference driver global properties from the old
\fBdriver.conf\fR file, while the remaining driver instances reference global
properties in the new \fBdriver.conf\fR file.
.sp
.LP
It is possible to add an alias , which changes the driver binding of a device
already being managed by a different driver. A force update with the \fB-a\fR
option tries to bind to the new driver and report error if it cannot. If you
specify more than one of the \fB-m\fR, \fB-i\fR, \fB-P\fR or \fB-p\fR options,
a force flag tries to modify aliases or permissions. This is done even if the
other operation fails and vice-versa.