Bug 12433 - The lsa session_key test does not cleanup secret objects correctly
Summary: The lsa session_key test does not cleanup secret objects correctly
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: smbtorture (show other bugs)
Version: 4.4.7
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-17 15:24 UTC by Andreas Schneider
Modified: 2016-12-01 10:22 UTC (History)
3 users (show)

See Also:


Attachments
patch for 4.5 (13.13 KB, patch)
2016-11-23 07:24 UTC, Andreas Schneider
jra: review+
Details
patch for 4.4 (13.13 KB, patch)
2016-11-23 07:24 UTC, Andreas Schneider
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2016-11-17 15:24:40 UTC
The lsa session_key test does not cleanup secret objects correctly.

    
    The test is known to be failing if sealing is turned on in some
    circumstances. In this case a secret is created and then the function
    dcerpc_fetch_session_key() fails. The secret is not removed!
    
    We use torturesecret-%08x with random() to fill in the number. Sometimes
    it happens that random() returns a number we already used. So we end up
    trying to create a secret for an entry which already exists and run
    into a collision
    
    This change makes sure we always cleanup behind us and do not leave
    secret objects we created.
Comment 1 Andreas Schneider 2016-11-23 07:24:05 UTC
Created attachment 12687 [details]
patch for 4.5
Comment 2 Andreas Schneider 2016-11-23 07:24:58 UTC
Created attachment 12688 [details]
patch for 4.4
Comment 3 Jeremy Allison 2016-11-28 23:18:47 UTC
Re-assigning to Karolin for inclusion in 4.5.next, 4.4.next.
Comment 4 Karolin Seeger 2016-11-30 08:29:44 UTC
(In reply to Jeremy Allison from comment #3)
Pushed to autobuild-v4-{5,4}-test.
Comment 5 Karolin Seeger 2016-12-01 10:22:47 UTC
(In reply to Karolin Seeger from comment #4)
Pushed to both branches.
Closing out bug report.

Thanks!