Next: fork system call
Up: Algorithms
Previous: Algorithms
  Contents
The file must be run through twice.
- Allocate memory for the hash table. The hash function is the lower part of the inode number.
- First reading : each time a NODE=... is read :
- Allocate a lids_prog_s
- Fill fields next, perm and caps with NULL
- Fill fields dev and inode with the read values.
- Place the structure in the hash tree.
- Each time a CAPS=... is read :
- Allocate a lids_caps_s
- Fill field next with NULL
- Fill fields uid, caps, mask, lids, lids_mask with the read values
- Make the structure be pointed at by the end of the current caps list.
- Each time a PERM=... is read :
- Allocate a lids_perm_s
- Fill field next with NULL
- Fill fields dev, ino, perm with the read values.
- Make the structure be pointed at by the end of the current perm list.
- Second reading : each time a NODE=... is read :
- remind the device and inode numbers
- at the first CAPS_INHERIT=..., if it is not NONE,
make the last next of the reminded program's caps's list point at the begining
of the caps list of the program which is indicated in the CAPS_INHERIT field.
- at the first PERM_INHERIT=..., if it is not NONE,
make the last next of the reminded program's perm's list point at the begining
of the perm list of the program which is indicated in the PERM_INHERIT field.
Next: fork system call
Up: Algorithms
Previous: Algorithms
  Contents
Biondi Philippe
2000-12-15