Bug 7578 - 'net idmap restore' fails to set HWM, causing duplicates
Summary: 'net idmap restore' fails to set HWM, causing duplicates
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Winbind (show other bugs)
Version: 3.5.4
Hardware: Other Linux
: P3 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2010-07-20 21:15 UTC by Justin Maggard
Modified: 2010-07-28 03:52 UTC (History)
1 user (show)

See Also:

smb.conf (1.79 KB, text/plain)
2010-07-21 15:43 UTC, Justin Maggard
no flags Details
diff to git master (446 bytes, patch)
2010-07-26 19:40 UTC, Justin Maggard
no flags Details
Revised patch for master. (576 bytes, patch)
2010-07-27 01:38 UTC, Jeremy Allison
vl: review-
Patch (875 bytes, patch)
2010-07-27 03:09 UTC, Volker Lendecke
jra: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Maggard 2010-07-20 21:15:53 UTC
Restoring a idmap dump ('net idmap restore') created from 'net idmap dump' with Samba 3.5.x results in these error messages:


Since the HWM doesn't get set, the tdb allocator ends up allocating previously-assigned UIDs and GIDs when new accounts are used.
Comment 1 Michael Adam 2010-07-21 01:50:16 UTC
Hi Justin,

Thanks for you bug report.
Could you please add your smb.conf ?

Thanks - Michael
Comment 2 Justin Maggard 2010-07-21 15:43:46 UTC
Created attachment 5858 [details]
Comment 3 Justin Maggard 2010-07-26 19:40:00 UTC
Created attachment 5870 [details]
diff to git master

I was able to track down the problem.  _wbint_SetHWM() was switching on an uninitialized value.  The attached patch fixes it for me.  It applies to 3.5.x and master.  I don't think it's relevant for 3.4.x.
Comment 4 Jeremy Allison 2010-07-27 01:33:11 UTC
Thanks Justin ! Sorry for you having to fix your own bug, but much appreciated :-).

I'll review this asap and ensure it gets pushed where needed.


Comment 5 Jeremy Allison 2010-07-27 01:38:43 UTC
Created attachment 5871 [details]
Revised patch for master.

Hi Justin, I actually think there are two typos here. Can you check this revised patch and I'll push if you ok it.
Comment 6 Volker Lendecke 2010-07-27 01:47:04 UTC
Ok, I already pushed the first piece, sorry. Jeremy, go ahead, your bug.

Comment 7 Jeremy Allison 2010-07-27 02:25:11 UTC
Comment on attachment 5871 [details]
Revised patch for master.

Well as you've already looked at it Volker, will you review for 3.5.5 and re-assign to Karolin if you're ok with this ?


Comment 8 Volker Lendecke 2010-07-27 03:06:48 UTC
Comment on attachment 5871 [details]
Revised patch for master.

Give it a nack. To me this does not look like a "git format-patch" style patch. I will upload one next.
Comment 9 Jeremy Allison 2010-07-27 03:09:23 UTC
Didn't know that was now a requirement :-). I'll update my internal procedures accordingly... :-)


Comment 10 Volker Lendecke 2010-07-27 03:09:28 UTC
Created attachment 5872 [details]

Jeremy, it is a lot easier for Karolin to apply a patch if it is generated by "git format-patch" instead of "git diff". For your convenience, I am uploading pretty much the same content of the patch that this replaces in "git format-patch" format. If you want to review it for correctness, feel free to do so and re-assign to Karolin for inclusion.
Comment 11 Jeremy Allison 2010-07-27 03:10:26 UTC
Comment on attachment 5872 [details]

+1 from me.
Comment 12 Volker Lendecke 2010-07-27 03:12:17 UTC
Well, it might not be a requirement, but I *try* to be as nice to our Release Manager as possible. And "git am -3" is simpler than "patch -p1; git commit -a --author= -m <invent-a-checkin-message>". At least *I* think that the step to invent a checkin message should be done by the patch author and not by Karolin. But we can certainly discuss this. If you see that as the duty of Karolin, then fine.

Comment 13 Jeremy Allison 2010-07-27 03:12:42 UTC
Re-assigning to Karolin for inclusion in 3.5.x.
Comment 14 Jeremy Allison 2010-07-27 03:13:53 UTC
vl - no I'm not arguing. I simply take the path of least resistance, and this is what I always *used* to do with svn. I will update my practices accordingly. I agree with you that this should be the patch submitters job, not Karolins.

Comment 15 Justin Maggard 2010-07-27 18:39:58 UTC
It still works fine for me with the second part of the patch, so we're good from my perspective.
Comment 16 Karolin Seeger 2010-07-28 03:52:16 UTC
Pushed to v3-5-test.
Closing out bug report.