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 1b3e8e86 2022-11-08 stsp #include <sys/time.h>
19 13b2bc37 2022-10-23 stsp #include <sys/queue.h>
20 13b2bc37 2022-10-23 stsp #include <sys/tree.h>
21 13b2bc37 2022-10-23 stsp #include <sys/uio.h>
22 13b2bc37 2022-10-23 stsp
23 13b2bc37 2022-10-23 stsp #include <sha1.h>
24 5822e79e 2023-02-23 op #include <sha2.h>
25 13b2bc37 2022-10-23 stsp #include <stdint.h>
26 13b2bc37 2022-10-23 stsp #include <stdio.h>
27 13b2bc37 2022-10-23 stsp #include <stdlib.h>
28 13b2bc37 2022-10-23 stsp #include <imsg.h>
29 13b2bc37 2022-10-23 stsp #include <limits.h>
30 13b2bc37 2022-10-23 stsp
31 13b2bc37 2022-10-23 stsp #include "got_error.h"
32 13b2bc37 2022-10-23 stsp #include "got_object.h"
33 13b2bc37 2022-10-23 stsp #include "got_path.h"
34 13b2bc37 2022-10-23 stsp
35 13b2bc37 2022-10-23 stsp #include "got_lib_delta.h"
36 13b2bc37 2022-10-23 stsp #include "got_lib_object.h"
37 13b2bc37 2022-10-23 stsp #include "got_lib_object_cache.h"
38 13b2bc37 2022-10-23 stsp #include "got_lib_pack.h"
39 13b2bc37 2022-10-23 stsp #include "got_lib_repository.h"
40 13b2bc37 2022-10-23 stsp #include "got_lib_privsep.h"
41 13b2bc37 2022-10-23 stsp
42 13b2bc37 2022-10-23 stsp const struct got_error *
43 13b2bc37 2022-10-23 stsp got_privsep_send_stop(int fd)
44 13b2bc37 2022-10-23 stsp {
45 13b2bc37 2022-10-23 stsp return got_error(GOT_ERR_NOT_IMPL);
46 13b2bc37 2022-10-23 stsp }
47 13b2bc37 2022-10-23 stsp
48 13b2bc37 2022-10-23 stsp const struct got_error *
49 13b2bc37 2022-10-23 stsp got_privsep_wait_for_child(pid_t pid)
50 13b2bc37 2022-10-23 stsp {
51 13b2bc37 2022-10-23 stsp return got_error(GOT_ERR_NOT_IMPL);
52 13b2bc37 2022-10-23 stsp }
53 13b2bc37 2022-10-23 stsp
54 13b2bc37 2022-10-23 stsp void
55 13b2bc37 2022-10-23 stsp got_privsep_exec_child(int imsg_fds[2], const char *path, const char *repo_path)
56 13b2bc37 2022-10-23 stsp {
57 13b2bc37 2022-10-23 stsp fprintf(stderr, "%s: cannot run libexec helpers\n", getprogname());
58 13b2bc37 2022-10-23 stsp exit(1);
59 13b2bc37 2022-10-23 stsp }
60 13b2bc37 2022-10-23 stsp
61 13b2bc37 2022-10-23 stsp const struct got_error *
62 13b2bc37 2022-10-23 stsp got_privsep_init_pack_child(struct imsgbuf *ibuf, struct got_pack *pack,
63 13b2bc37 2022-10-23 stsp struct got_packidx *packidx)
64 13b2bc37 2022-10-23 stsp {
65 13b2bc37 2022-10-23 stsp return got_error(GOT_ERR_NOT_IMPL);
66 13b2bc37 2022-10-23 stsp }
67 ba97b2d7 2024-03-20 stsp
68 ba97b2d7 2024-03-20 stsp const struct got_error *
69 ba97b2d7 2024-03-20 stsp got_traverse_packed_commits(struct got_object_id_queue *traversed_commits,
70 ba97b2d7 2024-03-20 stsp struct got_object_id *commit_id, const char *path,
71 ba97b2d7 2024-03-20 stsp struct got_repository *repo)
72 ba97b2d7 2024-03-20 stsp {
73 ba97b2d7 2024-03-20 stsp return NULL;
74 ba97b2d7 2024-03-20 stsp }