Blame


1 7be7cc45 2018-04-02 stsp /*
2 5d56da81 2019-01-13 stsp * Copyright (c) 2018, 2019 Stefan Sperling <stsp@openbsd.org>
3 7be7cc45 2018-04-02 stsp *
4 7be7cc45 2018-04-02 stsp * Permission to use, copy, modify, and distribute this software for any
5 7be7cc45 2018-04-02 stsp * purpose with or without fee is hereby granted, provided that the above
6 7be7cc45 2018-04-02 stsp * copyright notice and this permission notice appear in all copies.
7 7be7cc45 2018-04-02 stsp *
8 7be7cc45 2018-04-02 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 7be7cc45 2018-04-02 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 7be7cc45 2018-04-02 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 7be7cc45 2018-04-02 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 7be7cc45 2018-04-02 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 7be7cc45 2018-04-02 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 7be7cc45 2018-04-02 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 7be7cc45 2018-04-02 stsp */
16 7be7cc45 2018-04-02 stsp
17 7be7cc45 2018-04-02 stsp /*
18 7be7cc45 2018-04-02 stsp * All code runs under the same UID but sensitive code paths are
19 7be7cc45 2018-04-02 stsp * run in a separate process with tighter pledge(2) promises.
20 2ca3a24b 2018-04-02 stsp * Data is communicated between processes via imsg_flush(3) and imsg_read(3).
21 7be7cc45 2018-04-02 stsp * This behaviour is transparent to users of the library.
22 7be7cc45 2018-04-02 stsp *
23 1e4880cb 2018-04-02 stsp * We generally transmit data in imsg buffers, split across several messages
24 ff6b18f8 2018-04-24 stsp * if necessary. File descriptors are used in cases where this is impractical,
25 ff6b18f8 2018-04-24 stsp * such as when accessing pack files or when transferring large blobs.
26 7be7cc45 2018-04-02 stsp *
27 ad242220 2018-09-08 stsp * We exec(2) after a fork(2). Parts of our library functionality are
28 ad242220 2018-09-08 stsp * accessible via separate executables in a libexec directory.
29 7be7cc45 2018-04-02 stsp */
30 7be7cc45 2018-04-02 stsp
31 ad242220 2018-09-08 stsp #define GOT_IMSG_FD_CHILD (STDERR_FILENO + 1)
32 ad242220 2018-09-08 stsp
33 ad242220 2018-09-08 stsp #ifndef GOT_LIBEXECDIR
34 ad242220 2018-09-08 stsp #define GOT_LIBEXECDIR /usr/libexec
35 ad242220 2018-09-08 stsp #endif
36 ad242220 2018-09-08 stsp
37 ad242220 2018-09-08 stsp /* Names of helper programs in libexec directory */
38 ad242220 2018-09-08 stsp #define GOT_PROG_READ_OBJECT got-read-object
39 ad242220 2018-09-08 stsp #define GOT_PROG_READ_TREE got-read-tree
40 ad242220 2018-09-08 stsp #define GOT_PROG_READ_COMMIT got-read-commit
41 ad242220 2018-09-08 stsp #define GOT_PROG_READ_BLOB got-read-blob
42 f4a881ce 2018-11-17 stsp #define GOT_PROG_READ_TAG got-read-tag
43 876c234b 2018-09-10 stsp #define GOT_PROG_READ_PACK got-read-pack
44 aba9c984 2019-09-08 stsp #define GOT_PROG_READ_GITCONFIG got-read-gitconfig
45 ad242220 2018-09-08 stsp
46 ad242220 2018-09-08 stsp #define GOT_STRINGIFY(x) #x
47 ad242220 2018-09-08 stsp #define GOT_STRINGVAL(x) GOT_STRINGIFY(x)
48 ad242220 2018-09-08 stsp
49 ad242220 2018-09-08 stsp /* Paths to helper programs in libexec directory */
50 ad242220 2018-09-08 stsp #define GOT_PATH_PROG_READ_OBJECT \
51 ad242220 2018-09-08 stsp GOT_STRINGVAL(GOT_LIBEXECDIR) "/" GOT_STRINGVAL(GOT_PROG_READ_OBJECT)
52 ad242220 2018-09-08 stsp #define GOT_PATH_PROG_READ_TREE \
53 ad242220 2018-09-08 stsp GOT_STRINGVAL(GOT_LIBEXECDIR) "/" GOT_STRINGVAL(GOT_PROG_READ_TREE)
54 ad242220 2018-09-08 stsp #define GOT_PATH_PROG_READ_COMMIT \
55 ad242220 2018-09-08 stsp GOT_STRINGVAL(GOT_LIBEXECDIR) "/" GOT_STRINGVAL(GOT_PROG_READ_COMMIT)
56 ad242220 2018-09-08 stsp #define GOT_PATH_PROG_READ_BLOB \
57 ad242220 2018-09-08 stsp GOT_STRINGVAL(GOT_LIBEXECDIR) "/" GOT_STRINGVAL(GOT_PROG_READ_BLOB)
58 f4a881ce 2018-11-17 stsp #define GOT_PATH_PROG_READ_TAG \
59 f4a881ce 2018-11-17 stsp GOT_STRINGVAL(GOT_LIBEXECDIR) "/" GOT_STRINGVAL(GOT_PROG_READ_TAG)
60 876c234b 2018-09-10 stsp #define GOT_PATH_PROG_READ_PACK \
61 876c234b 2018-09-10 stsp GOT_STRINGVAL(GOT_LIBEXECDIR) "/" GOT_STRINGVAL(GOT_PROG_READ_PACK)
62 aba9c984 2019-09-08 stsp #define GOT_PATH_PROG_READ_GITCONFIG \
63 aba9c984 2019-09-08 stsp GOT_STRINGVAL(GOT_LIBEXECDIR) "/" GOT_STRINGVAL(GOT_PROG_READ_GITCONFIG)
64 ad242220 2018-09-08 stsp
65 876c234b 2018-09-10 stsp struct got_privsep_child {
66 876c234b 2018-09-10 stsp int imsg_fd;
67 876c234b 2018-09-10 stsp pid_t pid;
68 876c234b 2018-09-10 stsp struct imsgbuf *ibuf;
69 876c234b 2018-09-10 stsp };
70 876c234b 2018-09-10 stsp
71 7be7cc45 2018-04-02 stsp enum got_imsg_type {
72 c025a41e 2018-04-02 stsp /* An error occured while processing a request. */
73 c025a41e 2018-04-02 stsp GOT_IMSG_ERROR,
74 c025a41e 2018-04-02 stsp
75 ad242220 2018-09-08 stsp /* Stop the child process. */
76 ad242220 2018-09-08 stsp GOT_IMSG_STOP,
77 1e4880cb 2018-04-02 stsp
78 7be7cc45 2018-04-02 stsp /*
79 7be7cc45 2018-04-02 stsp * Messages concerned with read access to objects in a repository.
80 7be7cc45 2018-04-02 stsp * Object and pack files are opened by the main process, where
81 7be7cc45 2018-04-02 stsp * data may be read as a byte string but without any interpretation.
82 7be7cc45 2018-04-02 stsp * Decompression and parsing of object and pack files occurs in a
83 f0b0c746 2018-09-09 stsp * separate process which runs under pledge("stdio recvfd").
84 7be7cc45 2018-04-02 stsp * This sandboxes our own repository parsing code, as well as zlib.
85 7be7cc45 2018-04-02 stsp */
86 ad242220 2018-09-08 stsp GOT_IMSG_OBJECT_REQUEST,
87 2178c42e 2018-04-22 stsp GOT_IMSG_OBJECT,
88 ad242220 2018-09-08 stsp GOT_IMSG_COMMIT_REQUEST,
89 bff6ca00 2018-04-23 stsp GOT_IMSG_COMMIT,
90 c75f7264 2018-09-11 stsp GOT_IMSG_COMMIT_LOGMSG,
91 ad242220 2018-09-08 stsp GOT_IMSG_TREE_REQUEST,
92 366d86ca 2018-04-23 stsp GOT_IMSG_TREE,
93 d80ab12b 2018-04-02 stsp GOT_IMSG_TREE_ENTRY,
94 ad242220 2018-09-08 stsp GOT_IMSG_BLOB_REQUEST,
95 ad242220 2018-09-08 stsp GOT_IMSG_BLOB_OUTFD,
96 366d86ca 2018-04-23 stsp GOT_IMSG_BLOB,
97 f4a881ce 2018-11-17 stsp GOT_IMSG_TAG_REQUEST,
98 f4a881ce 2018-11-17 stsp GOT_IMSG_TAG,
99 f4a881ce 2018-11-17 stsp GOT_IMSG_TAG_TAGMSG,
100 876c234b 2018-09-10 stsp
101 876c234b 2018-09-10 stsp /* Messages related to pack files. */
102 876c234b 2018-09-10 stsp GOT_IMSG_PACKIDX,
103 876c234b 2018-09-10 stsp GOT_IMSG_PACK,
104 876c234b 2018-09-10 stsp GOT_IMSG_PACKED_OBJECT_REQUEST,
105 3840f4c9 2018-09-12 stsp
106 33ad4cbe 2019-05-12 jcs /* Message sending file descriptor to a temporary file. */
107 3840f4c9 2018-09-12 stsp GOT_IMSG_TMPFD,
108 aba9c984 2019-09-08 stsp
109 aba9c984 2019-09-08 stsp /* Messages related to gitconfig files. */
110 aba9c984 2019-09-08 stsp GOT_IMSG_GITCONFIG_PARSE_REQUEST,
111 aba9c984 2019-09-08 stsp GOT_IMSG_GITCONFIG_REPOSITORY_FORMAT_VERSION_REQUEST,
112 aba9c984 2019-09-08 stsp GOT_IMSG_GITCONFIG_AUTHOR_NAME_REQUEST,
113 aba9c984 2019-09-08 stsp GOT_IMSG_GITCONFIG_AUTHOR_EMAIL_REQUEST,
114 cd95becd 2019-11-29 stsp GOT_IMSG_GITCONFIG_REMOTES_REQUEST,
115 aba9c984 2019-09-08 stsp GOT_IMSG_GITCONFIG_INT_VAL,
116 aba9c984 2019-09-08 stsp GOT_IMSG_GITCONFIG_STR_VAL,
117 cd95becd 2019-11-29 stsp GOT_IMSG_GITCONFIG_REMOTES,
118 cd95becd 2019-11-29 stsp GOT_IMSG_GITCONFIG_REMOTE,
119 7be7cc45 2018-04-02 stsp };
120 7be7cc45 2018-04-02 stsp
121 c025a41e 2018-04-02 stsp /* Structure for GOT_IMSG_ERROR. */
122 c025a41e 2018-04-02 stsp struct got_imsg_error {
123 c025a41e 2018-04-02 stsp int code; /* an error code from got_error.h */
124 2178c42e 2018-04-22 stsp int errno_code; /* in case code equals GOT_ERR_ERRNO */
125 291624d8 2018-11-07 stsp } __attribute__((__packed__));
126 c025a41e 2018-04-02 stsp
127 ad242220 2018-09-08 stsp /*
128 1785f84a 2018-12-23 stsp * Structure for GOT_IMSG_TREE_REQUEST and GOT_IMSG_OBJECT data.
129 ad242220 2018-09-08 stsp */
130 f7171542 2018-04-02 stsp struct got_imsg_object {
131 c59b3346 2018-09-11 stsp uint8_t id[SHA1_DIGEST_LENGTH];
132 c59b3346 2018-09-11 stsp
133 7be7cc45 2018-04-02 stsp /* These fields are the same as in struct got_object. */
134 7be7cc45 2018-04-02 stsp int type;
135 7be7cc45 2018-04-02 stsp int flags;
136 7be7cc45 2018-04-02 stsp size_t hdrlen;
137 7be7cc45 2018-04-02 stsp size_t size;
138 876c234b 2018-09-10 stsp off_t pack_offset;
139 c59b3346 2018-09-11 stsp int pack_idx;
140 291624d8 2018-11-07 stsp } __attribute__((__packed__));
141 7be7cc45 2018-04-02 stsp
142 366d86ca 2018-04-23 stsp /* Structure for GOT_IMSG_COMMIT data. */
143 bff6ca00 2018-04-23 stsp struct got_imsg_commit_object {
144 86acc566 2018-04-23 stsp uint8_t tree_id[SHA1_DIGEST_LENGTH];
145 bff6ca00 2018-04-23 stsp size_t author_len;
146 ccb26ccd 2018-11-05 stsp time_t author_time;
147 ccb26ccd 2018-11-05 stsp time_t author_gmtoff;
148 bff6ca00 2018-04-23 stsp size_t committer_len;
149 ccb26ccd 2018-11-05 stsp time_t committer_time;
150 ccb26ccd 2018-11-05 stsp time_t committer_gmtoff;
151 bff6ca00 2018-04-23 stsp size_t logmsg_len;
152 bff6ca00 2018-04-23 stsp int nparents;
153 bff6ca00 2018-04-23 stsp
154 6c281f94 2018-06-11 stsp /*
155 c75f7264 2018-09-11 stsp * Followed by author_len + committer_len data bytes
156 6c281f94 2018-06-11 stsp */
157 bff6ca00 2018-04-23 stsp
158 86acc566 2018-04-23 stsp /* Followed by 'nparents' SHA1_DIGEST_LENGTH length strings */
159 bff6ca00 2018-04-23 stsp
160 c75f7264 2018-09-11 stsp /*
161 c75f7264 2018-09-11 stsp * Followed by 'logmsg_len' bytes of commit log message data in
162 c75f7264 2018-09-11 stsp * one or more GOT_IMSG_COMMIT_LOGMSG messages.
163 c75f7264 2018-09-11 stsp */
164 bff6ca00 2018-04-23 stsp } __attribute__((__packed__));
165 bff6ca00 2018-04-23 stsp
166 f7171542 2018-04-02 stsp
167 48f392b2 2018-04-02 stsp /* Structure for GOT_IMSG_TREE_ENTRY. */
168 48f392b2 2018-04-02 stsp struct got_imsg_tree_entry {
169 e033d803 2018-04-23 stsp char id[SHA1_DIGEST_LENGTH];
170 48f392b2 2018-04-02 stsp mode_t mode;
171 48f392b2 2018-04-02 stsp /* Followed by entry's name in remaining data of imsg buffer. */
172 8d98bcfb 2018-04-02 stsp } __attribute__((__packed__));
173 48f392b2 2018-04-02 stsp
174 d80ab12b 2018-04-02 stsp /* Structure for GOT_IMSG_TREE_OBJECT_REPLY data. */
175 48f392b2 2018-04-02 stsp struct got_imsg_tree_object {
176 48f392b2 2018-04-02 stsp int nentries; /* This many TREE_ENTRY messages follow. */
177 48f392b2 2018-04-02 stsp };
178 48f392b2 2018-04-02 stsp
179 2967a784 2018-04-24 stsp /* Structure for GOT_IMSG_BLOB. */
180 2967a784 2018-04-24 stsp struct got_imsg_blob {
181 2967a784 2018-04-24 stsp size_t size;
182 ebc55e2d 2018-12-24 stsp size_t hdrlen;
183 ac544f8c 2019-01-13 stsp
184 ac544f8c 2019-01-13 stsp /*
185 ac544f8c 2019-01-13 stsp * If size <= GOT_PRIVSEP_INLINE_BLOB_DATA_MAX, blob data follows
186 ac544f8c 2019-01-13 stsp * in the imsg buffer. Otherwise, blob data has been written to a
187 ac544f8c 2019-01-13 stsp * file descriptor passed via the GOT_IMSG_BLOB_OUTFD imsg.
188 ac544f8c 2019-01-13 stsp */
189 ac544f8c 2019-01-13 stsp #define GOT_PRIVSEP_INLINE_BLOB_DATA_MAX \
190 ac544f8c 2019-01-13 stsp (MAX_IMSGSIZE - IMSG_HEADER_SIZE - sizeof(struct got_imsg_blob))
191 2967a784 2018-04-24 stsp };
192 2967a784 2018-04-24 stsp
193 ac544f8c 2019-01-13 stsp
194 f4a881ce 2018-11-17 stsp /* Structure for GOT_IMSG_TAG data. */
195 f4a881ce 2018-11-17 stsp struct got_imsg_tag_object {
196 f4a881ce 2018-11-17 stsp uint8_t id[SHA1_DIGEST_LENGTH];
197 f4a881ce 2018-11-17 stsp int obj_type;
198 f4a881ce 2018-11-17 stsp size_t tag_len;
199 f4a881ce 2018-11-17 stsp size_t tagger_len;
200 f4a881ce 2018-11-17 stsp time_t tagger_time;
201 f4a881ce 2018-11-17 stsp time_t tagger_gmtoff;
202 f4a881ce 2018-11-17 stsp size_t tagmsg_len;
203 f4a881ce 2018-11-17 stsp
204 f4a881ce 2018-11-17 stsp /*
205 f4a881ce 2018-11-17 stsp * Followed by tag_len + tagger_len data bytes
206 f4a881ce 2018-11-17 stsp */
207 f4a881ce 2018-11-17 stsp
208 f4a881ce 2018-11-17 stsp /*
209 f4a881ce 2018-11-17 stsp * Followed by 'tagmsg_len' bytes of tag message data in
210 f4a881ce 2018-11-17 stsp * one or more GOT_IMSG_TAG_TAGMSG messages.
211 f4a881ce 2018-11-17 stsp */
212 f4a881ce 2018-11-17 stsp } __attribute__((__packed__));
213 f4a881ce 2018-11-17 stsp
214 876c234b 2018-09-10 stsp /* Structure for GOT_IMSG_PACKIDX. */
215 876c234b 2018-09-10 stsp struct got_imsg_packidx {
216 876c234b 2018-09-10 stsp size_t len;
217 876c234b 2018-09-10 stsp /* Additionally, a file desciptor is passed via imsg. */
218 876c234b 2018-09-10 stsp };
219 876c234b 2018-09-10 stsp
220 876c234b 2018-09-10 stsp /* Structure for GOT_IMSG_PACK. */
221 876c234b 2018-09-10 stsp struct got_imsg_pack {
222 876c234b 2018-09-10 stsp char path_packfile[PATH_MAX];
223 876c234b 2018-09-10 stsp size_t filesize;
224 876c234b 2018-09-10 stsp /* Additionally, a file desciptor is passed via imsg. */
225 291624d8 2018-11-07 stsp } __attribute__((__packed__));
226 876c234b 2018-09-10 stsp
227 876c234b 2018-09-10 stsp /*
228 876c234b 2018-09-10 stsp * Structure for GOT_IMSG_PACKED_OBJECT_REQUEST data.
229 876c234b 2018-09-10 stsp */
230 876c234b 2018-09-10 stsp struct got_imsg_packed_object {
231 106807b4 2018-09-15 stsp uint8_t id[SHA1_DIGEST_LENGTH];
232 876c234b 2018-09-10 stsp int idx;
233 291624d8 2018-11-07 stsp } __attribute__((__packed__));
234 876c234b 2018-09-10 stsp
235 cd95becd 2019-11-29 stsp /*
236 cd95becd 2019-11-29 stsp * Structure for GOT_IMSG_GITCONFIG_REMOTE data.
237 cd95becd 2019-11-29 stsp */
238 cd95becd 2019-11-29 stsp struct got_imsg_remote {
239 cd95becd 2019-11-29 stsp size_t name_len;
240 cd95becd 2019-11-29 stsp size_t url_len;
241 cd95becd 2019-11-29 stsp
242 cd95becd 2019-11-29 stsp /* Followed by name_len + url_len data bytes. */
243 cd95becd 2019-11-29 stsp };
244 cd95becd 2019-11-29 stsp
245 cd95becd 2019-11-29 stsp /*
246 cd95becd 2019-11-29 stsp * Structure for GOT_IMSG_GITCONFIG_REMOTES data.
247 cd95becd 2019-11-29 stsp */
248 cd95becd 2019-11-29 stsp struct got_imsg_remotes {
249 cd95becd 2019-11-29 stsp int nremotes; /* This many GOT_IMSG_GITCONFIG_REMOTE messages follow. */
250 cd95becd 2019-11-29 stsp };
251 cd95becd 2019-11-29 stsp
252 cd95becd 2019-11-29 stsp struct got_remote_repo;
253 876c234b 2018-09-10 stsp struct got_pack;
254 876c234b 2018-09-10 stsp struct got_packidx;
255 3022d272 2019-11-14 stsp struct got_pathlist_head;
256 876c234b 2018-09-10 stsp
257 876c234b 2018-09-10 stsp const struct got_error *got_privsep_wait_for_child(pid_t);
258 ad242220 2018-09-08 stsp const struct got_error *got_privsep_send_stop(int);
259 ad242220 2018-09-08 stsp const struct got_error *got_privsep_recv_imsg(struct imsg *, struct imsgbuf *,
260 ad242220 2018-09-08 stsp size_t);
261 2178c42e 2018-04-22 stsp void got_privsep_send_error(struct imsgbuf *, const struct got_error *);
262 aea5f015 2018-12-24 stsp const struct got_error *got_privsep_send_obj_req(struct imsgbuf *, int);
263 1785f84a 2018-12-23 stsp const struct got_error *got_privsep_send_commit_req(struct imsgbuf *, int,
264 1785f84a 2018-12-23 stsp struct got_object_id *, int);
265 13c729f7 2018-12-24 stsp const struct got_error *got_privsep_send_tree_req(struct imsgbuf *, int,
266 13c729f7 2018-12-24 stsp struct got_object_id *, int);
267 268f7291 2018-12-24 stsp const struct got_error *got_privsep_send_tag_req(struct imsgbuf *, int,
268 268f7291 2018-12-24 stsp struct got_object_id *, int);
269 ebc55e2d 2018-12-24 stsp const struct got_error *got_privsep_send_blob_req(struct imsgbuf *, int,
270 ebc55e2d 2018-12-24 stsp struct got_object_id *, int);
271 55da3778 2018-09-10 stsp const struct got_error *got_privsep_send_blob_outfd(struct imsgbuf *, int);
272 3840f4c9 2018-09-12 stsp const struct got_error *got_privsep_send_tmpfd(struct imsgbuf *, int);
273 2178c42e 2018-04-22 stsp const struct got_error *got_privsep_send_obj(struct imsgbuf *,
274 876c234b 2018-09-10 stsp struct got_object *);
275 cfd633c2 2018-09-10 stsp const struct got_error *got_privsep_get_imsg_obj(struct got_object **,
276 cfd633c2 2018-09-10 stsp struct imsg *, struct imsgbuf *);
277 2178c42e 2018-04-22 stsp const struct got_error *got_privsep_recv_obj(struct got_object **,
278 2178c42e 2018-04-22 stsp struct imsgbuf *);
279 068fd2bf 2018-04-24 stsp const struct got_error *got_privsep_send_commit(struct imsgbuf *,
280 bff6ca00 2018-04-23 stsp struct got_commit_object *);
281 068fd2bf 2018-04-24 stsp const struct got_error *got_privsep_recv_commit(struct got_commit_object **,
282 bff6ca00 2018-04-23 stsp struct imsgbuf *);
283 068fd2bf 2018-04-24 stsp const struct got_error *got_privsep_recv_tree(struct got_tree_object **,
284 e033d803 2018-04-23 stsp struct imsgbuf *);
285 068fd2bf 2018-04-24 stsp const struct got_error *got_privsep_send_tree(struct imsgbuf *,
286 3022d272 2019-11-14 stsp struct got_pathlist_head *, int);
287 ac544f8c 2019-01-13 stsp const struct got_error *got_privsep_send_blob(struct imsgbuf *, size_t, size_t,
288 ac544f8c 2019-01-13 stsp const uint8_t *);
289 ac544f8c 2019-01-13 stsp const struct got_error *got_privsep_recv_blob(uint8_t **, size_t *, size_t *,
290 ebc55e2d 2018-12-24 stsp struct imsgbuf *);
291 f4a881ce 2018-11-17 stsp const struct got_error *got_privsep_send_tag(struct imsgbuf *,
292 f4a881ce 2018-11-17 stsp struct got_tag_object *);
293 f4a881ce 2018-11-17 stsp const struct got_error *got_privsep_recv_tag(struct got_tag_object **,
294 f4a881ce 2018-11-17 stsp struct imsgbuf *);
295 876c234b 2018-09-10 stsp const struct got_error *got_privsep_init_pack_child(struct imsgbuf *,
296 876c234b 2018-09-10 stsp struct got_pack *, struct got_packidx *);
297 106807b4 2018-09-15 stsp const struct got_error *got_privsep_send_packed_obj_req(struct imsgbuf *, int,
298 106807b4 2018-09-15 stsp struct got_object_id *);
299 41fa1437 2018-11-05 stsp const struct got_error *got_privsep_send_pack_child_ready(struct imsgbuf *);
300 aba9c984 2019-09-08 stsp
301 aba9c984 2019-09-08 stsp const struct got_error *got_privsep_send_gitconfig_parse_req(struct imsgbuf *,
302 aba9c984 2019-09-08 stsp int);
303 aba9c984 2019-09-08 stsp const struct got_error *
304 aba9c984 2019-09-08 stsp got_privsep_send_gitconfig_repository_format_version_req(struct imsgbuf *);
305 aba9c984 2019-09-08 stsp const struct got_error *got_privsep_send_gitconfig_author_name_req(
306 aba9c984 2019-09-08 stsp struct imsgbuf *);
307 aba9c984 2019-09-08 stsp const struct got_error *got_privsep_send_gitconfig_author_email_req(
308 aba9c984 2019-09-08 stsp struct imsgbuf *);
309 cd95becd 2019-11-29 stsp const struct got_error *got_privsep_send_gitconfig_remotes_req(
310 cd95becd 2019-11-29 stsp struct imsgbuf *);
311 aba9c984 2019-09-08 stsp const struct got_error *got_privsep_send_gitconfig_str(struct imsgbuf *,
312 aba9c984 2019-09-08 stsp const char *);
313 aba9c984 2019-09-08 stsp const struct got_error *got_privsep_recv_gitconfig_str(char **,
314 aba9c984 2019-09-08 stsp struct imsgbuf *);
315 aba9c984 2019-09-08 stsp const struct got_error *got_privsep_send_gitconfig_int(struct imsgbuf *, int);
316 aba9c984 2019-09-08 stsp const struct got_error *got_privsep_recv_gitconfig_int(int *, struct imsgbuf *);
317 cd95becd 2019-11-29 stsp const struct got_error *got_privsep_send_gitconfig_remotes(struct imsgbuf *,
318 cd95becd 2019-11-29 stsp struct got_remote_repo *, int);
319 cd95becd 2019-11-29 stsp const struct got_error *got_privsep_recv_gitconfig_remotes(
320 cd95becd 2019-11-29 stsp struct got_remote_repo **, int *, struct imsgbuf *);
321 aba9c984 2019-09-08 stsp
322 aba9c984 2019-09-08 stsp void got_privsep_exec_child(int[2], const char *, const char *);