sm: Create homedir and lock empty keybox creation.
authorWerner Koch <wk@gnupg.org>
Tue, 12 Aug 2014 08:36:30 +0000 (10:36 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 12 Aug 2014 14:08:09 +0000 (16:08 +0200)
commitb972ec396689013b884ea80f90d7505682d2fbb8
tree7e5e0f7a1498ebec18c54afc2c8488b6c80af3d1
parent90397c9343411bc52ed55d9710de875db70fac64
sm: Create homedir and lock empty keybox creation.

* sm/gpgsm.h (opt): Add field "no_homedir_creation".
* sm/gpgsm.c (main): Set it if --no-options is used.
* sm/keydb.c: Include fcntl.h.
(try_make_homedir): New.  Similar to the one from g10/openfile.c
(maybe_create_keybox): New.  Similar to the one from g10/keydb.c.
(keydb_add_resource): Replace some code by maybe_create_keybox.
sm/gpgsm.c
sm/gpgsm.h
sm/keydb.c