Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getdmapnam(3bsm) [sunos man page]

getdmapent(3BSM)				      Security and Auditing Library Functions					  getdmapent(3BSM)

NAME
getdmapent, getdmapnam, getdmaptype, getdmaptdev, setdmapent, enddmapent, setdmapfile - get device_maps entry SYNOPSIS
cc [flag...] file... -lbsm [library...] #include <bsm/devices.h> devmap_t *getdmapent(void); devmap_t *getdmapnam(char *name); devmap_t *getdmapdev(char *name); devmap_t *getdmaptype(char *type); void setdmapent(void); void enddmapent(void); void setdmapfile(char *file); DESCRIPTION
The getdmapent(), getdmapnam(), getdmapdev(), and getdmaptype() functions each return a device_deallocate entry. The getdmapent() function enumerates all device_maps entries. The getdmaptype() function enumerates device_maps entries with a given device type. Successive calls to these functions return either successive device_maps entries or NULL. The getdmapnam() function searches for a device_maps entry with a given device allocation name. The getdmapdev() function searches for a device_maps entry containing a given device special file. The internal representation of a device_maps entry is a devmap_t structure defined in <bsm/devices.h> with the following members: char *dmap_devname; /* device allocation name */ char *dmap_devtype; /* generic device type */ char *dmap_devlist; /* list of associated device special files */ The setdmapent() function "rewinds" to the beginning of the enumeration of device_maps entries. Calls to getdmapnam() may leave the enumer- ation in an indeterminate state, so setdmapent() should be called before the first call to getdmapent() or getdmaptype(). The enddmapent() function can be called to indicate that device_maps processing is complete. The library can then close any open device_maps file, deallocate any internal storage, and so forth. The setdmapfile() function changes the pathname used by the other functions for opening the device_maps file, allowing use of device_maps files other than the default file, /etc/security/device_maps. RETURN VALUES
The getdmapent() and getdmaptype() functions return a pointer to a devmap_t if they successfully enumerate an entry. Otherwise they return NULL, indicating the end of the enumeration. The getdmapnam() function returns a pointer to a devmap_t if it successfully locates the requested entry. Otherwise it returns NULL. FILES
/etc/security/device_maps Administrative file defining the mapping of device special files to allocatable device names. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
allocate(1), free(3C), device_maps(4), attributes(5) NOTES
The getdmapent(), getdmapnam(), getdmapdev(), and getdmaptype() functions allocate memory for the pointers they return. This memory can be deallocated with the free(3C) function. SunOS 5.10 11 Jan 2001 getdmapent(3BSM)

Check Out this Related Man Page

dminfo(1M)						  System Administration Commands						dminfo(1M)

NAME
dminfo - report information about a device entry in a device maps file SYNOPSIS
dminfo [-v] [-a] [-f pathname] dminfo [-v] [-a] [-f pathname] -n dev -name... dminfo [-v] [-a] [-f pathname] -d dev -path... dminfo [-v] [-a] [-f pathname] -t dev -type... dminfo [-v] [-f pathname] -u dm -entry DESCRIPTION
dminfo reports and updates information about the device_maps(4) file. OPTIONS
The following options are supported -a Succeed if any of the requested entries are found. If used with -v, all entries that match the requested case(s) are printed. -d dev-path Search by dev-path. Search device_maps(4) for a device special pathname in the device_list field matching the dev-path argument. This option cannot be used with -n, -t or -u. -f pathname Use a device_maps file with pathname instead of /etc/security/device_maps. -n dev-name Search by dev-name. Search device_maps(4) for a device_name field matching dev-name. This option cannot be used with -d, -t or -u. -t dev-type Search by dev-type. Search device_maps(4) for a device_type field matching the given dev-type. This option cannot be used with -d, -n or -u. -u dm-entry Update the device_maps(4) file. This option is provided to add entries to the device_maps(4) file. The dm-entry must be a complete device_maps(4) file entry. The dm-entry has fields, as in the device_maps file. It uses the colon (:) as a field separator, and white space as the device_list subfield separators. The dm-entry is not made if any fields are missing, or if the dm-entry would be a duplicate. The default device maps file can be updated only by the super user. -v Verbose. Print the requested entry or entries, one line per entry, on the standard output. If no entries are specified, all are printed. EXIT STATUS
0 Successful completion. 1 Request failed. 2 Incorrect syntax. FILES
/etc/security/device_maps ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
bsmconv(1M), device_maps(4), attributes(5) NOTES
The functionality described in this man page is available only if the Solaris Auditing feature has been enabled. See bsmconv(1M) for more information. SunOS 5.11 16 Apr 2008 dminfo(1M)
Man Page