Blame


1 13b2bc37 2022-10-23 stsp /*
2 13b2bc37 2022-10-23 stsp * Copyright (c) 2022 Stefan Sperling <stsp@openbsd.org>
3 13b2bc37 2022-10-23 stsp *
4 13b2bc37 2022-10-23 stsp * Permission to use, copy, modify, and distribute this software for any
5 13b2bc37 2022-10-23 stsp * purpose with or without fee is hereby granted, provided that the above
6 13b2bc37 2022-10-23 stsp * copyright notice and this permission notice appear in all copies.
7 13b2bc37 2022-10-23 stsp *
8 13b2bc37 2022-10-23 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 13b2bc37 2022-10-23 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 13b2bc37 2022-10-23 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 13b2bc37 2022-10-23 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 13b2bc37 2022-10-23 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 13b2bc37 2022-10-23 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 13b2bc37 2022-10-23 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 13b2bc37 2022-10-23 stsp */
16 13b2bc37 2022-10-23 stsp
17 13b2bc37 2022-10-23 stsp #include <sys/types.h>
18 13b2bc37 2022-10-23 stsp #include <sys/queue.h>
19 13b2bc37 2022-10-23 stsp #include <sys/tree.h>
20 13b2bc37 2022-10-23 stsp #include <sys/uio.h>
21 13b2bc37 2022-10-23 stsp
22 13b2bc37 2022-10-23 stsp #include <sha1.h>
23 13b2bc37 2022-10-23 stsp #include <stdint.h>
24 13b2bc37 2022-10-23 stsp #include <stdio.h>
25 13b2bc37 2022-10-23 stsp #include <stdlib.h>
26 13b2bc37 2022-10-23 stsp #include <imsg.h>
27 13b2bc37 2022-10-23 stsp #include <limits.h>
28 13b2bc37 2022-10-23 stsp
29 13b2bc37 2022-10-23 stsp #include "got_error.h"
30 13b2bc37 2022-10-23 stsp #include "got_object.h"
31 13b2bc37 2022-10-23 stsp #include "got_path.h"
32 13b2bc37 2022-10-23 stsp
33 13b2bc37 2022-10-23 stsp #include "got_lib_delta.h"
34 13b2bc37 2022-10-23 stsp #include "got_lib_object.h"
35 13b2bc37 2022-10-23 stsp #include "got_lib_object_cache.h"
36 13b2bc37 2022-10-23 stsp #include "got_lib_pack.h"
37 13b2bc37 2022-10-23 stsp #include "got_lib_repository.h"
38 13b2bc37 2022-10-23 stsp #include "got_lib_privsep.h"
39 13b2bc37 2022-10-23 stsp
40 13b2bc37 2022-10-23 stsp const struct got_error *
41 13b2bc37 2022-10-23 stsp got_privsep_send_stop(int fd)
42 13b2bc37 2022-10-23 stsp {
43 13b2bc37 2022-10-23 stsp return got_error(GOT_ERR_NOT_IMPL);
44 13b2bc37 2022-10-23 stsp }
45 13b2bc37 2022-10-23 stsp
46 13b2bc37 2022-10-23 stsp const struct got_error *
47 13b2bc37 2022-10-23 stsp got_privsep_wait_for_child(pid_t pid)
48 13b2bc37 2022-10-23 stsp {
49 13b2bc37 2022-10-23 stsp return got_error(GOT_ERR_NOT_IMPL);
50 13b2bc37 2022-10-23 stsp }
51 13b2bc37 2022-10-23 stsp
52 13b2bc37 2022-10-23 stsp void
53 13b2bc37 2022-10-23 stsp got_privsep_exec_child(int imsg_fds[2], const char *path, const char *repo_path)
54 13b2bc37 2022-10-23 stsp {
55 13b2bc37 2022-10-23 stsp fprintf(stderr, "%s: cannot run libexec helpers\n", getprogname());
56 13b2bc37 2022-10-23 stsp exit(1);
57 13b2bc37 2022-10-23 stsp }
58 13b2bc37 2022-10-23 stsp
59 13b2bc37 2022-10-23 stsp const struct got_error *
60 13b2bc37 2022-10-23 stsp got_privsep_init_pack_child(struct imsgbuf *ibuf, struct got_pack *pack,
61 13b2bc37 2022-10-23 stsp struct got_packidx *packidx)
62 13b2bc37 2022-10-23 stsp {
63 13b2bc37 2022-10-23 stsp return got_error(GOT_ERR_NOT_IMPL);
64 13b2bc37 2022-10-23 stsp }