commit - 809a54db7c7cec54dcacb53f62eedecc18a833da
commit + abe844e2dfc7056150889993b3568fe400af7358
blob - 496a69548f10498a0a5ac85226976ec04339b121
blob + bbef698cd852eda07d51755cb924554e0f98b3c2
--- gotd/gotd.c
+++ gotd/gotd.c
if (pw->pw_uid == 0)
fatalx("cannot run %s as the superuser", getprogname());
- if (proc_id == PROC_LISTEN &&
- !got_path_is_absolute(gotd.unix_socket_path))
- fatalx("bad unix socket path \"%s\": must be an absolute path",
- gotd.unix_socket_path);
-
if (noaction) {
fprintf(stderr, "configuration OK\n");
return 0;
blob - 8a904e018947db197de77329a4c68cc09742e7f2
blob + 51cf2780d3077e2b6c6f8202d840cfe73f46b425
--- gotd/parse.y
+++ gotd/parse.y
;
main : LISTEN ON STRING {
+ if (!got_path_is_absolute($3))
+ yyerror("bad unix socket path \"%s\": "
+ "must be an absolute path", $3);
+
if (gotd_proc_id == PROC_LISTEN) {
if (strlcpy(gotd->unix_socket_path, $3,
sizeof(gotd->unix_socket_path)) >=