> When rebooting I now get the following errors from the rc script: > > [...] > checking quotas: done. > kvm_mkdb: can't chown /var/db/kvm_bsd.tmp: Operation not permitted > kvm_mkdb: will try again using /bsd instead > kvm_mkdb: can't chown /var/db/kvm_bsd.tmp: Operation not permitted > clearing /tmp > [...] > > The problem is that the kernel does not allow changing the gid of an fd > or file after pledge was called, so we can't pledge before calling > kvm_mkdb() the first time. > > Moving the pledge back to where it was would fix this problem, but I > don't think the problem reported by Gregor will be solved by that: the > kvm_mkdb() call will still fail, but at least kvm_mkdb won't be killed.
Actually, doing this will not allow a second call to kvm_mkdb() to work ever because of the fchown call, so my patch really only solves the rebooting issue, so it is no good. Sorry.
