{"action":"opened","issue":{"url":"https://api.github.com/repos/heimdal/heimdal/issues/302","repository_url":"https://api.github.com/repos/heimdal/heimdal","labels_url":"https://api.github.com/repos/heimdal/heimdal/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/heimdal/heimdal/issues/302/comments","events_url":"https://api.github.com/repos/heimdal/heimdal/issues/302/events","html_url":"https://github.com/heimdal/heimdal/issues/302","id":243285328,"number":302,"title":"\"kadmin -l stash\" ignores mkey_file setting when creating key file","user":{"login":"rtandy","id":795000,"avatar_url":"https://avatars5.githubusercontent.com/u/795000?v=4","gravatar_id":"","url":"https://api.github.com/users/rtandy","html_url":"https://github.com/rtandy","followers_url":"https://api.github.com/users/rtandy/followers","following_url":"https://api.github.com/users/rtandy/following{/other_user}","gists_url":"https://api.github.com/users/rtandy/gists{/gist_id}","starred_url":"https://api.github.com/users/rtandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtandy/subscriptions","organizations_url":"https://api.github.com/users/rtandy/orgs","repos_url":"https://api.github.com/users/rtandy/repos","events_url":"https://api.github.com/users/rtandy/events{/privacy}","received_events_url":"https://api.github.com/users/rtandy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-17T02:31:02Z","updated_at":"2017-07-17T02:31:02Z","closed_at":null,"body":"Hi,\r\n\r\n`/etc/heimdal-kdc/kdc.conf`:\r\n```\r\ndatabase = {\r\n  dbname = /var/lib/heimdal-kdc/heimdal\r\n  acl_file = /etc/heimdal-kdc/kadmind.acl\r\n  mkey_file = /var/lib/heimdal-kdc/heimdal.mkey\r\n}\r\n```\r\n(this is the same as the default if `mkey_file` is unspecified)\r\n\r\n`strace kadmin -c /etc/heimdal-kdc/kdc.conf -l init EXAMPLE.COM`:\r\n```\r\n[...]\r\nopen(\"/var/lib/heimdal-kdc/heimdal.mkey\", O_RDONLY) = -1 ENOENT (No such file or directory)\r\n[...]\r\n```\r\n\r\n`strace kadmin -c /etc/heimdal-kdc/kdc.conf -l stash --random-password`:\r\n```\r\n[...]\r\nopen(\"/var/lib/heimdal-kdc/heimdal.mkey\", O_RDONLY) = -1 ENOENT (No such file or directory)\r\n[...]\r\nopen(\"/var/lib/heimdal-kdc/m-key\", O_RDONLY) = -1 ENOENT (No such file or directory)\r\n[...]\r\nopen(\"/var/lib/heimdal-kdc/m-key.new\", O_RDWR|O_CLOEXEC) = -1 ENOENT (No such file or directory)\r\nopen(\"/var/lib/heimdal-kdc/m-key.new\", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 4\r\n```\r\n\r\nIt opens the configured `mkey_file`, I guess during startup, but then writes the new key to the hard-coded location since I didn't specify `--key-file`.\r\n\r\nhttps://github.com/heimdal/heimdal/blob/master/kadmin/stash.c#L62\r\n\r\n`kstash` has the same behaviour, but I guess changing it would be more work since it currently lacks the ability to read `kdc.conf` at all."}}
{"actor":{"display_login":"rtandy"}}