[SCM] Samba Shared Repository - branch master updated -
da683d6a73a37d18aa8fca52ef2b4837c7ff1345
Jeremy Allison
jra at samba.org
Thu Nov 20 00:49:45 GMT 2008
The branch, master has been updated
via da683d6a73a37d18aa8fca52ef2b4837c7ff1345 (commit)
via bc070b1c14a4405a7bf2b63f434503397d1d73e4 (commit)
via 804e63909bc3c9e4e2ca67f67eb56a1422f85fba (commit)
via 31a8c4df1305b63729e49a61e27bc9e1825af0d0 (commit)
from 54e832c171e7763483a5ad872b23c89496477767 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit da683d6a73a37d18aa8fca52ef2b4837c7ff1345
Author: Jeremy Allison <jra at samba.org>
Date: Wed Nov 19 16:49:03 2008 -0800
This code mixes up int and uint32 when pulling out of a TDB. This is very bad. Fixing... May fix bug #5891, not sure.
Jeremy.
commit bc070b1c14a4405a7bf2b63f434503397d1d73e4
Merge: 804e63909bc3c9e4e2ca67f67eb56a1422f85fba 54e832c171e7763483a5ad872b23c89496477767
Author: Jeremy Allison <jra at samba.org>
Date: Wed Nov 19 16:36:59 2008 -0800
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
commit 804e63909bc3c9e4e2ca67f67eb56a1422f85fba
Merge: 31a8c4df1305b63729e49a61e27bc9e1825af0d0 f9d691d9d808ec2f91f3f469fe2201b0909a8552
Author: Jeremy Allison <jra at samba.org>
Date: Wed Nov 19 15:06:05 2008 -0800
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
commit 31a8c4df1305b63729e49a61e27bc9e1825af0d0
Author: Jeremy Allison <jra at samba.org>
Date: Wed Nov 19 14:51:55 2008 -0800
Fix build farm breakage.
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_acl_xattr.c | 2 +-
source3/rpc_server/srv_eventlog_lib.c | 42 +++++++++++++++++---------------
source3/rpc_server/srv_eventlog_nt.c | 8 +++---
3 files changed, 27 insertions(+), 25 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c
index e0d0ef1..c28ba83 100644
--- a/source3/modules/vfs_acl_xattr.c
+++ b/source3/modules/vfs_acl_xattr.c
@@ -714,7 +714,7 @@ static vfs_op_tuple skel_op_tuples[] =
/* POSIX ACL operations. */
{SMB_VFS_OP(sys_acl_set_file_xattr), SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(sys__acl_set_fd_xattr), SMB_VFS_OP_SYS_ACL_SET_FD, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(sys_acl_set_fd_xattr), SMB_VFS_OP_SYS_ACL_SET_FD, SMB_VFS_LAYER_TRANSPARENT},
/* POSIX ACL operations. */
{SMB_VFS_OP(sys_acl_set_file_xattr), SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_LAYER_TRANSPARENT},
diff --git a/source3/rpc_server/srv_eventlog_lib.c b/source3/rpc_server/srv_eventlog_lib.c
index 9215a86..c4a7828 100644
--- a/source3/rpc_server/srv_eventlog_lib.c
+++ b/source3/rpc_server/srv_eventlog_lib.c
@@ -140,13 +140,13 @@ int elog_tdb_size( TDB_CONTEXT * tdb, int *MaxSize, int *Retention )
return True if we made enough room to accommodate needed bytes
********************************************************************/
-static bool make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed,
+static bool make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32_t needed,
bool whack_by_date )
{
- int start_record, i, new_start;
- int end_record;
- int nbytes, reclen, len, Retention, MaxSize;
- int tresv1, trecnum, timegen, timewr;
+ int32_t start_record, i, new_start;
+ int32_t end_record;
+ int32_t reclen, tresv1, trecnum, timegen, timewr;
+ int nbytes, len, Retention, MaxSize;
TDB_DATA key, ret;
time_t current_time, exp_time;
@@ -173,16 +173,17 @@ static bool make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed,
nbytes = 0;
DEBUG( 3,
- ( "MaxSize [%d] Retention [%d] Current Time [%d] exp_time [%d]\n",
- MaxSize, Retention, (uint32)current_time, (uint32)exp_time ) );
+ ( "MaxSize [%d] Retention [%d] Current Time [%u] exp_time [%u]\n",
+ MaxSize, Retention, (unsigned int)current_time, (unsigned int)exp_time ) );
DEBUG( 3,
- ( "Start Record [%d] End Record [%d]\n", start_record,
- end_record ) );
+ ( "Start Record [%u] End Record [%u]\n",
+ (unsigned int)start_record,
+ (unsigned int)end_record ));
for ( i = start_record; i < end_record; i++ ) {
/* read a record, add the amt to nbytes */
- key.dsize = sizeof( int32 );
- key.dptr = ( uint8 * ) ( int32 * ) & i;
+ key.dsize = sizeof(int32_t);
+ key.dptr = (unsigned char *)&i;
ret = tdb_fetch( the_tdb, key );
if ( ret.dsize == 0 ) {
DEBUG( 8,
@@ -198,12 +199,13 @@ static bool make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed,
if (len == -1) {
DEBUG( 10,("make_way_for_eventlogs: tdb_unpack failed.\n"));
tdb_unlock_bystring( the_tdb, EVT_NEXT_RECORD );
+ SAFE_FREE( ret.dptr );
return False;
}
DEBUG( 8,
- ( "read record %d, record size is [%d], total so far [%d]\n",
- i, reclen, nbytes ) );
+ ( "read record %u, record size is [%d], total so far [%d]\n",
+ (unsigned int)i, reclen, nbytes ) );
SAFE_FREE( ret.dptr );
@@ -220,14 +222,14 @@ static bool make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed,
}
DEBUG( 3,
- ( "nbytes [%d] needed [%d] start_record is [%d], should be set to [%d]\n",
- nbytes, needed, start_record, i ) );
+ ( "nbytes [%d] needed [%d] start_record is [%u], should be set to [%u]\n",
+ nbytes, needed, (unsigned int)start_record, (unsigned int)i ) );
/* todo - remove eventlog entries here and set starting record to start_record... */
new_start = i;
if ( start_record != new_start ) {
for ( i = start_record; i < new_start; i++ ) {
- key.dsize = sizeof( int32 );
- key.dptr = ( uint8 * ) ( int32 * ) & i;
+ key.dsize = sizeof(int32_t);
+ key.dptr = (unsigned char *)&i;
tdb_delete( the_tdb, key );
}
@@ -267,7 +269,7 @@ bool prune_eventlog( TDB_CONTEXT * tdb )
/********************************************************************
********************************************************************/
-bool can_write_to_eventlog( TDB_CONTEXT * tdb, int32 needed )
+bool can_write_to_eventlog( TDB_CONTEXT * tdb, int32_t needed )
{
int calcd_size;
int MaxSize, Retention;
@@ -313,7 +315,7 @@ bool can_write_to_eventlog( TDB_CONTEXT * tdb, int32 needed )
ELOG_TDB *elog_open_tdb( char *logname, bool force_clear )
{
TDB_CONTEXT *tdb = NULL;
- uint32 vers_id;
+ uint32_t vers_id;
ELOG_TDB *ptr;
char *tdbpath = NULL;
ELOG_TDB *tdb_node = NULL;
@@ -454,7 +456,7 @@ int write_eventlog_tdb( TDB_CONTEXT * the_tdb, Eventlog_entry * ee )
uint8 *packed_ee;
TALLOC_CTX *mem_ctx = NULL;
TDB_DATA kbuf, ebuf;
- uint32 n_packed;
+ uint32_t n_packed;
if ( !ee )
return 0;
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c
index eec5b1d..de2bafc 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -290,8 +290,8 @@ static Eventlog_entry *get_eventlog_record(prs_struct *ps,
Eventlog_entry *ee = NULL;
TDB_DATA ret, key;
- int srecno;
- int reclen;
+ int32_t srecno;
+ int32_t reclen;
int len;
char *wpsource = NULL;
@@ -300,10 +300,10 @@ static Eventlog_entry *get_eventlog_record(prs_struct *ps,
char *wpstrs = NULL;
char *puserdata = NULL;
- key.dsize = sizeof(int32);
+ key.dsize = sizeof(int32_t);
srecno = recno;
- key.dptr = ( uint8 * ) &srecno;
+ key.dptr = (unsigned char *)&srecno;
ret = tdb_fetch( tdb, key );
--
Samba Shared Repository
More information about the samba-cvs
mailing list