Bug 6901 - Bad implementation of function dbwrap_change_[u]int32_atomic (in dbwrap_util.c) reduce to "Fatal Error: UID range full!!"
Summary: Bad implementation of function dbwrap_change_[u]int32_atomic (in dbwrap_util....
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: Winbind (show other bugs)
Version: unspecified
Hardware: Sparc Solaris
: P3 critical
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
: 6884 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-11-18 02:09 UTC by Michael Isaev
Modified: 2013-02-18 13:30 UTC (History)
2 users (show)

See Also:


Attachments
Fix for v3-4-test (git patchset) (2.26 KB, patch)
2009-11-20 17:53 UTC, Michael Adam
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Isaev 2009-11-18 02:09:11 UTC
# uname -rpmi
5.10 sun4u sparc SUNW,UltraAX-i2

I have "clean" samba installation (configured and installed from sources as usual).
After logon samba to domain and first run winbindd I see in log.winbindd-idmap:
...
Fatal Error: UID range full!! (max: 20000)
...
Fatal Error: GID range full!! (max: 20000)
...

This errors because in function dbwrap_change_int32_atomic/dbwrap_change_uint32_atomic (file dbwrap_util.c) don't using "byteorder" for new stored values!

Why you using simple assigment:
data.dptr = (uint8 *)&val;
instead byteorder implementation (as in dbwrap_store_[u]int32):
SIVAL(&v_store, 0, v);

This error exist in all versions 3.4.x
Comment 1 Michael Adam 2009-11-20 17:52:26 UTC
Thanks for your bug report!

(In reply to comment #0)
> # uname -rpmi
> 5.10 sun4u sparc SUNW,UltraAX-i2
> 
> This errors because in function
> dbwrap_change_int32_atomic/dbwrap_change_uint32_atomic (file dbwrap_util.c)
> don't using "byteorder" for new stored values!
> 
> Why you using simple assigment:
> data.dptr = (uint8 *)&val;
> instead byteorder implementation (as in dbwrap_store_[u]int32):
> SIVAL(&v_store, 0, v);

This is simply an oversight. Thanks for spotting this.
I have pushed a fix to branches master and v3-5-test.

Next, I'll attach the fix for v3-4-test for review.

Cheers - Michael

Comment 2 Michael Adam 2009-11-20 17:53:49 UTC
Created attachment 4972 [details]
Fix for v3-4-test (git patchset)

I guess this should be in 3.4.4.
Comment 3 Michael Adam 2009-11-20 18:29:41 UTC
*** Bug 6884 has been marked as a duplicate of this bug. ***
Comment 4 Volker Lendecke 2009-11-21 06:57:46 UTC
Comment on attachment 4972 [details]
Fix for v3-4-test (git patchset)

Looks good, thanks.
Comment 5 Karolin Seeger 2009-11-23 02:01:27 UTC
Pushed to v3-4-test.
Closing out bug report.

Thanks!