.th K_link II 4/21/86
.sh NAME
K_link - increment file link count
.sh "MODULA SYNOPSIS"
.nh
.na
 CONST fSeid: seid;
.br
 VAR stat: K_err_num;
.br
 . . .
.br
 stat := NK_link(fSeid);
.br
.hy
.ad
.sp
.sh "C SYNOPSIS"
.nh
.na
 seid fSeid;
.br
 int stat;
.br
 . . .
.br
 stat = K_link (fSeid);
.br
.hy
.ad
.sh DESCRIPTION
K_link increments the reference count of a Kernel file specified by the
seid fSeid.  The reference count is normally used to indicate the
number of UNIX directory entries which point to this seid.
Applications of the KSOS Kernel which do not use the UNIX directory
structure and semantics may use the reference count for other purposes.
The reference count may only be incremented by processes with the
privLink privilege.  Such processes should be carefully designed to
reduce the bandwidth of the resultant confinement channels and to
preserve the integrity of the higher level directory structure, if any.
The security and integrity checking on K_link is as if the user were
reading and writing the file.  No discretionary access checking is
performed.  Thus, the processes privileged to use K_link may implement
whatever discretionary checking they choose.
.sh EXCEPTIONS
.lp 22 15
XbadLink	Bad link count. Link count field has overflowed.
.lp 22 15
XnoObj	File does not exist or process cannot determine its existence.
.lp 22 15
XnotWritable	Process does not have write access to file.
.i0
.sh "SEE ALSO"
K_create(II),
K_unlink(II),
UDM(VIII).
