2 .\" Copyright 2000 by Sun Microsystems, Inc. All rights reserved.
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 .\" 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 .\" 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 .TH GETDDENT 3BSM "Jan 11, 2001"
8 getddent, getddnam, setddent, endddent, setddfile \- get device_deallocate
13 \fBcc \fR [\fIflag\fR]... \fIfile\fR... \fB-lbsm\fR [\fIlibrary\fR]...
18 #include <bsm/devices.h>
20 \fBdevdealloc_t *\fR\fBgetddent\fR(\fBvoid\fR);
25 \fBdevdealloc_t *\fR\fBgetddnam\fR(\fBchar *\fR\fIname\fR);
30 \fBvoid\fR \fBsetddent\fR(\fBvoid\fR);
35 \fBvoid\fR \fBendddent\fR(\fBvoid\fR);
40 \fBvoid\fR \fBsetddfile\fR(\fBchar *\fR\fIfile\fR);
46 The \fBgetddent()\fR and \fBgetddnam()\fR functions each return a
47 \fBdevice_deallocate\fR entry. The \fBgetddent()\fR function enumerates all
48 \fBdevice_deallocate\fR entries. Successive calls to this function return
49 either successive \fBdevice_deallocate\fR entries or \fINULL\fR. The
50 \fBgetddnam()\fR function searches for a \fBdevice_deallocate\fR entry with a
54 The internal representation of a \fBdevice_deallocate\fR entry is a
55 \fBdevdealloc_t\fR structure defined in <\fBbsm/devices.h\fR> with the
60 char *dd_devname; /* device allocation name */
61 char *dd_logout; /* deallocation action on user logout */
62 char *dd_boot; /* deallocation action on system boot */
68 The \fBsetddent()\fR function "rewinds" to the beginning of the enumeration of
69 \fBdevice_deallocate\fR entries. Calls to \fBgetddnam()\fR may leave the
70 enumeration in an indeterminate state, so \fBsetddent()\fR should be called
71 before the first call to \fBgetddent()\fR.
74 The \fBendddent()\fR function can be called to indicate that
75 \fBdevice_deallocate\fR processing is complete. The library can then close any
76 open\fBdevice_deallocate\fR file, deallocate any internal storage, and so
80 The \fBsetddfile()\fR function changes the pathname used by the other functions
81 for opening the \fBdevice_deallocate\fR file, allowing use of
82 \fBdevice_deallocate\fR files other than the default file,
83 \fB/etc/security/device_deallocate\fR.
87 The \fBgetddent()\fR function returns a pointer to a \fBdevdealloc_t\fR if it
88 successfully enumerates an entry. Otherwise it returns \fINULL\fR, indicating
89 the end of the enumeration.
92 The \fBgetddnam()\fR function returns a pointer to a \fBdevdealloc_t\fR if it
93 successfully locates the requested entry. Otherwise it returns \fINULL\fR.
98 \fB\fB/etc/security/device_deallocate\fR\fR
102 Administrative file defining parameters for device deallocation.
108 See \fBattributes\fR(5) for descriptions of the following attributes:
116 ATTRIBUTE TYPE ATTRIBUTE VALUE
124 \fBfree\fR(3C), \fBattributes\fR(5)
128 The \fBgetddent()\fR and \fBgetddnam()\fR functions allocate memory for the
129 pointers they return. This memory can be deallocated with the \fBfree\fR(3C)