Merge branch 'master' of ssh://git.samba.org/data/git/samba
authorJelmer Vernooij <jelmer@samba.org>
Mon, 13 Oct 2008 14:30:40 +0000 (16:30 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 13 Oct 2008 14:30:40 +0000 (16:30 +0200)
lib/util/tests/data_blob.c
source3/librpc/gen_ndr/misc.h
source3/librpc/gen_ndr/ndr_misc.c
source3/librpc/idl/misc.idl

index e0be7a404680de3a1b8d34753eaa5c591fe2f903..875e5fdef8ef12b6825c8a3bf0b4ae93622395db 100644 (file)
@@ -32,6 +32,16 @@ static bool test_string(struct torture_context *tctx)
        return true;
 }
 
+static bool test_string_null(struct torture_context *tctx)
+{
+       DATA_BLOB blob = data_blob_string_const_null("bla");    
+
+       torture_assert_int_equal(tctx, blob.length, 4, "blob length");
+       torture_assert_str_equal(tctx, (char *)blob.data, "bla", "blob data");
+
+       return true;
+}
+
 static bool test_zero(struct torture_context *tctx)
 {
        int i;
@@ -77,6 +87,7 @@ struct torture_suite *torture_local_util_data_blob(TALLOC_CTX *mem_ctx)
        struct torture_suite *suite = torture_suite_create(mem_ctx, "DATABLOB");
 
        torture_suite_add_simple_test(suite, "string", test_string);
+       torture_suite_add_simple_test(suite, "string_null", test_string_null);
        torture_suite_add_simple_test(suite, "zero", test_zero);;
        torture_suite_add_simple_test(suite, "clear", test_clear);
        torture_suite_add_simple_test(suite, "cmp", test_cmp);
index 4fa7415db71cd02a9e28522ce0de8e2b3f861f59..b3740faf34e26671cae2b2a07dbb3c0f6a46344f 100644 (file)
@@ -26,13 +26,17 @@ struct policy_handle {
 enum netr_SchannelType
 #ifndef USE_UINT_ENUMS
  {
+       SEC_CHAN_NULL=0,
        SEC_CHAN_WKSTA=2,
+       SEC_CHAN_DNS_DOMAIN=3,
        SEC_CHAN_DOMAIN=4,
        SEC_CHAN_BDC=6
 }
 #else
  { __donnot_use_enum_netr_SchannelType=0x7FFFFFFF}
+#define SEC_CHAN_NULL ( 0 )
 #define SEC_CHAN_WKSTA ( 2 )
+#define SEC_CHAN_DNS_DOMAIN ( 3 )
 #define SEC_CHAN_DOMAIN ( 4 )
 #define SEC_CHAN_BDC ( 6 )
 #endif
index 56105d499f5f2b3ab732f00b855e3d94ad98dd2f..22c416a0d7975fc8f942fbaeb3cb3a03132ad24b 100644 (file)
@@ -123,7 +123,9 @@ _PUBLIC_ void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *nam
        const char *val = NULL;
 
        switch (r) {
+               case SEC_CHAN_NULL: val = "SEC_CHAN_NULL"; break;
                case SEC_CHAN_WKSTA: val = "SEC_CHAN_WKSTA"; break;
+               case SEC_CHAN_DNS_DOMAIN: val = "SEC_CHAN_DNS_DOMAIN"; break;
                case SEC_CHAN_DOMAIN: val = "SEC_CHAN_DOMAIN"; break;
                case SEC_CHAN_BDC: val = "SEC_CHAN_BDC"; break;
        }
index 132a81f138399b4c010fc0cdd5d60596f958120c..ff548fe804f60aacb5cad21c8f85c6b1ba8bae01 100644 (file)
@@ -30,9 +30,11 @@ interface misc
        /* Only SEC_CHAN_WKSTA can forward requests to other domains. */
 
        typedef [public] enum {
-               SEC_CHAN_WKSTA   = 2,
-               SEC_CHAN_DOMAIN  = 4,
-               SEC_CHAN_BDC     = 6
+               SEC_CHAN_NULL        = 0,
+               SEC_CHAN_WKSTA       = 2,
+               SEC_CHAN_DNS_DOMAIN  = 3,
+               SEC_CHAN_DOMAIN      = 4,
+               SEC_CHAN_BDC         = 6
        } netr_SchannelType;
 
        /* SAM database types */
@@ -48,4 +50,5 @@ interface misc
                SAMR_REJECT_IN_HISTORY = 2,
                SAMR_REJECT_COMPLEXITY = 5
        } samr_RejectReason;
+
 }