~mrooney/ecryptfs/nautilus-integration

« back to all changes in this revision

Viewing changes to src/key_mod/ecryptfs_key_mod_gpg.c

  • Committer: Dustin Kirkland
  • Date: 2009-05-02 19:39:09 UTC
  • Revision ID: kirkland@canonical.com-20090502193909-3741n5ddkf6eswph
Fix warnings, initialize a few variables, drop unused ones

  [ Arfrever Frehtes Taifersar Arahesis ]
  * key_mod/ecryptfs_key_mod_gpg.c,
    key_mod/ecryptfs_key_mod_pkcs11_helper.c,
    libecryptfs/key_management.c, utils/ecryptfs_unwrap_passphrase.c:
    Fix warnings, initialize a few variables, drop unused ones

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
 
132
132
int ecryptfs_gpg_encrypt(char *to, int size, char *from, unsigned char *blob)
133
133
{
134
 
        int rc;
 
134
        int rc = 0;
135
135
 
136
136
/*      gpg_op_encrypt(...); */
137
137
out:
251
251
                         struct val_node **head, void **foo)
252
252
{
253
253
        struct key_mod_gpg *key_mod_gpg = (struct key_mod_gpg *)(*foo);
254
 
        int i;
 
254
        int i = 0;
255
255
        gpgme_error_t err;
256
256
        int rc = 0;
257
257
        gpgme_key_t key;
283
283
 
284
284
static int generate_name_val_list(struct ecryptfs_name_val_pair *head)
285
285
{
286
 
        struct stat buf;
287
 
        int i = 0;
288
286
        uid_t id = getuid();
289
 
        struct passwd *pw = getpwuid(id);
290
287
        int rc = 0;
291
288
 
292
289
        head->next = NULL;
304
301
                destroy_key_mod_gpg(key_mod_gpg);
305
302
                free(key_mod_gpg);
306
303
        }
 
304
        return 0;
307
305
}
308
306
 
309
307
 
312
310
{
313
311
        struct key_mod_gpg *key_mod_gpg;
314
312
        gpgme_error_t err;
315
 
        gpgme_keylist_result_t keylist_res;
316
313
        int rc = 0;
317
314
 
318
315
        (*foo) = NULL;
329
326
        if ((err = gpgme_op_keylist_start(key_mod_gpg->ctx, "", 0))) {
330
327
                printf("Error attempting to start keylist\n");
331
328
                rc = -EINVAL;
332
 
                gpgme_release(ctx);
 
329
                gpgme_release(key_mod_gpg->ctx);
333
330
                free(key_mod_gpg);
334
331
                goto out;
335
332
        }