commit - 61d4bd062ed92c7c334c663c16f86fd80d09edf7
commit + 2382c6029fcaf1cfe733542c1779461f0b1251ff
blob - 3f49c317df61f0920a4cbe046bf927f5ead20532
blob + 22e1f652d4a563c1443ad56608ce3b0afdf22854
--- gotwebd/gotwebd.conf.5
+++ gotwebd/gotwebd.conf.5
Run the specified number of server processes.
.Xr gotwebd 8
runs 3 server processes by default.
-.It Ic unix_socket_name Ar path
-Set the path to the default unix socket.
-Defaults to
-.Pa /var/www/run/gotweb.sock .
.El
.Pp
If no
blob - 5d08e6330815244d0f093676cb7171f5881355b9
blob + 9413f1ab4e81bf24df462f3892f09400e6b1942d
--- gotwebd/gotwebd.h
+++ gotwebd/gotwebd.h
int server_cnt;
char httpd_chroot[PATH_MAX];
-
- char unix_socket_name[PATH_MAX];
};
/*
blob - 15d246c916137d3d1efe5080a25591b154346650
blob + c9cad22287e14d2e41713cae36dc59881d492819
--- gotwebd/parse.y
+++ gotwebd/parse.y
%token LOGO_URL SHOW_REPO_OWNER SHOW_REPO_AGE SHOW_REPO_DESCRIPTION
%token MAX_REPOS_DISPLAY REPOS_PATH MAX_COMMITS_DISPLAY ON ERROR
%token SHOW_SITE_OWNER SHOW_REPO_CLONEURL PORT PREFORK RESPECT_EXPORTOK
-%token UNIX_SOCKET_NAME SERVER CHROOT CUSTOM_CSS SOCKET
+%token SERVER CHROOT CUSTOM_CSS SOCKET
%token SUMMARY_COMMITS_DISPLAY SUMMARY_TAGS_DISPLAY
%token <v.string> STRING
sizeof(gotwebd->httpd_chroot));
if (n >= sizeof(gotwebd->httpd_chroot)) {
yyerror("%s: httpd_chroot truncated", __func__);
- free($2);
- YYERROR;
- }
- free($2);
- }
- | UNIX_SOCKET_NAME STRING {
- n = snprintf(gotwebd->unix_socket_name,
- sizeof(gotwebd->unix_socket_name), "%s%s",
- gotwebd->httpd_chroot, $2);
- if (n < 0 ||
- (size_t)n >= sizeof(gotwebd->unix_socket_name)) {
- yyerror("%s: unix_socket_name truncated",
- __func__);
free($2);
YYERROR;
}
{ "socket", SOCKET },
{ "summary_commits_display", SUMMARY_COMMITS_DISPLAY },
{ "summary_tags_display", SUMMARY_TAGS_DISPLAY },
- { "unix_socket_name", UNIX_SOCKET_NAME },
};
const struct keywords *p;
parse_config(const char *filename, struct gotwebd *env)
{
struct sym *sym, *next;
- int n;
if (config_init(env) == -1)
fatalx("failed to initialize configuration");
gotwebd = env;
- n = snprintf(env->unix_socket_name, sizeof(env->unix_socket_name),
- "%s%s", D_HTTPD_CHROOT, D_UNIX_SOCKET);
- if (n < 0 || (size_t)n >= sizeof(env->unix_socket_name))
- fatalx("%s: snprintf", __func__);
-
file = newfile(filename, 0);
if (file == NULL) {
add_default_server();