commit - 858f75292f23a7397a21146ecafa6c96c3379a02
commit + 7ded01fb85d5ba062fe73c3232cd7add0603adda
blob - 516efa50f6d737f7eedb15849968300d76e9a0f8
blob + f7f2307cd30d20da15db9b6460051fe3276284f8
--- gotd/gotd.c
+++ gotd/gotd.c
struct gotd_secrets *secrets = NULL;
int ch, fd = -1, daemonize = 1, verbosity = 0, noaction = 0;
const char *confpath = GOTD_CONF_PATH;
- const char *secretspath = NULL;
+ char *secretspath = NULL;
char *argv0 = argv[0];
char title[2048];
struct passwd *pw = NULL;
fatal("realpath '%s'", optarg);
break;
case 's':
- secretspath = optarg;
+ secretspath = realpath(optarg, NULL);
+ if (secretspath == NULL)
+ fatal("realpath '%s'", optarg);
break;
case 'T':
switch (*optarg) {
event_dispatch();
free(repo_path);
+ free(secretspath);
free(default_sender);
gotd_shutdown();