1 | .\" $Id: locker_read_attachent.3,v 1.1 1999-02-26 19:05:14 danw Exp $ |
---|
2 | .\" |
---|
3 | .\" Copyright 1997 by the Massachusetts Institute of Technology. |
---|
4 | .\" |
---|
5 | .\" Permission to use, copy, modify, and distribute this |
---|
6 | .\" software and its documentation for any purpose and without |
---|
7 | .\" fee is hereby granted, provided that the above copyright |
---|
8 | .\" notice appear in all copies and that both that copyright |
---|
9 | .\" notice and this permission notice appear in supporting |
---|
10 | .\" documentation, and that the name of M.I.T. not be used in |
---|
11 | .\" advertising or publicity pertaining to distribution of the |
---|
12 | .\" software without specific, written prior permission. |
---|
13 | .\" M.I.T. makes no representations about the suitability of |
---|
14 | .\" this software for any purpose. It is provided "as is" |
---|
15 | .\" without express or implied warranty. |
---|
16 | .\" |
---|
17 | .TH LOCKER_READ_ATTACHENT 3 |
---|
18 | .SH NAME |
---|
19 | locker_read_attachent \- Dispose of a locker_attachent |
---|
20 | .SH SYNOPSIS |
---|
21 | .nf |
---|
22 | .B #include <locker.h> |
---|
23 | .PP |
---|
24 | .B |
---|
25 | int locker_read_attachent(locker_context \fIcontext\fP, char *\fIname\fP, |
---|
26 | .B |
---|
27 | locker_attachent **\fIatp\fP) |
---|
28 | .PP |
---|
29 | .B cc file.c -llocker ... |
---|
30 | .fi |
---|
31 | .SH DESCRIPTION |
---|
32 | This function reads in the attachtab file for the named locker (which |
---|
33 | must be currently attached), and returns a |
---|
34 | .I locker_attachent |
---|
35 | for it. |
---|
36 | .PP |
---|
37 | A |
---|
38 | .I locker_attachent |
---|
39 | has at least the following fields: |
---|
40 | .TP 8 |
---|
41 | .B char *\fIname\fP |
---|
42 | The name of the locker (or the description, for an |
---|
43 | explicitly-specified locker). |
---|
44 | .TP 8 |
---|
45 | .B char *\fImountpoint\fP |
---|
46 | The mountpoint the locker is attached on. |
---|
47 | .TP 8 |
---|
48 | .B struct locker_ops *\fIfs\fP |
---|
49 | A pointer to filesystem-specific data. The name of the filesystem type |
---|
50 | is \fIfs->name\fP. |
---|
51 | .TP 8 |
---|
52 | .B struct in_addr \fIhostaddr\fP |
---|
53 | The address of the host the filesystem is on. |
---|
54 | .TP 8 |
---|
55 | .B char *\fIhostdir\fP |
---|
56 | The location of the filesystem on its host. (For NFS lockers, this is |
---|
57 | actually hostname:path.) |
---|
58 | .TP 8 |
---|
59 | .B int \fImode\fP |
---|
60 | The default authentication mode for this filesystem. One of |
---|
61 | \fBLOCKER_AUTH_NONE\fP, \fBLOCKER_AUTH_READONLY\fP, |
---|
62 | \fBLOCKER_AUTH_READWRITE\fP, or \fBLOCKER_AUTH_MAYBE_READWRITE\fP, as |
---|
63 | explained in |
---|
64 | .BR locker_attach (3) |
---|
65 | .TP 8 |
---|
66 | .B uid_t *\fIowners\fP |
---|
67 | A list of uids of users who have attached this locker. |
---|
68 | .TP 8 |
---|
69 | .B int \fInowners\fP |
---|
70 | The length of the |
---|
71 | .I owners |
---|
72 | array. |
---|
73 | .TP 8 |
---|
74 | .B int \fIflags\fP |
---|
75 | A bitfield which may have the following bits set: |
---|
76 | .RS 8 |
---|
77 | .TP 12 |
---|
78 | .B LOCKER_FLAG_LOCKED |
---|
79 | The locker is locked (via LOCKER_ATTACH_OPT_LOCK). |
---|
80 | .TP 12 |
---|
81 | .B LOCKER_FLAG_KEEP |
---|
82 | The locker will not be detached from the filesystem when it is |
---|
83 | detached. (See the "keep-mount" option in |
---|
84 | .BR attach.conf (5) |
---|
85 | ) |
---|
86 | .TP 12 |
---|
87 | .B LOCKER_FLAG_NOSUID |
---|
88 | The locker was attached without LOCKER_ATTACH_OPT_ALLOW_SETUID. (This |
---|
89 | information is kept because it used in certain outputs of the attach |
---|
90 | program.) |
---|
91 | .TP 12 |
---|
92 | .B LOCKER_FLAG_NAMEFILE |
---|
93 | The locker has a file in the "lockers" subdirectory of the attachtab |
---|
94 | directory; that is, it is a named locker which has been attached on |
---|
95 | its default mountpoint. |
---|
96 | .RE |
---|
97 | .PP |
---|
98 | The data in the |
---|
99 | .I locker_attachent |
---|
100 | should be treated as read-only by callers. |
---|
101 | .SH SEE ALSO |
---|
102 | locker_free_attachent(3) |
---|
103 | .SH AUTHOR |
---|
104 | Dan Winship, MIT Information Systems |
---|
105 | .br |
---|
106 | Copyright 1998 by the Massachusetts Institute of Technology. |
---|