~noskcaj/ubuntu/vivid/gnome-keyring/3.15.90

« back to all changes in this revision

Viewing changes to pkcs11/gnome2-store/gkm-gnome2-file.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-14 22:13:02 UTC
  • mfrom: (1.3.1)
  • mto: (80.2.8 experimental) (1.1.77)
  • mto: This revision was merged to the branch mainline in revision 148.
  • Revision ID: package-import@ubuntu.com-20120514221302-0l3gjmqpe6xopond
ImportĀ upstreamĀ versionĀ 3.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
 
91
91
#define UNUSED_VALUE  GUINT_TO_POINTER (1)
92
92
 
 
93
EGG_SECURE_DECLARE (data_file);
 
94
 
93
95
/* -----------------------------------------------------------------------------
94
96
 * HELPERS
95
97
 */
643
645
{
644
646
        EggBuffer custom;
645
647
        GkmDataResult res;
646
 
        const gchar *password;
647
 
        gsize n_password;
648
648
        gsize offset;
649
649
 
650
650
        g_assert (GKM_IS_GNOME2_FILE (self));
664
664
        egg_buffer_init_full (&custom, 1024, egg_secure_realloc);
665
665
 
666
666
        /* Decrypt the buffer */
667
 
        password = gkm_secret_get_password (login, &n_password);
668
667
        if (!decrypt_buffer (buffer, &offset, login, &custom)) {
669
668
                egg_buffer_uninit (&custom);
670
669
                return GKM_DATA_FAILURE;
1328
1327
                if (!gkm_gnome2_file_lookup_entry (self, *identifier, NULL))
1329
1328
                        break;
1330
1329
 
1331
 
                if (seed < 1000000) {
 
1330
                if (seed > 1000000) {
1332
1331
                        g_warning ("couldn't find a unique identifier in a %d tries", seed);
1333
1332
                        g_free (base);
1334
1333
                        return GKM_DATA_FAILURE;