Commit Diff


commit - 4d24b1fdb79bbc3df9ef996250267ba70f189a4d
commit + 7348ded8f8bf5a82c1b0361e0e7591a1af96ff89
blob - 496a69548f10498a0a5ac85226976ec04339b121
blob + bbef698cd852eda07d51755cb924554e0f98b3c2
--- gotd/gotd.c
+++ gotd/gotd.c
@@ -1771,11 +1771,6 @@ main(int argc, char **argv)
 	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
@@ -195,6 +195,10 @@ timeout		: NUMBER {
 		;
 
 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)) >=