s4-test: Remove trailing whitespaces
authorKamen Mazdrashki <kamenim@samba.org>
Mon, 12 Jul 2010 19:04:29 +0000 (22:04 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Mon, 12 Jul 2010 19:04:29 +0000 (22:04 +0300)
source4/torture/rpc/dssync.c

index 49400bc105c2a4642d12ffa45c7e55c2cf1b53db..fb71d392d126c40f40866193cb36e2cffe2baa8e 100644 (file)
@@ -1,21 +1,21 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
 
    DsGetNCChanges replication test
 
    Copyright (C) Stefan (metze) Metzmacher 2005
    Copyright (C) Brad Henry 2005
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -52,7 +52,7 @@ struct DsSyncLDAPInfo {
 
 struct DsSyncTest {
        struct dcerpc_binding *drsuapi_binding;
-       
+
        const char *ldap_url;
        const char *site_name;
        const char *dest_address;
@@ -198,7 +198,7 @@ static bool _test_DsBind(struct torture_context *tctx,
                                       &b->drs_pipe, ctx->drsuapi_binding,
                                       &ndr_table_drsuapi,
                                       credentials, tctx->ev, tctx->lp_ctx);
-       
+
        if (!NT_STATUS_IS_OK(status)) {
                printf("Failed to connect to server as a BDC: %s\n", nt_errstr(status));
                return false;
@@ -248,7 +248,7 @@ static bool _test_DsBind(struct torture_context *tctx,
        return ret;
 }
 
-static bool test_LDAPBind(struct torture_context *tctx, struct DsSyncTest *ctx, 
+static bool test_LDAPBind(struct torture_context *tctx, struct DsSyncTest *ctx,
                          struct cli_credentials *credentials, struct DsSyncLDAPInfo *l)
 {
        bool ret = true;
@@ -289,7 +289,7 @@ static bool test_LDAPBind(struct torture_context *tctx, struct DsSyncTest *ctx,
                talloc_free(ldb);
                torture_assert_int_equal(tctx, ret, LDB_SUCCESS, "Failed to make LDB connection to target");
        }
-       
+
        printf("connected to LDAP: %s\n", ctx->ldap_url);
 
        return true;
@@ -353,7 +353,7 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx)
        }
 
        ctx->domain_dn = r.out.ctr->ctr1->array[0].result_name;
-       
+
        ZERO_STRUCT(search);
        search.in.dest_address = NULL;
        search.in.dest_port = 0;
@@ -364,7 +364,7 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx)
        if (!NT_STATUS_IS_OK(status)) {
                const char *errstr = nt_errstr(status);
                ctx->site_name = talloc_asprintf(ctx, "%s", "Default-First-Site-Name");
-               printf("cldap_netlogon() returned %s. Defaulting to Site-Name: %s\n", errstr, ctx->site_name);          
+               printf("cldap_netlogon() returned %s. Defaulting to Site-Name: %s\n", errstr, ctx->site_name);
        } else {
                ctx->site_name = talloc_steal(ctx, search.out.netlogon.data.nt5_ex.client_site);
                printf("cldap_netlogon() returned Client Site-Name: %s.\n",ctx->site_name);
@@ -382,9 +382,9 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx)
        return ret;
 }
 
-static bool test_analyse_objects(struct torture_context *tctx, 
+static bool test_analyse_objects(struct torture_context *tctx,
                                 struct DsSyncTest *ctx,
-                                const char *partition, 
+                                const char *partition,
                                 const struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr,
                                 uint32_t object_count,
                                 const struct drsuapi_DsReplicaObjectListItemEx *first_object,
@@ -400,7 +400,7 @@ static bool test_analyse_objects(struct torture_context *tctx,
        struct dsdb_extended_replicated_objects *objs;
        struct ldb_extended_dn_control *extended_dn_ctrl;
        const char *err_msg;
-       
+
        if (!dsdb_get_schema(ldb, NULL)) {
                struct dsdb_schema *ldap_schema;
                struct ldb_result *a_res;
@@ -446,7 +446,7 @@ static bool test_analyse_objects(struct torture_context *tctx,
                                                               "dsdb_attribute_from_ldb() failed for: %s",
                                                               ldb_dn_get_linearized(a_res->msgs[i]->dn)));
                }
-               
+
                for (i=0; i < c_res->count; i++) {
                        status = dsdb_class_from_ldb(ldap_schema, c_res->msgs[i]);
                        torture_assert_werr_ok(tctx, status,
@@ -468,8 +468,8 @@ static bool test_analyse_objects(struct torture_context *tctx,
                                                          mapping_ctr,
                                                          object_count,
                                                          first_object,
-                                                         0, NULL, 
-                                                         NULL, NULL, 
+                                                         0, NULL,
+                                                         NULL, NULL,
                                                          gensec_skey,
                                                          ctx, &objs);
        torture_assert_werr_ok(tctx, status, "dsdb_extended_replicated_objects_convert() failed!");
@@ -479,7 +479,7 @@ static bool test_analyse_objects(struct torture_context *tctx,
 
        deleted_dn = ldb_dn_new(objs, ldb, partition);
        ldb_dn_add_child_fmt(deleted_dn, "CN=Deleted Objects");
-               
+
        for (i=0; i < object_count; i++) {
                struct ldb_request *search_req;
                struct ldb_result *res;
@@ -493,7 +493,7 @@ static bool test_analyse_objects(struct torture_context *tctx,
                if (!res) {
                        return LDB_ERR_OPERATIONS_ERROR;
                }
-               ret = ldb_build_search_req(&search_req, ldb, objs, 
+               ret = ldb_build_search_req(&search_req, ldb, objs,
                                           objs->objects[i].msg->dn,
                                           LDB_SCOPE_BASE,
                                           NULL,
@@ -530,7 +530,7 @@ static bool test_analyse_objects(struct torture_context *tctx,
                for (j=0; j < ldap_msg->num_elements; j++) {
                        ldap_msg->elements[j].flags = LDB_FLAG_MOD_ADD;
                        /* For unknown reasons, there is no nTSecurityDescriptor on cn=deleted objects over LDAP, but there is over DRS!  Skip it on both transports for now here so */
-                       if ((ldb_attr_cmp(ldap_msg->elements[j].name, "nTSecurityDescriptor") == 0) && 
+                       if ((ldb_attr_cmp(ldap_msg->elements[j].name, "nTSecurityDescriptor") == 0) &&
                            (ldb_dn_compare(ldap_msg->dn, deleted_dn) == 0)) {
                                ldb_msg_remove_element(ldap_msg, &ldap_msg->elements[j]);
                                /* Don't skip one */
@@ -546,9 +546,9 @@ static bool test_analyse_objects(struct torture_context *tctx,
                                ldb_msg_remove_element(drs_msg, &drs_msg->elements[j]);
                                /* Don't skip one */
                                j--;
-                               
+
                                /* For unknown reasons, there is no nTSecurityDescriptor on cn=deleted objects over LDAP, but there is over DRS! */
-                       } else if ((ldb_attr_cmp(drs_msg->elements[j].name, "nTSecurityDescriptor") == 0) && 
+                       } else if ((ldb_attr_cmp(drs_msg->elements[j].name, "nTSecurityDescriptor") == 0) &&
                                   (ldb_dn_compare(drs_msg->dn, deleted_dn) == 0)) {
                                ldb_msg_remove_element(drs_msg, &drs_msg->elements[j]);
                                /* Don't skip one */
@@ -573,8 +573,8 @@ static bool test_analyse_objects(struct torture_context *tctx,
                                drs_msg->elements[j].flags = LDB_FLAG_MOD_ADD;
                        }
                }
-               
-               
+
+
                new_msg = ldb_msg_diff(ldb, drs_msg, ldap_msg);
                talloc_steal(search_req, new_msg);
                if (new_msg->num_elements != 0) {
@@ -602,7 +602,7 @@ static bool test_analyse_objects(struct torture_context *tctx,
 
        if (!lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "print_pwd_blobs", false)) {
                talloc_free(objs);
-               return true;    
+               return true;
        }
 
        save_values_dir = lp_parm_string(tctx->lp_ctx, NULL, "dssync", "save_pwd_blobs_dir");
@@ -808,7 +808,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
                case 5:
                        nc.guid = null_guid;
                        nc.sid  = null_sid;
-                       nc.dn   = partition; 
+                       nc.dn   = partition;
 
                        r.in.req                                        = &req;
                        r.in.req->req5.destination_dsa_guid             = ctx->new_dc.invocation_id;
@@ -839,7 +839,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
                case 8:
                        nc.guid = null_guid;
                        nc.sid  = null_sid;
-                       nc.dn   = partition; 
+                       nc.dn   = partition;
                        /* nc.dn can be set to any other ad partition */
 
                        r.in.req                                        = &req;
@@ -874,7 +874,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
 
                        break;
                }
-               
+
                printf("Dumping AD partition: %s\n", nc.dn);
                for (y=0; ;y++) {
                        uint32_t _level = 0;
@@ -921,7 +921,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
                                                ctr1->new_highwatermark.tmp_highest_usn,
                                                ctr1->new_highwatermark.highest_usn);
 
-                               if (!test_analyse_objects(tctx, ctx, partition, &ctr1->mapping_ctr,  ctr1->object_count, 
+                               if (!test_analyse_objects(tctx, ctx, partition, &ctr1->mapping_ctr,  ctr1->object_count,
                                                          ctr1->first_object, &gensec_skey)) {
                                        return false;
                                }
@@ -956,7 +956,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
                                                ctr6->new_highwatermark.tmp_highest_usn,
                                                ctr6->new_highwatermark.highest_usn);
 
-                               if (!test_analyse_objects(tctx, ctx, partition, &ctr6->mapping_ctr,  ctr6->object_count, 
+                               if (!test_analyse_objects(tctx, ctx, partition, &ctr6->mapping_ctr,  ctr6->object_count,
                                                          ctr6->first_object, &gensec_skey)) {
                                        return false;
                                }
@@ -974,7 +974,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
        return ret;
 }
 
-static bool test_FetchNT4Data(struct torture_context *tctx, 
+static bool test_FetchNT4Data(struct torture_context *tctx,
                              struct DsSyncTest *ctx)
 {
        NTSTATUS status;