The getddent() and getddnam() functions each return a device_deallocate entry. The getddent() function enumerates all device_deallocate entries. Successive calls to this function return
either successive device_deallocate entries or NULL. The getddnam() function searches for a device_deallocate entry with a given device name.
The internal representation of a device_deallocate entry is a devdealloc_t structure defined in <bsm/devices.h> with the following members:
|
char *dd_devname; /* device allocation name */
char *dd_logout; /* deallocation action on user logout */
char *dd_boot; /* deallocation action on system boot */
|
The setddent() function "rewinds" to the beginning of the enumeration of device_deallocate entries. Calls to getddnam() may leave the enumeration in an indeterminate state, so setddent() should be called before
the first call to getddent().
The endddent() function can be called to indicate that device_deallocate processing is complete. The library can then close any opendevice_deallocate file, deallocate any internal storage, and so forth.
The setddfile() function changes the pathname used by the other functions for opening the device_deallocate file, allowing use of device_deallocate files other than the default file, /etc/security/device_deallocate.
|