line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
/* |
2
|
|
|
|
|
|
|
* Copyright (C) the libgit2 contributors. All rights reserved. |
3
|
|
|
|
|
|
|
* |
4
|
|
|
|
|
|
|
* This file is part of libgit2, distributed under the GNU GPL v2 with |
5
|
|
|
|
|
|
|
* a Linking Exception. For full terms see the included COPYING file. |
6
|
|
|
|
|
|
|
*/ |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#include "sysdir.h" |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#include "global.h" |
11
|
|
|
|
|
|
|
#include "buffer.h" |
12
|
|
|
|
|
|
|
#include "path.h" |
13
|
|
|
|
|
|
|
#include |
14
|
|
|
|
|
|
|
#if GIT_WIN32 |
15
|
|
|
|
|
|
|
#include "win32/findfile.h" |
16
|
|
|
|
|
|
|
#else |
17
|
|
|
|
|
|
|
#include |
18
|
|
|
|
|
|
|
#include |
19
|
|
|
|
|
|
|
#endif |
20
|
|
|
|
|
|
|
|
21
|
86
|
|
|
|
|
|
static int git_sysdir_guess_programdata_dirs(git_buf *out) |
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
#ifdef GIT_WIN32 |
24
|
|
|
|
|
|
|
return git_win32__find_programdata_dirs(out); |
25
|
|
|
|
|
|
|
#else |
26
|
86
|
|
|
|
|
|
git_buf_clear(out); |
27
|
86
|
|
|
|
|
|
return 0; |
28
|
|
|
|
|
|
|
#endif |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
86
|
|
|
|
|
|
static int git_sysdir_guess_system_dirs(git_buf *out) |
32
|
|
|
|
|
|
|
{ |
33
|
|
|
|
|
|
|
#ifdef GIT_WIN32 |
34
|
|
|
|
|
|
|
return git_win32__find_system_dirs(out, L"etc\\"); |
35
|
|
|
|
|
|
|
#else |
36
|
86
|
|
|
|
|
|
return git_buf_sets(out, "/etc"); |
37
|
|
|
|
|
|
|
#endif |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
#ifndef GIT_WIN32 |
41
|
0
|
|
|
|
|
|
static int get_passwd_home(git_buf *out, uid_t uid) |
42
|
|
|
|
|
|
|
{ |
43
|
|
|
|
|
|
|
struct passwd pwd, *pwdptr; |
44
|
0
|
|
|
|
|
|
char *buf = NULL; |
45
|
|
|
|
|
|
|
long buflen; |
46
|
|
|
|
|
|
|
int error; |
47
|
|
|
|
|
|
|
|
48
|
0
|
0
|
|
|
|
|
assert(out); |
49
|
|
|
|
|
|
|
|
50
|
0
|
0
|
|
|
|
|
if ((buflen = sysconf(_SC_GETPW_R_SIZE_MAX)) == -1) |
51
|
0
|
|
|
|
|
|
buflen = 1024; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
do { |
54
|
0
|
|
|
|
|
|
buf = git__realloc(buf, buflen); |
55
|
0
|
|
|
|
|
|
error = getpwuid_r(uid, &pwd, buf, buflen, &pwdptr); |
56
|
0
|
|
|
|
|
|
buflen *= 2; |
57
|
0
|
0
|
|
|
|
|
} while (error == ERANGE && buflen <= 8192); |
|
|
0
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
0
|
0
|
|
|
|
|
if (error) { |
60
|
0
|
|
|
|
|
|
git_error_set(GIT_ERROR_OS, "failed to get passwd entry"); |
61
|
0
|
|
|
|
|
|
goto out; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
0
|
0
|
|
|
|
|
if (!pwdptr) { |
65
|
0
|
|
|
|
|
|
git_error_set(GIT_ERROR_OS, "no passwd entry found for user"); |
66
|
0
|
|
|
|
|
|
goto out; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
0
|
0
|
|
|
|
|
if ((error = git_buf_puts(out, pwdptr->pw_dir)) < 0) |
70
|
0
|
|
|
|
|
|
goto out; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
out: |
73
|
0
|
|
|
|
|
|
git__free(buf); |
74
|
0
|
|
|
|
|
|
return error; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
#endif |
77
|
|
|
|
|
|
|
|
78
|
86
|
|
|
|
|
|
static int git_sysdir_guess_global_dirs(git_buf *out) |
79
|
|
|
|
|
|
|
{ |
80
|
|
|
|
|
|
|
#ifdef GIT_WIN32 |
81
|
|
|
|
|
|
|
return git_win32__find_global_dirs(out); |
82
|
|
|
|
|
|
|
#else |
83
|
|
|
|
|
|
|
int error; |
84
|
|
|
|
|
|
|
uid_t uid, euid; |
85
|
|
|
|
|
|
|
const char *sandbox_id; |
86
|
|
|
|
|
|
|
|
87
|
86
|
|
|
|
|
|
uid = getuid(); |
88
|
86
|
|
|
|
|
|
euid = geteuid(); |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
/** |
91
|
|
|
|
|
|
|
* If APP_SANDBOX_CONTAINER_ID is set, we are running in a |
92
|
|
|
|
|
|
|
* sandboxed environment on macOS. |
93
|
|
|
|
|
|
|
*/ |
94
|
86
|
|
|
|
|
|
sandbox_id = getenv("APP_SANDBOX_CONTAINER_ID"); |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
/* |
97
|
|
|
|
|
|
|
* In case we are running setuid, use the configuration |
98
|
|
|
|
|
|
|
* of the effective user. |
99
|
|
|
|
|
|
|
* |
100
|
|
|
|
|
|
|
* If we are running in a sandboxed environment on macOS, |
101
|
|
|
|
|
|
|
* we have to get the HOME dir from the password entry file. |
102
|
|
|
|
|
|
|
*/ |
103
|
86
|
50
|
|
|
|
|
if (!sandbox_id && uid == euid) |
|
|
50
|
|
|
|
|
|
104
|
86
|
|
|
|
|
|
error = git__getenv(out, "HOME"); |
105
|
|
|
|
|
|
|
else |
106
|
0
|
|
|
|
|
|
error = get_passwd_home(out, euid); |
107
|
|
|
|
|
|
|
|
108
|
86
|
50
|
|
|
|
|
if (error == GIT_ENOTFOUND) { |
109
|
0
|
|
|
|
|
|
git_error_clear(); |
110
|
0
|
|
|
|
|
|
error = 0; |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
86
|
|
|
|
|
|
return error; |
114
|
|
|
|
|
|
|
#endif |
115
|
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
|
117
|
86
|
|
|
|
|
|
static int git_sysdir_guess_xdg_dirs(git_buf *out) |
118
|
|
|
|
|
|
|
{ |
119
|
|
|
|
|
|
|
#ifdef GIT_WIN32 |
120
|
|
|
|
|
|
|
return git_win32__find_xdg_dirs(out); |
121
|
|
|
|
|
|
|
#else |
122
|
86
|
|
|
|
|
|
git_buf env = GIT_BUF_INIT; |
123
|
|
|
|
|
|
|
int error; |
124
|
|
|
|
|
|
|
uid_t uid, euid; |
125
|
|
|
|
|
|
|
|
126
|
86
|
|
|
|
|
|
uid = getuid(); |
127
|
86
|
|
|
|
|
|
euid = geteuid(); |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
/* |
130
|
|
|
|
|
|
|
* In case we are running setuid, only look up passwd |
131
|
|
|
|
|
|
|
* directory of the effective user. |
132
|
|
|
|
|
|
|
*/ |
133
|
86
|
50
|
|
|
|
|
if (uid == euid) { |
134
|
86
|
50
|
|
|
|
|
if ((error = git__getenv(&env, "XDG_CONFIG_HOME")) == 0) |
135
|
0
|
|
|
|
|
|
error = git_buf_joinpath(out, env.ptr, "git"); |
136
|
|
|
|
|
|
|
|
137
|
86
|
50
|
|
|
|
|
if (error == GIT_ENOTFOUND && (error = git__getenv(&env, "HOME")) == 0) |
|
|
50
|
|
|
|
|
|
138
|
86
|
|
|
|
|
|
error = git_buf_joinpath(out, env.ptr, ".config/git"); |
139
|
|
|
|
|
|
|
} else { |
140
|
0
|
0
|
|
|
|
|
if ((error = get_passwd_home(&env, euid)) == 0) |
141
|
0
|
|
|
|
|
|
error = git_buf_joinpath(out, env.ptr, ".config/git"); |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
86
|
50
|
|
|
|
|
if (error == GIT_ENOTFOUND) { |
145
|
0
|
|
|
|
|
|
git_error_clear(); |
146
|
0
|
|
|
|
|
|
error = 0; |
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
|
149
|
86
|
|
|
|
|
|
git_buf_dispose(&env); |
150
|
86
|
|
|
|
|
|
return error; |
151
|
|
|
|
|
|
|
#endif |
152
|
|
|
|
|
|
|
} |
153
|
|
|
|
|
|
|
|
154
|
86
|
|
|
|
|
|
static int git_sysdir_guess_template_dirs(git_buf *out) |
155
|
|
|
|
|
|
|
{ |
156
|
|
|
|
|
|
|
#ifdef GIT_WIN32 |
157
|
|
|
|
|
|
|
return git_win32__find_system_dirs(out, L"share\\git-core\\templates"); |
158
|
|
|
|
|
|
|
#else |
159
|
86
|
|
|
|
|
|
return git_buf_sets(out, "/usr/share/git-core/templates"); |
160
|
|
|
|
|
|
|
#endif |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
struct git_sysdir__dir { |
164
|
|
|
|
|
|
|
git_buf buf; |
165
|
|
|
|
|
|
|
int (*guess)(git_buf *out); |
166
|
|
|
|
|
|
|
}; |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
static struct git_sysdir__dir git_sysdir__dirs[] = { |
169
|
|
|
|
|
|
|
{ GIT_BUF_INIT, git_sysdir_guess_system_dirs }, |
170
|
|
|
|
|
|
|
{ GIT_BUF_INIT, git_sysdir_guess_global_dirs }, |
171
|
|
|
|
|
|
|
{ GIT_BUF_INIT, git_sysdir_guess_xdg_dirs }, |
172
|
|
|
|
|
|
|
{ GIT_BUF_INIT, git_sysdir_guess_programdata_dirs }, |
173
|
|
|
|
|
|
|
{ GIT_BUF_INIT, git_sysdir_guess_template_dirs }, |
174
|
|
|
|
|
|
|
}; |
175
|
|
|
|
|
|
|
|
176
|
0
|
|
|
|
|
|
static void git_sysdir_global_shutdown(void) |
177
|
|
|
|
|
|
|
{ |
178
|
|
|
|
|
|
|
size_t i; |
179
|
|
|
|
|
|
|
|
180
|
0
|
0
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(git_sysdir__dirs); ++i) |
181
|
0
|
|
|
|
|
|
git_buf_dispose(&git_sysdir__dirs[i].buf); |
182
|
0
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
|
184
|
86
|
|
|
|
|
|
int git_sysdir_global_init(void) |
185
|
|
|
|
|
|
|
{ |
186
|
|
|
|
|
|
|
size_t i; |
187
|
86
|
|
|
|
|
|
int error = 0; |
188
|
|
|
|
|
|
|
|
189
|
516
|
50
|
|
|
|
|
for (i = 0; !error && i < ARRAY_SIZE(git_sysdir__dirs); i++) |
|
|
100
|
|
|
|
|
|
190
|
430
|
|
|
|
|
|
error = git_sysdir__dirs[i].guess(&git_sysdir__dirs[i].buf); |
191
|
|
|
|
|
|
|
|
192
|
86
|
|
|
|
|
|
git__on_shutdown(git_sysdir_global_shutdown); |
193
|
|
|
|
|
|
|
|
194
|
86
|
|
|
|
|
|
return error; |
195
|
|
|
|
|
|
|
} |
196
|
|
|
|
|
|
|
|
197
|
1105
|
|
|
|
|
|
static int git_sysdir_check_selector(git_sysdir_t which) |
198
|
|
|
|
|
|
|
{ |
199
|
1105
|
50
|
|
|
|
|
if (which < ARRAY_SIZE(git_sysdir__dirs)) |
200
|
1105
|
|
|
|
|
|
return 0; |
201
|
|
|
|
|
|
|
|
202
|
0
|
|
|
|
|
|
git_error_set(GIT_ERROR_INVALID, "config directory selector out of range"); |
203
|
0
|
|
|
|
|
|
return -1; |
204
|
|
|
|
|
|
|
} |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
|
207
|
1105
|
|
|
|
|
|
int git_sysdir_get(const git_buf **out, git_sysdir_t which) |
208
|
|
|
|
|
|
|
{ |
209
|
1105
|
50
|
|
|
|
|
assert(out); |
210
|
|
|
|
|
|
|
|
211
|
1105
|
|
|
|
|
|
*out = NULL; |
212
|
|
|
|
|
|
|
|
213
|
1105
|
50
|
|
|
|
|
GIT_ERROR_CHECK_ERROR(git_sysdir_check_selector(which)); |
214
|
|
|
|
|
|
|
|
215
|
1105
|
|
|
|
|
|
*out = &git_sysdir__dirs[which].buf; |
216
|
1105
|
|
|
|
|
|
return 0; |
217
|
|
|
|
|
|
|
} |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
#define PATH_MAGIC "$PATH" |
220
|
|
|
|
|
|
|
|
221
|
0
|
|
|
|
|
|
int git_sysdir_set(git_sysdir_t which, const char *search_path) |
222
|
|
|
|
|
|
|
{ |
223
|
0
|
|
|
|
|
|
const char *expand_path = NULL; |
224
|
0
|
|
|
|
|
|
git_buf merge = GIT_BUF_INIT; |
225
|
|
|
|
|
|
|
|
226
|
0
|
0
|
|
|
|
|
GIT_ERROR_CHECK_ERROR(git_sysdir_check_selector(which)); |
227
|
|
|
|
|
|
|
|
228
|
0
|
0
|
|
|
|
|
if (search_path != NULL) |
229
|
0
|
|
|
|
|
|
expand_path = strstr(search_path, PATH_MAGIC); |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
/* reset the default if this path has been cleared */ |
232
|
0
|
0
|
|
|
|
|
if (!search_path) |
233
|
0
|
|
|
|
|
|
git_sysdir__dirs[which].guess(&git_sysdir__dirs[which].buf); |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
/* if $PATH is not referenced, then just set the path */ |
236
|
0
|
0
|
|
|
|
|
if (!expand_path) { |
237
|
0
|
0
|
|
|
|
|
if (search_path) |
238
|
0
|
|
|
|
|
|
git_buf_sets(&git_sysdir__dirs[which].buf, search_path); |
239
|
|
|
|
|
|
|
|
240
|
0
|
|
|
|
|
|
goto done; |
241
|
|
|
|
|
|
|
} |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
/* otherwise set to join(before $PATH, old value, after $PATH) */ |
244
|
0
|
0
|
|
|
|
|
if (expand_path > search_path) |
245
|
0
|
|
|
|
|
|
git_buf_set(&merge, search_path, expand_path - search_path); |
246
|
|
|
|
|
|
|
|
247
|
0
|
0
|
|
|
|
|
if (git_buf_len(&git_sysdir__dirs[which].buf)) |
248
|
0
|
|
|
|
|
|
git_buf_join(&merge, GIT_PATH_LIST_SEPARATOR, |
249
|
0
|
|
|
|
|
|
merge.ptr, git_sysdir__dirs[which].buf.ptr); |
250
|
|
|
|
|
|
|
|
251
|
0
|
|
|
|
|
|
expand_path += strlen(PATH_MAGIC); |
252
|
0
|
0
|
|
|
|
|
if (*expand_path) |
253
|
0
|
|
|
|
|
|
git_buf_join(&merge, GIT_PATH_LIST_SEPARATOR, merge.ptr, expand_path); |
254
|
|
|
|
|
|
|
|
255
|
0
|
|
|
|
|
|
git_buf_swap(&git_sysdir__dirs[which].buf, &merge); |
256
|
0
|
|
|
|
|
|
git_buf_dispose(&merge); |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
done: |
259
|
0
|
0
|
|
|
|
|
if (git_buf_oom(&git_sysdir__dirs[which].buf)) |
260
|
0
|
|
|
|
|
|
return -1; |
261
|
|
|
|
|
|
|
|
262
|
0
|
|
|
|
|
|
return 0; |
263
|
|
|
|
|
|
|
} |
264
|
|
|
|
|
|
|
|
265
|
1060
|
|
|
|
|
|
static int git_sysdir_find_in_dirlist( |
266
|
|
|
|
|
|
|
git_buf *path, |
267
|
|
|
|
|
|
|
const char *name, |
268
|
|
|
|
|
|
|
git_sysdir_t which, |
269
|
|
|
|
|
|
|
const char *label) |
270
|
|
|
|
|
|
|
{ |
271
|
|
|
|
|
|
|
size_t len; |
272
|
1060
|
|
|
|
|
|
const char *scan, *next = NULL; |
273
|
|
|
|
|
|
|
const git_buf *syspath; |
274
|
|
|
|
|
|
|
|
275
|
1060
|
50
|
|
|
|
|
GIT_ERROR_CHECK_ERROR(git_sysdir_get(&syspath, which)); |
276
|
1060
|
50
|
|
|
|
|
if (!syspath || !git_buf_len(syspath)) |
|
|
100
|
|
|
|
|
|
277
|
|
|
|
|
|
|
goto done; |
278
|
|
|
|
|
|
|
|
279
|
2030
|
100
|
|
|
|
|
for (scan = git_buf_cstr(syspath); scan; scan = next) { |
280
|
|
|
|
|
|
|
/* find unescaped separator or end of string */ |
281
|
6121
|
100
|
|
|
|
|
for (next = scan; *next; ++next) { |
282
|
5106
|
50
|
|
|
|
|
if (*next == GIT_PATH_LIST_SEPARATOR && |
|
|
0
|
|
|
|
|
|
283
|
0
|
0
|
|
|
|
|
(next <= scan || next[-1] != '\\')) |
284
|
|
|
|
|
|
|
break; |
285
|
|
|
|
|
|
|
} |
286
|
|
|
|
|
|
|
|
287
|
1015
|
|
|
|
|
|
len = (size_t)(next - scan); |
288
|
1015
|
50
|
|
|
|
|
next = (*next ? next + 1 : NULL); |
289
|
1015
|
50
|
|
|
|
|
if (!len) |
290
|
0
|
|
|
|
|
|
continue; |
291
|
|
|
|
|
|
|
|
292
|
1015
|
50
|
|
|
|
|
GIT_ERROR_CHECK_ERROR(git_buf_set(path, scan, len)); |
293
|
1015
|
50
|
|
|
|
|
if (name) |
294
|
1015
|
50
|
|
|
|
|
GIT_ERROR_CHECK_ERROR(git_buf_joinpath(path, path->ptr, name)); |
295
|
|
|
|
|
|
|
|
296
|
1015
|
50
|
|
|
|
|
if (git_path_exists(path->ptr)) |
297
|
0
|
|
|
|
|
|
return 0; |
298
|
|
|
|
|
|
|
} |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
done: |
301
|
1060
|
|
|
|
|
|
git_buf_dispose(path); |
302
|
1060
|
|
|
|
|
|
git_error_set(GIT_ERROR_OS, "the %s file '%s' doesn't exist", label, name); |
303
|
1060
|
|
|
|
|
|
return GIT_ENOTFOUND; |
304
|
|
|
|
|
|
|
} |
305
|
|
|
|
|
|
|
|
306
|
893
|
|
|
|
|
|
int git_sysdir_find_system_file(git_buf *path, const char *filename) |
307
|
|
|
|
|
|
|
{ |
308
|
893
|
|
|
|
|
|
return git_sysdir_find_in_dirlist( |
309
|
|
|
|
|
|
|
path, filename, GIT_SYSDIR_SYSTEM, "system"); |
310
|
|
|
|
|
|
|
} |
311
|
|
|
|
|
|
|
|
312
|
45
|
|
|
|
|
|
int git_sysdir_find_global_file(git_buf *path, const char *filename) |
313
|
|
|
|
|
|
|
{ |
314
|
45
|
|
|
|
|
|
return git_sysdir_find_in_dirlist( |
315
|
|
|
|
|
|
|
path, filename, GIT_SYSDIR_GLOBAL, "global"); |
316
|
|
|
|
|
|
|
} |
317
|
|
|
|
|
|
|
|
318
|
77
|
|
|
|
|
|
int git_sysdir_find_xdg_file(git_buf *path, const char *filename) |
319
|
|
|
|
|
|
|
{ |
320
|
77
|
|
|
|
|
|
return git_sysdir_find_in_dirlist( |
321
|
|
|
|
|
|
|
path, filename, GIT_SYSDIR_XDG, "global/xdg"); |
322
|
|
|
|
|
|
|
} |
323
|
|
|
|
|
|
|
|
324
|
45
|
|
|
|
|
|
int git_sysdir_find_programdata_file(git_buf *path, const char *filename) |
325
|
|
|
|
|
|
|
{ |
326
|
45
|
|
|
|
|
|
return git_sysdir_find_in_dirlist( |
327
|
|
|
|
|
|
|
path, filename, GIT_SYSDIR_PROGRAMDATA, "ProgramData"); |
328
|
|
|
|
|
|
|
} |
329
|
|
|
|
|
|
|
|
330
|
0
|
|
|
|
|
|
int git_sysdir_find_template_dir(git_buf *path) |
331
|
|
|
|
|
|
|
{ |
332
|
0
|
|
|
|
|
|
return git_sysdir_find_in_dirlist( |
333
|
|
|
|
|
|
|
path, NULL, GIT_SYSDIR_TEMPLATE, "template"); |
334
|
|
|
|
|
|
|
} |
335
|
|
|
|
|
|
|
|
336
|
0
|
|
|
|
|
|
int git_sysdir_expand_global_file(git_buf *path, const char *filename) |
337
|
|
|
|
|
|
|
{ |
338
|
|
|
|
|
|
|
int error; |
339
|
|
|
|
|
|
|
|
340
|
0
|
0
|
|
|
|
|
if ((error = git_sysdir_find_global_file(path, NULL)) == 0) { |
341
|
0
|
0
|
|
|
|
|
if (filename) |
342
|
0
|
|
|
|
|
|
error = git_buf_joinpath(path, path->ptr, filename); |
343
|
|
|
|
|
|
|
} |
344
|
|
|
|
|
|
|
|
345
|
0
|
|
|
|
|
|
return error; |
346
|
|
|
|
|
|
|
} |