commit - c08369d7b2d435a4c881c980f9a7192c5f7fc61a
commit + 6bee13de786cb52a98bb33a4a1cef191a240f962
blob - 969f659b425731a10dc96ef765903958e180d926
blob + 061d498dcd0d4a2338910b2afb43e8529b25d132
--- gotweb/TODO
+++ gotweb/TODO
- Redo index header, so columns are removed when content is set to not display
in gotweb.conf.
-
-- Move pledge to each function. Only diffing needs wpath and cpath.
blob - daa235b3c518c0e7524fc9f89e2d9c4b7942cf30
blob + 17c61bdce7ae4cbd8d57f579ad89242e6fe20c86
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
char *log, *log_html;
+ if (pledge("stdio rpath wpath cpath proc exec sendfd unveil",
+ NULL) == -1) {
+ error = got_error_from_errno("pledge");
+ return error;
+ }
+
error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
if (error)
return error;
const struct got_error *error = NULL;
char *log, *log_html;
+ if (pledge("stdio rpath proc exec sendfd unveil",
+ NULL) == -1) {
+ error = got_error_from_errno("pledge");
+ return error;
+ }
+
error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
if (error)
return error;
{
const struct got_error *error = NULL;
char *log, *log_html;
+
+ if (pledge("stdio rpath wpath cpath proc exec sendfd unveil",
+ NULL) == -1) {
+ error = got_error_from_errno("pledge");
+ return error;
+ }
error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
if (error)
char *html, *navs, *next, *prev;
unsigned int prev_disp = 0, next_disp = 1, dir_c = 0;
+ if (pledge("stdio rpath proc exec sendfd unveil",
+ NULL) == -1) {
+ error = got_error_from_errno("pledge");
+ return error;
+ }
+
error = gw_apply_unveil(gw_trans->gw_conf->got_repos_path, NULL);
if (error)
return error;
{
const struct got_error *error = NULL;
char *log, *log_html;
+
+ if (pledge("stdio rpath proc exec sendfd unveil",
+ NULL) == -1) {
+ error = got_error_from_errno("pledge");
+ return error;
+ }
error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
if (error)
const struct got_error *error = NULL;
char *log, *log_html;
+ if (pledge("stdio rpath proc exec sendfd unveil",
+ NULL) == -1) {
+ error = got_error_from_errno("pledge");
+ return error;
+ }
+
error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
if (error)
return error;
*cloneurl_html, *log, *log_html, *tags, *heads, *tags_html,
*heads_html, *age;
+ if (pledge("stdio rpath proc exec sendfd unveil",
+ NULL) == -1) {
+ error = got_error_from_errno("pledge");
+ return error;
+ }
+
error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
if (error)
return error;
{
const struct got_error *error = NULL;
char *log, *log_html;
+
+ if (pledge("stdio rpath proc exec sendfd unveil",
+ NULL) == -1) {
+ error = got_error_from_errno("pledge");
+ return error;
+ }
error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
if (error)
{
const struct got_error *error = NULL;
char *log, *log_html;
+
+ if (pledge("stdio rpath proc exec sendfd unveil",
+ NULL) == -1) {
+ error = got_error_from_errno("pledge");
+ return error;
+ }
error = gw_apply_unveil(gw_trans->gw_dir->path, NULL);
if (error)
malloc(sizeof(struct gotweb_conf))) == NULL) {
gw_malloc = 0;
error = got_error_from_errno("malloc");
- goto err;
- }
-
- if (pledge("stdio rpath wpath cpath proc exec sendfd unveil",
- NULL) == -1) {
- error = got_error_from_errno("pledge");
goto err;
}