The Samba-Bugzilla – Attachment 4972 Details for
Bug 6901
Bad implementation of function dbwrap_change_[u]int32_atomic (in dbwrap_util.c) reduce to "Fatal Error: UID range full!!"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix for v3-4-test (git patchset)
fix-6901-v3-4-test.mbox (text/plain), 2.26 KB, created by
Michael Adam
on 2009-11-20 17:53:49 UTC
(
hide
)
Description:
Fix for v3-4-test (git patchset)
Filename:
MIME Type:
Creator:
Michael Adam
Created:
2009-11-20 17:53:49 UTC
Size:
2.26 KB
patch
obsolete
>From ea3dd7091e1b57f00b7189c1680ab9b07dc8c344 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Sat, 21 Nov 2009 00:21:56 +0100 >Subject: [PATCH] s3:fix endianness bug in dbwrap_change_uint32_atomic() (bug #6901) > >Michael >--- > source3/lib/dbwrap_util.c | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) > >diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c >index 3be3a49..59092f5 100644 >--- a/source3/lib/dbwrap_util.c >+++ b/source3/lib/dbwrap_util.c >@@ -110,7 +110,7 @@ uint32_t dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr, > { > struct db_record *rec; > uint32 val = -1; >- TDB_DATA data; >+ uint32_t v_store; > > if (!(rec = db->fetch_locked(db, NULL, > string_term_tdb_data(keystr)))) { >@@ -128,10 +128,11 @@ uint32_t dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr, > > val += change_val; > >- data.dsize = sizeof(val); >- data.dptr = (uint8 *)&val; >+ SIVAL(&v_store, 0, val); > >- rec->store(rec, data, TDB_REPLACE); >+ rec->store(rec, >+ make_tdb_data((const uint8_t *)&v_store, sizeof(v_store)), >+ TDB_REPLACE); > > TALLOC_FREE(rec); > >-- >1.6.0.4 > > >From 7fbe4e603f2cf28b8c6c7e01290ca41b546a504f Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Sat, 21 Nov 2009 00:23:22 +0100 >Subject: [PATCH] s3:fix endianness bug in dbwrap_change_int32_atomic() (bug #6901) > >Michael >--- > source3/lib/dbwrap_util.c | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) > >diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c >index 59092f5..728eb99 100644 >--- a/source3/lib/dbwrap_util.c >+++ b/source3/lib/dbwrap_util.c >@@ -151,7 +151,7 @@ int32 dbwrap_change_int32_atomic(struct db_context *db, const char *keystr, > { > struct db_record *rec; > int32 val = -1; >- TDB_DATA data; >+ int32_t v_store; > > if (!(rec = db->fetch_locked(db, NULL, > string_term_tdb_data(keystr)))) { >@@ -169,10 +169,11 @@ int32 dbwrap_change_int32_atomic(struct db_context *db, const char *keystr, > > val += change_val; > >- data.dsize = sizeof(val); >- data.dptr = (uint8 *)&val; >+ SIVAL(&v_store, 0, val); > >- rec->store(rec, data, TDB_REPLACE); >+ rec->store(rec, >+ make_tdb_data((const uint8_t *)&v_store, sizeof(v_store)), >+ TDB_REPLACE); > > TALLOC_FREE(rec); > >-- >1.6.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 6901
: 4972