Closed
Bug 105209
Opened 24 years ago
Closed 19 years ago
NSS_Init functions won't return error even if the Cert database files are not readable
Categories
(NSS :: Libraries, defect, P2)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
4.0
People
(Reporter: Kirankumar.Arnepalli, Assigned: julien.pierre)
Details
NSS_Initialize() and NSS_Init() function won't return error when the Cert db
files are not readable. Even if the Cert db file is not present, these functions
won't return error, but they always return SECSuccess.
This bug could be related to bug#105188, but i am not whether both of them
are same.
Comment 1•24 years ago
|
||
Assigned the bug to Bob.
Are you using the tip of NSS? Only NSS developers should
use the tip of NSS. NSS users should use a certified
release, such as NSS_3_3_1_RTM.
Assignee: wtc → relyea
| Reporter | ||
Comment 2•24 years ago
|
||
We're using NSS_3_3_RTM.
Comment 3•24 years ago
|
||
OK, what parameters are you using for NSS_Initialize()? Also, is your directory
read/write? (It's a mystery because I'm pretty sure we tested this in 3.3. I
know the code is supposed to error out on failures).
bob
| Reporter | ||
Comment 4•24 years ago
|
||
we're calling some thins like this.
NSS_Initialize(secmodpath, dbprefix, dbprefix, "secmod.db", NSS_INIT_RE
ADONLY);
The directory is read/write. But i have removed read/write permissions for
the cert7.db file in that directory. In this case it would give a SECSuccess.
Comment 5•24 years ago
|
||
Oh, the files exist, they just aren't readable. That one I'm pretty sure we
haven't tested. Moving to NEW.
bob
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 6•24 years ago
|
||
Any idea what is the difference between the following two calls?
when i look at nss.h it does not say about 0 as being passed as flags parameter.
NSS_Initialize(secmodpath, dbprefix, dbprefix, "secmod.db", NSS_INIT_RE
ADONLY);
NSS_Initialize(secmodpath, dbprefix, dbprefix, "secmod.db", 0);
Comment 7•24 years ago
|
||
NSS_Initialize takes 4 flags:
READONLY - databases are open readonly
NOCERTDB - don't open the cert and key databases, just open the temparary database
NOMODDB - don't read secmod.db, just initialize the internal module.
FORCEOPEN - if you fail to open the cert and key databases, fallback to the
NOCERTDB or NOMODDB modes and keep going.
0 means none of these flags are set (databases are openned rw, cert key and
modutil databases are openned and read, if the databases cannot be openned or
created, fail).
NOTE: if you open databases r/w and the databases do not exist, NSS will create them
Comment 9•24 years ago
|
||
Changed the QA contact to Bishakha.
QA Contact: sonja.mirtitsch → bishakhabanerjee
Updated•21 years ago
|
QA Contact: bishakhabanerjee → jason.m.reid
Updated•20 years ago
|
QA Contact: jason.m.reid → libraries
| Assignee | ||
Updated•19 years ago
|
Assignee: rrelyea → julien.pierre.boogz
| Assignee | ||
Comment 10•19 years ago
|
||
I tested this against the trunk, setting the permissions to 0 with chmod on cert8.db . I ran certutil -L with initializes NSS read-only. I got an error as expected. Same if the files are missing. Marking WORKSFORME.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•