~zulcss/ubuntu/lucid/likewise-open/likewise-open-sru

« back to all changes in this revision

Viewing changes to packaging/debian/patches/ua_cache_valid.patch

  • Committer: Bazaar Package Importer
  • Author(s): Rick Clark
  • Date: 2008-08-27 08:56:20 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080827085620-5q0f58b9qtog9myq
Tags: 4.1.0.2956-0ubuntu1
* missing-likewise-logo.diff: removed
* fixed copyright notice
* updated Standards-Version to 3.8.0
* removed path from command in prerm
* removed stop in S runlevel

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: samba/source/winbindd/winbindd_cache.c
 
2
===================================================================
 
3
--- a/samba/source/winbindd/winbindd_cache.c    (revision 27109)
 
4
+++ b/samba/source/winbindd/winbindd_cache.c    (working copy)
 
5
@@ -3582,12 +3582,17 @@
 
6
 static int cache_traverse_validate_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *state)
 
7
 {
 
8
        int i;
 
9
+       unsigned int max_key_len = 1024;
 
10
        struct tdb_validation_status *v_state = (struct tdb_validation_status *)state;
 
11
 
 
12
        /* Paranoia check. */
 
13
-       if (kbuf.dsize > 1024) {
 
14
-               DEBUG(0,("cache_traverse_validate_fn: key length too large (%u) > 1024\n\n",
 
15
-                               (unsigned int)kbuf.dsize ));
 
16
+       if (strncmp("UA/", (const char *)kbuf.dptr, 3) == 0) {
 
17
+               max_key_len = 1024 * 1024;
 
18
+       }
 
19
+       if (kbuf.dsize > max_key_len) {
 
20
+               DEBUG(0, ("cache_traverse_validate_fn: key length too large: "
 
21
+                         "(%u) > (%u)\n\n",
 
22
+                         (unsigned int)kbuf.dsize, (unsigned int)max_key_len));
 
23
                return 1;
 
24
        }
 
25