home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / ixemul-39.47-env-bin.lha / man / cat3 / strmode.0 < prev    next >
Text File  |  1993-12-07  |  4KB  |  133 lines

  1.  
  2. STRMODE(3)                 UNIX Programmer's Manual                 STRMODE(3)
  3.  
  4. NNAAMMEE
  5.      ssttrrmmooddee - convert inode status information into a symbolic string
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ssttrriinngg..hh>>
  9.  
  10.      _v_o_i_d
  11.      ssttrrmmooddee(_m_o_d_e___t _m_o_d_e, _c_h_a_r _*_b_p)
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.      The ssttrrmmooddee() function converts a file _m_o_d_e (the type and permission in­
  15.      formation associated with an inode, see stat(2))  into a symbolic string
  16.      which is stored in the location referenced by _b_p. This stored string is
  17.      eleven characters in length plus a trailing NULL.
  18.  
  19.      The first character is the inode type, and will be one of the following:
  20.  
  21.            -     regular file
  22.            b     block special
  23.            c     character special
  24.            d     directory
  25.            l     symbolic link
  26.            p     fifo
  27.            s     socket
  28.            ?     unknown inode type
  29.  
  30.      The next nine characters encode three sets of permissions, in three char­
  31.      acters each.  The first three characters are the permissions for the own­
  32.      er of the file, the second three for the group the file belongs to, and
  33.      the third for the ``other'', or default, set of users.
  34.  
  35.      Permission checking is done as specifically as possible.  If read permis­
  36.      sion is denied to the owner of a file in the first set of permssions, the
  37.      owner of the file will not be able to read the file.  This is true even
  38.      if the owner is in the file's group and the group permissions allow read­
  39.      ing or the ``other'' permissions allow reading.
  40.  
  41.      If the first character of the three character set is an ``r'', the file
  42.      is readable for that set of users; if a dash ``-'', it is not readable.
  43.  
  44.      If the second character of the three character set is a ``w'', the file
  45.      is writable for that set of users; if a dash ``-'', it is not writable.
  46.  
  47.      The third character is the first of the following characters that apply:
  48.  
  49.      S     If the character is part of the owner permissions and the file is
  50.            not executable or the directory is not searchable, by the owner,
  51.            and the set­user­id bit is set.
  52.  
  53.      S     If the character is part of the group permissions and the file is
  54.            not executable or the directory is not searchable, by the group,
  55.            and the set­group­id bit is set.
  56.  
  57.      T     If the character is part of the other permissions and the file is
  58.            not executable or the directory is not searchable, by others, and
  59.            the ``sticky'' (S_ISVTX) bit is set.
  60.  
  61.      s     If the character is part of the owner permissions and the file is
  62.            executable or the directory searchable, by the owner, and the set­
  63.            user­id bit is set.
  64.  
  65.      s     If the character is part of the group permissions and the file is
  66.            executable or the directory searchable, by the group, and the set­
  67.            group­id bit is set.
  68.  
  69.      t     If the character is part of the other permissions and the file is
  70.            executable or the directory searchable, by others, and the
  71.            ``sticky'' (S_ISVTX) bit is set.
  72.  
  73.      x     The file is executable or the directory is searchable.
  74.  
  75.      -     None of the above apply.
  76.  
  77.      The last character is a plus sign ``+'' if any there are any alternate or
  78.      additional access control methods associated with the inode, otherwise it
  79.      will be a space.
  80.  
  81. RREETTUURRNN VVAALLUUEESS
  82.      The ssttrrmmooddee() function always returns 0.
  83.  
  84. SSEEEE AALLSSOO
  85.      chmod(1),  find(1),  stat(2),  getmode(3),  setmode(3)
  86.  
  87. HHIISSTTOORRYY
  88.      The ssttrrmmooddee() function currently under development.
  89.  
  90. BSD Experimental                 July 31, 1991                               2
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.