1getddent(3BSM) Security and Auditing Library Functions getddent(3BSM)
2
3
4
6 getddent, getddnam, setddent, endddent, setddfile - get device_deallo‐
7 cate entry
8
10 cc [flag]... file... -lbsm [library]...
11
12
13 #include <bsm/devices.h>
14
15 devdealloc_t *getddent(void);
16
17
18 devdealloc_t *getddnam(char *name);
19
20
21 void setddent(void);
22
23
24 void endddent(void);
25
26
27 void setddfile(char *file);
28
29
31 The getddent() and getddnam() functions each return a device_deallocate
32 entry. The getddent() function enumerates all device_deallocate
33 entries. Successive calls to this function return either successive
34 device_deallocate entries or NULL. The getddnam() function searches for
35 a device_deallocate entry with a given device name.
36
37
38 The internal representation of a device_deallocate entry is a devdeal‐
39 loc_t structure defined in <bsm/devices.h> with the following members:
40
41 char *dd_devname; /* device allocation name */
42 char *dd_logout; /* deallocation action on user logout */
43 char *dd_boot; /* deallocation action on system boot */
44
45
46
47 The setddent() function "rewinds" to the beginning of the enumeration
48 of device_deallocate entries. Calls to getddnam() may leave the enumer‐
49 ation in an indeterminate state, so setddent() should be called before
50 the first call to getddent().
51
52
53 The endddent() function can be called to indicate that device_deallo‐
54 cate processing is complete. The library can then close any opende‐
55 vice_deallocate file, deallocate any internal storage, and so forth.
56
57
58 The setddfile() function changes the pathname used by the other func‐
59 tions for opening the device_deallocate file, allowing use of
60 device_deallocate files other than the default file, /etc/secu‐
61 rity/device_deallocate.
62
64 The getddent() function returns a pointer to a devdealloc_t if it suc‐
65 cessfully enumerates an entry. Otherwise it returns NULL, indicating
66 the end of the enumeration.
67
68
69 The getddnam() function returns a pointer to a devdealloc_t if it suc‐
70 cessfully locates the requested entry. Otherwise it returns NULL.
71
73 /etc/security/device_deallocate
74
75 Administrative file defining parameters for device deallocation.
76
77
79 See attributes(5) for descriptions of the following attributes:
80
81
82
83
84 ┌─────────────────────────────┬─────────────────────────────┐
85 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
86 ├─────────────────────────────┼─────────────────────────────┤
87 │MT-Level │Unsafe │
88 └─────────────────────────────┴─────────────────────────────┘
89
91 free(3C), attributes(5)
92
94 The getddent() and getddnam() functions allocate memory for the point‐
95 ers they return. This memory can be deallocated with the free(3C) func‐
96 tion.
97
98
99
100SunOS 5.11 11 Jan 2001 getddent(3BSM)