~ubuntu-branches/ubuntu/precise/xulrunner-1.9/precise

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/pk11wrap/pk11slot.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabien Tassin, Sasa Bodiroza, Fabien Tassin, Alexander Sack
  • Date: 2008-09-02 11:54:00 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20080902115400-yfy26crvszpalvg5
Tags: 1.9.0.2+build3+nobinonly-0ubuntu1
[ Sasa Bodiroza ]
* In debian/rules:
  - Set 644 chmod to png files (LP: #252793) [Patch by Paolo Naldini]

[ Fabien Tassin ]
* improve create-build-system.sh to detect build-tree directory
  when embedded tarball is used. Fix un-escaped variables.
  Create build-system.tar.gz in the debian directory to prevent
  cdbs to check and unpack it during the build
  - update debian/create-build-system.sh
* Fix variables when an embedded tarball is used
  - update debian/rules
* Fix buffer overflow in realpath() at runtime and drop -U_FORTIFY_SOURCE
  from CPPFLAGS (LP: #263014)
  - add debian/patches/bz412610_att335369_realpath_overflow.patch
  - update debian/patches/series

[ Alexander Sack <asac@jwsdot.com> ]
* introduce preferred plugins by mime-type experimental feature;
  you can now set a pref to explicitly select a plugin to serve a particilar
  mime-type; patch contains further documentation.
  - add debian/patches/bzXXX_plugin_for_mimetype_pref.patch
  - update debian/patches/series
* drop patches applied upstream
  - drop bz120380_att326044.patch (fixed by bz442629)
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
1081
1081
    CK_RV crv;
1082
1082
    char *tmp;
1083
1083
    SECStatus rv;
 
1084
    PRStatus status;
1084
1085
 
1085
1086
    /* set the slot flags to the current token values */
1086
1087
    if (!slot->isThreadSafe) PK11_EnterSlotMonitor(slot);
1177
1178
        if (!slot->isThreadSafe) PK11_ExitSlotMonitor(slot);
1178
1179
    }
1179
1180
 
1180
 
    nssToken_Refresh(slot->nssToken);
 
1181
    status = nssToken_Refresh(slot->nssToken);
 
1182
    if (status != PR_SUCCESS)
 
1183
        return SECFailure;
1181
1184
 
1182
1185
    if (!(slot->isInternal) && (slot->hasRandom)) {
1183
1186
        /* if this slot has a random number generater, use it to add entropy
1209
1212
            PK11_ExitSlotMonitor(int_slot);
1210
1213
            if (crv == CKR_OK) {
1211
1214
                PK11_EnterSlotMonitor(slot);
1212
 
                PK11_GETTAB(slot)->C_SeedRandom(slot->session,
 
1215
                crv = PK11_GETTAB(slot)->C_SeedRandom(slot->session,
1213
1216
                                        random_bytes, sizeof(random_bytes));
1214
1217
                PK11_ExitSlotMonitor(slot);
1215
1218
            }
1995
1998
            }
1996
1999
        }
1997
2000
    }
1998
 
    if (freeit) { PK11_FreeSlotList(list); }
 
2001
    if (le) 
 
2002
        PK11_FreeSlotListElement(list, le);
 
2003
    if (freeit) 
 
2004
        PK11_FreeSlotList(list);
1999
2005
    return keyLength;
2000
2006
}
2001
2007