commit - 30ecb075ba355b7a619a230da64cd44a40419134
commit + d4159696c300048740aebad152f3697c458385a7
blob - 0ec2613a9912d54dd1f4d0e7a454037a10cba2eb
blob + 137f85debc593ae6b18b6b800eed393ee582f7d3
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
struct gw_header *, int);
static const struct got_error *gw_get_commit(struct gw_trans *,
struct gw_header *);
-static const struct got_error *gw_apply_unveil(const char *, const char *);
+static const struct got_error *gw_apply_unveil(const char *);
static const struct got_error *gw_blame_cb(void *, int, int,
struct got_object_id *);
static const struct got_error *gw_load_got_paths(struct gw_trans *);
}
static const struct got_error *
-gw_apply_unveil(const char *repo_path, const char *repo_file)
+gw_apply_unveil(const char *repo_path)
{
const struct got_error *err;
-
- if (repo_path && repo_file) {
- char *full_path;
- if (asprintf(&full_path, "%s/%s", repo_path, repo_file) == -1)
- return got_error_from_errno("asprintf unveil");
- if (unveil(full_path, "r") != 0)
- return got_error_from_errno2("unveil", full_path);
- }
if (repo_path && unveil(repo_path, "r") != 0)
return got_error_from_errno2("unveil", repo_path);
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
- error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
+ error = gw_apply_unveil(gw_trans->gw_dir->path);
if (error)
goto done;
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
- error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
+ error = gw_apply_unveil(gw_trans->gw_dir->path);
if (error)
goto done;
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
- error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
+ error = gw_apply_unveil(gw_trans->gw_dir->path);
if (error)
goto done;
return error;
}
- error = gw_apply_unveil(gw_trans->gw_conf->got_repos_path, NULL);
+ error = gw_apply_unveil(gw_trans->gw_conf->got_repos_path);
if (error)
return error;
goto done;
}
- error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
+ error = gw_apply_unveil(gw_trans->gw_dir->path);
if (error)
goto done;
goto done;
}
- error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
+ error = gw_apply_unveil(gw_trans->gw_dir->path);
if (error)
goto done;
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
- error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
+ error = gw_apply_unveil(gw_trans->gw_dir->path);
if (error)
goto done;
if ((header = gw_init_header()) == NULL)
return got_error_from_errno("malloc");
- error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
+ error = gw_apply_unveil(gw_trans->gw_dir->path);
if (error)
goto done;