diff options
Diffstat (limited to 'usr/lib/pkcs11/common/loadsave.c')
-rwxr-xr-x | usr/lib/pkcs11/common/loadsave.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr/lib/pkcs11/common/loadsave.c b/usr/lib/pkcs11/common/loadsave.c index 04334dc..e843619 100755 --- a/usr/lib/pkcs11/common/loadsave.c +++ b/usr/lib/pkcs11/common/loadsave.c @@ -634,8 +634,8 @@ void set_perm(int file) * restrict access to a single user */ fchmod(file,S_IRUSR|S_IWUSR); } else { - // Set absolute permissions or rw-rw-r-- - fchmod(file, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH); + // Set absolute permissions or rw-rw---- + fchmod(file, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); grp = getgrnam("pkcs11"); // Obtain the group id if (grp) { @@ -828,7 +828,6 @@ CK_RV save_token_object(OBJECT * obj) TRACE_ERROR("fopen(%s): %s\n", fname, strerror(errno)); return CKR_FUNCTION_FAILED; } - set_perm(fileno(fp)); set_perm(fileno(fp)); fprintf(fp, "%s\n", obj->name); @@ -1602,8 +1601,8 @@ CK_RV save_masterkey_user(void) CK_BYTE *key = NULL; CK_ULONG key_len = 0L; CK_ULONG master_key_len = 0L; - CK_ULONG block_size; - CK_ULONG data_len; + CK_ULONG block_size = 0L; + CK_ULONG data_len = 0L; CK_BYTE fname[PATH_MAX]; CK_RV rc; char pk_dir_buf[PATH_MAX]; |