s4-schema: allow revision numbers of zero
authorAndrew Tridgell <tridge@samba.org>
Wed, 21 Apr 2010 01:34:24 +0000 (11:34 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 21 Apr 2010 03:35:56 +0000 (13:35 +1000)
w2k8r2 sends a revision of zero in the initial schema replication
during a net vampire

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/dsdb/schema/schema_info_attr.c

index 165184739cbde822e24c8f0dfc3ecd8e47be7de8..132c72a376654b6e50a28e6416d4b80ef48ead78 100644 (file)
@@ -68,17 +68,14 @@ WERROR dsdb_schema_info_from_blob(const DATA_BLOB *blob,
                return ntstatus_to_werror(nt_status);
        }
 
-       /* revision must be not less than 1 */
-       if (schema_info_blob.revision < 1) {
-               talloc_free(temp_ctx);
-               return WERR_INVALID_PARAMETER;
-       }
-
        schema_info = talloc(mem_ctx, struct dsdb_schema_info);
        if (!schema_info) {
                talloc_free(temp_ctx);
                return WERR_NOMEM;
        }
+
+       /* note that we accept revision numbers of zero now - w2k8r2
+          sends a revision of zero on initial vampire */
        schema_info->revision      = schema_info_blob.revision;
        schema_info->invocation_id = schema_info_blob.invocation_id;
        *_schema_info = schema_info;