1DPNS_CREAT(3)                    DPNS      Library      Functions
2DPNS_CREAT(3)
3
4
5
6[1mNAME[0m
7       dpns_creat ‐ create a new DPNS file or  reset  it  in  the
8name server
9
10[1mSYNOPSIS[0m
11       [1m#include <sys/types.h>[0m
12       [1m#include "dpns_api.h"[0m
13
14       [1mint  dpns_creat (const char *[4m[22mpath[24m[1m, mode_t
15[4m[22mmode[24m[1m)[0m
16
17       [1mint  dpns_creatx   (const   char   *[4m[22mpath[24m[1m,
18mode_t [4m[22mmode[24m[1m, struct dpns_fileid[0m
19       [1m*[4m[22mfile_uniqueid[24m[1m)[0m
20
21[1mDESCRIPTION[0m
22       [1mdpns_creat  [22mcreates a new DPNS file or resets it in
23the name server.
24
25       If the file exists, the length is truncated to 0  and  the
26mode and owner
27       are unchanged.
28
29       If   the  file  does not exist yet, an entry is created in
30the name server
31       database and the file’s owner ID is set to  the  effective
32user ID of the
33       requestor.    The   group ID of the file is set to the ef‐
34fective group ID
35       of the requestor or is taken from the parent directory  if
36the  latter
37       has the [1mS_ISGID [22mbit set.
38
39       The   access   permission bits for the file are taken from
40[4mmode[24m, then all
41       bits set in the requestor’s file mode creation  mask   are
42cleared  (see
43       [1mdpns_umask[22m(3)).
44
45       [1mdpns_creatx   [22mbehaves   in   the  same  way and re‐
46turns the file unique id
47       (name server hostname and file id).
48
49       [4mpath[24m   specifies the logical pathname  relative  to
50the  current  DPNS
51              directory or the full DPNS pathname.
52
53[1mRETURN VALUE[0m
54       This  routine  returns  0  if the operation was successful
55or ‐1 if the
56       operation failed. In the latter case, [1mserrno [22mis set
57appropriately.
58
59[1mERRORS[0m
60       [1mENOENT       [22mA component of [4mpath[24m prefix does
61not exist  or  [4mpath[24m  is  a
62                    null pathname.
63
64       [1mEACCES       [22mSearch  permission  is  denied   on  a
65component of the [4mpath[0m
66                    prefix  or  the file does not exist and write
67permission  on
68                    the  parent  directory  is   denied   or  the
69file exists and
70                    write  permission  on  the file itself is de‐
71nied.
72
73       [1mEFAULT       [4m[22mpath[24m or [4mfile_uniqueid[24m is
74a NULL pointer.
75
76       [1mEEXIST       [22mFile exists already and has replicas.
77
78       [1mENOTDIR       [22mA  component of [4mpath[24m prefix is
79not a directory.
80
81       [1mEISDIR       [4m[22mpath[24m is an existing directory.
82
83       [1mEINVAL       [22mThe fileclass in the parent  directory
84is zero.
85
86       [1mENOSPC       [22mThe name server database is full.
87
88       [1mENAMETOOLONG  [22mThe  length  of  [4mpath[24m  exceeds
89[1mCA_MAXPATHLEN [22mor the length  of
90                    a [4mpath[24m  component  exceeds  [1mCA_MAX‐
91NAMELEN[22m.
92
93       [1mSENOSHOST    [22mHost unknown.
94
95       [1mSENOSSERV    [22mService unknown.
96
97       [1mSECOMERR     [22mCommunication error.
98
99       [1mENSNACT      [22mName server is not running or is being
100shutdown.
101
102[1mSEE ALSO[0m
103       [1mCastor_limits(4)[22m,             [1mdpns_chdir(3)[22m,
104[1mdpns_chmod(3)[22m,
105       [1mdpns_stat(3), dpns_statg(3)[22m, [1mdpns_umask(3)[0m
106
107[1mAUTHOR[0m
108       [1mLCG Grid Deployment [22mTeam
109
110
111
112DPNS                        $Date:    2005/06/30    08:34:03    $
113DPNS_CREAT(3)
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum