The branch, v3-2-test has been updated
via e489f3d988feafe35b486b31a9e60c2399e6a6e7 (commit)
via fcd35232e111f9b046ae35d939d08c29d0d43438 (commit)
from c4f7bee9238db536a7d5215cebb0bf37f757dfad (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit e489f3d988feafe35b486b31a9e60c2399e6a6e7
Author: Michael Adam <[EMAIL PROTECTED]>
Date: Wed Apr 23 14:55:51 2008 +0200
winbindd_cache: simplify logic in new key length check for UA keys.
This reduces indentation by combining common code paths,
and wraps long lines.
Holger: sorry, I could not resist. I think it is much easier to
understand what is going on when we only have one check and
determine the max allowed key length in advance.
Michael
commit fcd35232e111f9b046ae35d939d08c29d0d43438
Author: Holger Hetterich <[EMAIL PROTECTED]>
Date: Fri Apr 11 14:02:19 2008 +0200
winbindd_cache: recognize and allow longer UA keys
UA keys consist of a potientally large number of concatenated SID strings
which
can grow much larger than 1024 bytes in complex environments. We catch
those keys
and allow them exclusivly to be larger.
-----------------------------------------------------------------------
Summary of changes:
source/winbindd/winbindd_cache.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/winbindd/winbindd_cache.c b/source/winbindd/winbindd_cache.c
index ddb0ab3..0203381 100644
--- a/source/winbindd/winbindd_cache.c
+++ b/source/winbindd/winbindd_cache.c
@@ -3348,12 +3348,17 @@ struct key_val_struct {
static int cache_traverse_validate_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf,
TDB_DATA dbuf, void *state)
{
int i;
+ unsigned int max_key_len = 1024;
struct tdb_validation_status *v_state = (struct tdb_validation_status
*)state;
/* Paranoia check. */
- if (kbuf.dsize > 1024) {
- DEBUG(0,("cache_traverse_validate_fn: key length too large (%u)
> 1024\n\n",
- (unsigned int)kbuf.dsize ));
+ if (strncmp("UA/", (const char *)kbuf.dptr, 3) == 0) {
+ max_key_len = 1024 * 1024;
+ }
+ if (kbuf.dsize > max_key_len) {
+ DEBUG(0, ("cache_traverse_validate_fn: key length too large: "
+ "(%u) > (%u)\n\n",
+ (unsigned int)kbuf.dsize, (unsigned int)max_key_len));
return 1;
}
--
Samba Shared Repository