cd_idmap man page on Tru64

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
Tru64 logo
[printable version]

cd_idmap(3)							   cd_idmap(3)

NAME
       cd_idmap - sets or gets mappings of User and Group IDs on a CD-ROM

SYNOPSIS
       #include <sys/cdrom.h>

       int cd_idmap(
	       char *path,
	       int cmd,
	       struct cd_idmap *idmap,
	       int *nmaps );

LIBRARY
       Rock  Ridge  and	 X/Open	 Extensions  to the CDFS library (libcdrom.so,
       libcdrom.a)

PARAMETERS
       Points to the mount point of a CD-ROM  File  System.   Can  be  set  to
       either {CD_SETUMAP} or {CD_SETGMAP} to set, or {CD_GETUMAP} or {CD_GET‐
       GMAP} to get the mappings of UIDs or GIDs on  the  CD-ROM  File	System
       pointed to by *path.

	      The  variables  {CD_SETUMAP},  {CD_SETGMAP},  {CD_GETUMAP},  and
	      {CD_GETGMAP} are defined in cdfs/xcdr.h, an include file that is
	      called  into sys/cdrom.h.	 Points to the cd_idmap structure used
	      --  in  conjunction   with   the	 {CD_SETUMAP},	 {CD_SETGMAP},
	      {CD_GETUMAP},  and  {CD_GETGMAP} arguments to cmd -- to hold the
	      mappings to UIDs or GIDs.	 The cd_idmap structure is defined  in
	      cdfs/xcdr.h,  an	include	 file that is called into sys/cdrom.h.
	      Indicates the number of mappings declared in the cd_idmap struc‐
	      ture pointed to by *idmap.

	      If cmd is set to {CD_SETUMAP} or {CD_SETGMAP}, *nmaps overwrites
	      any previous values set by a prior call to cd_idmap. When *nmaps
	      is  zero,	 none  of  the	previously  set	 mappings will stay in
	      effect.

	      When calling, if cmd is set  to  {CD_GETUMAP}  or	 {CD_GETGMAP},
	      *nmaps  must  contain the maximum number of mappings that may be
	      returned; when returning, *nmaps contains	 the  number  of  map‐
	      pings.

DESCRIPTION
       The  cd_idmap()	routine sets or gets the mapping of UIDs or GIDs for a
       mounted CD-ROM.

RESTRICTIONS
       Setting values is restricted to users with the appropriate  privileges.
       Only   files  and  directories  with  an	 unrestricted  final  Extended
       Attribute Record (XAR) are subject to this mapping. The ISO 9660	 stan‐
       dard  does not permit a UID or GID of zero to appear in an unrestricted
       XAR. Consequently, mapping a zero value for a UID or  GID  may  produce
       unpredictable results. This function is intended to be used to set val‐
       ues only directly after the CD-ROM is mounted and before its files  and
       directories are accessed. Attempting to use this function to set values
       after files or directories on the CD-ROM have been accessed may produce
       unpredictable results.

RETURN VALUES
       If successful, the value zero is returned. If unsuccessful, the integer
       -1 is returned and errno is set to indicate the error.

ERRORS
       The function will fail if: Search permission is denied for a  directory
       in  *path or read permission is denied on the mount-point.  The address
       of *idmap or *path is invalid.  A signal was caught during execution of
       the function.  The argument *path points to a file or directory that is
       not within the CD-ROM file hierarchy.

	      The value of cmd or *nmaps is invalid. A member of the *idmap is
	      invalid;	for  example, from_id is larger than 65535, or a value
	      in to_uid or to_gid is not supported by the  system.  Note  that
	      this  error  will not be returned when from_id does not exist on
	      the CD-ROM, when to_uid is not defined in the User Database,  or
	      when  to_gid  is	not  in	 the  Group Database.  {OPEN_MAX} file
	      descriptors are currently open in the calling process.

	      [Tru64 UNIX]  Either the OPEN_MAX value or the per-process  soft
	      descriptor  limit	 is  checked.	The length of the *path string
	      exceeds {PATH_MAX}, or  a	 pathname  component  is  longer  than
	      {NAME_MAX}  while	 {_POSIX_NO_TRUNC}  is	in effect.  The system
	      file table is full.  A component of *path does not exist, or the
	      *path  argument  points  to an empty string.  A component of the
	      *path prefix is not a directory.	The user  does	not  have  the
	      appropriate privileges to set values.

SEE ALSO
       Files: cdfs/xcdr.h, sys/cdrom.h

								   cd_idmap(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Tru64

List of man pages available for Tru64

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net