Closed
Bug 129756
Opened 23 years ago
Closed 23 years ago
PK11_SetObjectNickname is broken
Categories
(NSS :: Libraries, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
3.4
People
(Reporter: jamie-bugzilla, Assigned: jamie-bugzilla)
Details
Attachments
(1 file, 2 obsolete files)
|
1.13 KB,
patch
|
rrelyea
:
review+
|
Details | Diff | Splinter Review |
1) It incorrectly sets len = strlen(nickname)-1. It should just set
len=strlen(nickname).
2) It doesn't acquire a read-write session on the slot. So the operation fails
when it tries to set the label on a token object.
I'll attach a patch that addresses these two problems.
| Assignee | ||
Comment 1•23 years ago
|
||
This patch does two things.
1) Sets the length of the attribute correctly to be the strlen() of the
nickname.
2) Obtains a read-write session so it can write to token objects.
| Assignee | ||
Comment 2•23 years ago
|
||
Adding wtc to the CC list.
Bob, can you please review the patch?
Comment 3•23 years ago
|
||
Comment on attachment 73294 [details] [diff] [review]
proposed patch
The PK11_EnterSlotMonitor and PK11_ExitSlotMonitor calls in
this patch are not matched. I guess the PK11_EnterSlotMonitor
call also needs to be deleted?
Attachment #73294 -
Flags: needs-work+
| Assignee | ||
Comment 4•23 years ago
|
||
wtc is right. PK11_GetRWSession should replace PK11_EnterSlotMonitor.
Comment 5•23 years ago
|
||
Comment on attachment 73322 [details] [diff] [review]
remove the EnterSlotMonitor call
This patch still has the extra PK11_ExitSlotMonitor in the error path (which is
really a bug in the original code).
Other than that it is fine.
Attachment #73322 -
Flags: needs-work+
| Assignee | ||
Comment 6•23 years ago
|
||
Doh!
This time, for sure.
Attachment #73294 -
Attachment is obsolete: true
Attachment #73322 -
Attachment is obsolete: true
Comment 7•23 years ago
|
||
Comment on attachment 73607 [details] [diff] [review]
proposed patch
ok r=relyea
Attachment #73607 -
Flags: review+
| Assignee | ||
Comment 8•23 years ago
|
||
Checked in to trunk for NSS 3.4.
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11slot.c,v <-- pk11slot.c
new revision: 1.33; previous revision: 1.32
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•