diff options
author | Werner Koch <[email protected]> | 2004-10-14 10:48:15 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-10-14 10:48:15 +0000 |
commit | f294ce2d8bf0d674397475777b4ac7f02787a5fb (patch) | |
tree | 756e35b5e56c9d99eee25b6476f34d3666733aa5 /g10/export.c | |
parent | * rndunix.c (start_gatherer) [ENABLE_SELINUX_HACKS]: Don't allow (diff) | |
download | gnupg-f294ce2d8bf0d674397475777b4ac7f02787a5fb.tar.gz gnupg-f294ce2d8bf0d674397475777b4ac7f02787a5fb.zip |
* export.c (do_export_stream) [ENABLE_SELINUX_HACKS]: Don't allow
secret key export.
* import.c (import_secret_one) [ENABLE_SELINUX_HACKS]: Likewise
Diffstat (limited to '')
-rw-r--r-- | g10/export.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/g10/export.c b/g10/export.c index 9ac12e111..1227b1f58 100644 --- a/g10/export.c +++ b/g10/export.c @@ -171,6 +171,14 @@ do_export_stream( IOBUF out, STRLIST users, int secret, do this we need an extra flag to enable this feature so */ } +#ifdef ENABLE_SELINUX_HACKS + if (secret) { + log_error (_("exporting secret keys not allowed\n")); + rc = G10ERR_GENERAL; + goto leave; + } +#endif + while (!(rc = keydb_search2 (kdbhd, desc, ndesc, &descindex))) { int sha1_warned=0,skip_until_subkey=0; u32 sk_keyid[2]; |