The Samba-Bugzilla – Attachment 3389 Details for
Bug 5512
Panic with 3.2.0rc1 on Solaris10/ADDomainMember
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-Fix-alignment-problems-on-sparc.patch (text/plain), 4.25 KB, created by
Volker Lendecke
on 2008-07-04 03:47:38 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2008-07-04 03:47:38 UTC
Size:
4.25 KB
patch
obsolete
>From 8dc31f66c0c2cdf319720678bf32d184b1f343dd Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Fri, 4 Jul 2008 09:28:04 +0200 >Subject: [PATCH] Fix alignment problems on sparc > >--- > source/locking/locking.c | 39 ++++++++++++++++++++------------------- > 1 files changed, 20 insertions(+), 19 deletions(-) > >diff --git a/source/locking/locking.c b/source/locking/locking.c >index accd3f7..ca61a88 100644 >--- a/source/locking/locking.c >+++ b/source/locking/locking.c >@@ -493,19 +493,19 @@ static void print_share_mode_table(struct locking_data *data) > > static bool parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck) > { >- struct locking_data *data; >+ struct locking_data data; > int i; > > if (dbuf.dsize < sizeof(struct locking_data)) { > smb_panic("parse_share_modes: buffer too short"); > } > >- data = (struct locking_data *)dbuf.dptr; >+ memcpy(&data, dbuf.dptr, sizeof(data)); > >- lck->delete_on_close = data->u.s.delete_on_close; >- lck->old_write_time = data->u.s.old_write_time; >- lck->changed_write_time = data->u.s.changed_write_time; >- lck->num_share_modes = data->u.s.num_share_mode_entries; >+ lck->delete_on_close = data.u.s.delete_on_close; >+ lck->old_write_time = data.u.s.old_write_time; >+ lck->changed_write_time = data.u.s.changed_write_time; >+ lck->num_share_modes = data.u.s.num_share_mode_entries; > > DEBUG(10, ("parse_share_modes: delete_on_close: %d, owrt: %s, " > "cwrt: %s, tok: %u, num_share_modes: %d\n", >@@ -515,7 +515,7 @@ static bool parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck) > timestring(debug_ctx(), > convert_timespec_to_time_t( > lck->changed_write_time)), >- (unsigned int)data->u.s.delete_token_size, >+ (unsigned int)data.u.s.delete_token_size, > lck->num_share_modes)); > > if ((lck->num_share_modes < 0) || (lck->num_share_modes > 1000000)) { >@@ -535,7 +535,8 @@ static bool parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck) > } > > lck->share_modes = (struct share_mode_entry *) >- TALLOC_MEMDUP(lck, dbuf.dptr+sizeof(*data), >+ TALLOC_MEMDUP(lck, >+ dbuf.dptr+sizeof(struct locking_data), > lck->num_share_modes * > sizeof(struct share_mode_entry)); > >@@ -545,15 +546,15 @@ static bool parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck) > } > > /* Get any delete token. */ >- if (data->u.s.delete_token_size) { >- uint8 *p = dbuf.dptr + sizeof(*data) + >+ if (data.u.s.delete_token_size) { >+ uint8 *p = dbuf.dptr + sizeof(struct locking_data) + > (lck->num_share_modes * > sizeof(struct share_mode_entry)); > >- if ((data->u.s.delete_token_size < sizeof(uid_t) + sizeof(gid_t)) || >- ((data->u.s.delete_token_size - sizeof(uid_t)) % sizeof(gid_t)) != 0) { >+ if ((data.u.s.delete_token_size < sizeof(uid_t) + sizeof(gid_t)) || >+ ((data.u.s.delete_token_size - sizeof(uid_t)) % sizeof(gid_t)) != 0) { > DEBUG(0, ("parse_share_modes: invalid token size %d\n", >- data->u.s.delete_token_size)); >+ data.u.s.delete_token_size)); > smb_panic("parse_share_modes: invalid token size"); > } > >@@ -569,8 +570,8 @@ static bool parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck) > p += sizeof(gid_t); > > /* Any supplementary groups ? */ >- lck->delete_token->ngroups = (data->u.s.delete_token_size > (sizeof(uid_t) + sizeof(gid_t))) ? >- ((data->u.s.delete_token_size - >+ lck->delete_token->ngroups = (data.u.s.delete_token_size > (sizeof(uid_t) + sizeof(gid_t))) ? >+ ((data.u.s.delete_token_size - > (sizeof(uid_t) + sizeof(gid_t)))/sizeof(gid_t)) : 0; > > if (lck->delete_token->ngroups) { >@@ -592,13 +593,13 @@ static bool parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck) > } > > /* Save off the associated service path and filename. */ >- lck->servicepath = (const char *)dbuf.dptr + sizeof(*data) + >+ lck->servicepath = (const char *)dbuf.dptr + sizeof(struct locking_data) + > (lck->num_share_modes * sizeof(struct share_mode_entry)) + >- data->u.s.delete_token_size; >+ data.u.s.delete_token_size; > >- lck->filename = (const char *)dbuf.dptr + sizeof(*data) + >+ lck->filename = (const char *)dbuf.dptr + sizeof(struct locking_data) + > (lck->num_share_modes * sizeof(struct share_mode_entry)) + >- data->u.s.delete_token_size + >+ data.u.s.delete_token_size + > strlen(lck->servicepath) + 1; > > /* >-- >1.5.3.6 >
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
Actions:
View
Attachments on
bug 5512
:
3382
| 3389 |
3392
|
3393
|
3867