mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
Do not use the VMC C reserved word readonly.
This commit is contained in:
parent
c9271f6d58
commit
34baa18187
@ -161,7 +161,7 @@ calibrate_s2k_count (void)
|
||||
if (opt.verbose)
|
||||
{
|
||||
ms = calibrate_s2k_count_one (count);
|
||||
log_info ("S2K calibration: %lu iterations for %lums\n", count, ms);
|
||||
log_info ("S2K calibration: %lu -> %lums\n", count, ms);
|
||||
}
|
||||
|
||||
return count;
|
||||
|
@ -1,5 +1,8 @@
|
||||
2009-12-15 Werner Koch <wk@g10code.com>
|
||||
|
||||
* keydb.c (keydb_add_resource): s/readonly/read_only/g.
|
||||
* keyring.c (keyring_register_filename): Ditto.
|
||||
|
||||
* tdbio.c (tdbio_set_dbname): Do not call log_fatal after creating
|
||||
the directory. Fixes bug#1169. Reported by Daniel Leidert.
|
||||
|
||||
|
@ -219,12 +219,12 @@ keydb_add_resource (const char *url, int flags, int secret)
|
||||
const char *resname = url;
|
||||
char *filename = NULL;
|
||||
int force = (flags&1);
|
||||
int readonly = !!(flags&8);
|
||||
int read_only = !!(flags&8);
|
||||
int rc = 0;
|
||||
KeydbResourceType rt = KEYDB_RESOURCE_TYPE_NONE;
|
||||
void *token;
|
||||
|
||||
if (readonly)
|
||||
if (read_only)
|
||||
force = 0;
|
||||
|
||||
/* Do we have an URL?
|
||||
@ -254,7 +254,7 @@ keydb_add_resource (const char *url, int flags, int secret)
|
||||
else
|
||||
filename = xstrdup (resname);
|
||||
|
||||
if (!force && !readonly)
|
||||
if (!force && !read_only)
|
||||
force = secret? !any_secret : !any_public;
|
||||
|
||||
/* See whether we can determine the filetype. */
|
||||
@ -289,7 +289,7 @@ keydb_add_resource (const char *url, int flags, int secret)
|
||||
if (rc)
|
||||
goto leave;
|
||||
|
||||
if(keyring_register_filename (filename, secret, readonly, &token))
|
||||
if(keyring_register_filename (filename, secret, read_only, &token))
|
||||
{
|
||||
if (used_resources >= MAX_KEYDB_RESOURCES)
|
||||
rc = G10ERR_RESOURCE_LIMIT;
|
||||
|
@ -54,7 +54,7 @@ struct keyring_name
|
||||
{
|
||||
struct keyring_name *next;
|
||||
int secret;
|
||||
int readonly;
|
||||
int read_only;
|
||||
dotlock_t lockhd;
|
||||
int is_locked;
|
||||
int did_full_scan;
|
||||
@ -201,7 +201,7 @@ update_offset_hash_table_from_kb (OffsetHashTable tbl, KBNODE node, off_t off)
|
||||
* if a new keyring was registered.
|
||||
*/
|
||||
int
|
||||
keyring_register_filename (const char *fname, int secret, int readonly,
|
||||
keyring_register_filename (const char *fname, int secret, int read_only,
|
||||
void **ptr)
|
||||
{
|
||||
KR_NAME kr;
|
||||
@ -214,8 +214,8 @@ keyring_register_filename (const char *fname, int secret, int readonly,
|
||||
if (same_file_p (kr->fname, fname))
|
||||
{
|
||||
/* Already registered. */
|
||||
if (readonly)
|
||||
kr->readonly = 1;
|
||||
if (read_only)
|
||||
kr->read_only = 1;
|
||||
*ptr=kr;
|
||||
return 0;
|
||||
}
|
||||
@ -227,7 +227,7 @@ keyring_register_filename (const char *fname, int secret, int readonly,
|
||||
kr = xmalloc (sizeof *kr + strlen (fname));
|
||||
strcpy (kr->fname, fname);
|
||||
kr->secret = !!secret;
|
||||
kr->readonly = readonly;
|
||||
kr->read_only = read_only;
|
||||
kr->lockhd = NULL;
|
||||
kr->is_locked = 0;
|
||||
kr->did_full_scan = 0;
|
||||
@ -249,7 +249,7 @@ keyring_is_writable (void *token)
|
||||
{
|
||||
KR_NAME r = token;
|
||||
|
||||
return r? (r->readonly || !access (r->fname, W_OK)) : 0;
|
||||
return r? (r->read_only || !access (r->fname, W_OK)) : 0;
|
||||
}
|
||||
|
||||
|
||||
@ -516,7 +516,7 @@ keyring_update_keyblock (KEYRING_HANDLE hd, KBNODE kb)
|
||||
if (!hd->found.kr)
|
||||
return -1; /* no successful prior search */
|
||||
|
||||
if (hd->found.kr->readonly)
|
||||
if (hd->found.kr->read_only)
|
||||
return gpg_error (GPG_ERR_EACCES);
|
||||
|
||||
if (!hd->found.n_packets) {
|
||||
@ -562,13 +562,13 @@ keyring_insert_keyblock (KEYRING_HANDLE hd, KBNODE kb)
|
||||
else if (hd->found.kr)
|
||||
{
|
||||
fname = hd->found.kr->fname;
|
||||
if (hd->found.kr->readonly)
|
||||
if (hd->found.kr->read_only)
|
||||
return gpg_error (GPG_ERR_EACCES);
|
||||
}
|
||||
else if (hd->current.kr)
|
||||
{
|
||||
fname = hd->current.kr->fname;
|
||||
if (hd->current.kr->readonly)
|
||||
if (hd->current.kr->read_only)
|
||||
return gpg_error (GPG_ERR_EACCES);
|
||||
}
|
||||
else
|
||||
@ -603,7 +603,7 @@ keyring_delete_keyblock (KEYRING_HANDLE hd)
|
||||
if (!hd->found.kr)
|
||||
return -1; /* no successful prior search */
|
||||
|
||||
if (hd->found.kr->readonly)
|
||||
if (hd->found.kr->read_only)
|
||||
return gpg_error (GPG_ERR_EACCES);
|
||||
|
||||
if (!hd->found.n_packets) {
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
typedef struct keyring_handle *KEYRING_HANDLE;
|
||||
|
||||
int keyring_register_filename (const char *fname, int secret, int readonly,
|
||||
int keyring_register_filename (const char *fname, int secret, int read_only,
|
||||
void **ptr);
|
||||
int keyring_is_writable (void *token);
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-12-15 Werner Koch <wk@g10code.com>
|
||||
|
||||
* iso7816.c (do_generate_keypair): s/readonly/read_only/ because
|
||||
the first is a keyword in VMS C.
|
||||
|
||||
2009-12-03 Werner Koch <wk@g10code.com>
|
||||
|
||||
* scdaemon.c (set_debug): Allow for numerical debug leveles. Print
|
||||
|
@ -2178,7 +2178,7 @@ TokenInfo ::= SEQUENCE {
|
||||
} (CONSTRAINED BY { -- Each AlgorithmInfo.reference value must be unique --})
|
||||
|
||||
TokenFlags ::= BIT STRING {
|
||||
readonly (0),
|
||||
readOnly (0),
|
||||
loginRequired (1),
|
||||
prnGeneration (2),
|
||||
eidCompliant (3)
|
||||
|
@ -640,7 +640,7 @@ iso7816_internal_authenticate (int slot, int extended_mode,
|
||||
returned. In that case a value of -1 uses a large default
|
||||
(e.g. 4096 bytes), a value larger 256 used that value. */
|
||||
static gpg_error_t
|
||||
do_generate_keypair (int slot, int extended_mode, int readonly,
|
||||
do_generate_keypair (int slot, int extended_mode, int read_only,
|
||||
const unsigned char *data, size_t datalen,
|
||||
int le,
|
||||
unsigned char **result, size_t *resultlen)
|
||||
@ -653,7 +653,7 @@ do_generate_keypair (int slot, int extended_mode, int readonly,
|
||||
*resultlen = 0;
|
||||
|
||||
sw = apdu_send_le (slot, extended_mode,
|
||||
0x00, CMD_GENERATE_KEYPAIR, readonly? 0x81:0x80, 0,
|
||||
0x00, CMD_GENERATE_KEYPAIR, read_only? 0x81:0x80, 0,
|
||||
datalen, (const char*)data,
|
||||
le >= 0 && le < 256? 256:le,
|
||||
result, resultlen);
|
||||
|
Loading…
x
Reference in New Issue
Block a user