]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Fix whitespace
authorVolker Lendecke <vl@samba.org>
Mon, 28 Nov 2022 07:35:57 +0000 (08:35 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 14 Dec 2022 04:32:34 +0000 (04:32 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/ldb-samba/ldif_handlers.c
lib/ldb/modules/rdn_name.c
lib/util/util_strlist.c
source3/lib/substitute.c
source3/libads/ldap_schema.c
source3/winbindd/winbindd_misc.c

index 78a433748bbe9f243c52ef9b9f06dc42bd111fe3..fa05168d36acdd6f5a71e3ae67ba0fa4c8bead44 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    ldb database library - ldif handlers for Samba
 
    Copyright (C) Andrew Tridgell 2005
@@ -7,7 +7,7 @@
      ** NOTE! The following LGPL license applies to the ldb
      ** library. This does NOT imply that all of Samba is released
      ** under the LGPL
-   
+
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
@@ -59,7 +59,7 @@ static int ldif_write_NDR(struct ldb_context *ldb, void *mem_ctx,
                return ldb_handler_copy(ldb, mem_ctx, in, out);
        }
        p = talloc_size(mem_ctx, struct_size);
-       err = ndr_pull_struct_blob(in, mem_ctx, 
+       err = ndr_pull_struct_blob(in, mem_ctx,
                                   p, pull_fn);
        if (err != NDR_ERR_SUCCESS) {
                /* fail in not in mask_error mode */
@@ -74,7 +74,7 @@ static int ldif_write_NDR(struct ldb_context *ldb, void *mem_ctx,
        out->data = (uint8_t *)ndr_print_struct_string(mem_ctx, print_fn, "NDR", p);
        talloc_free(p);
        if (out->data == NULL) {
-               return ldb_handler_copy(ldb, mem_ctx, in, out);         
+               return ldb_handler_copy(ldb, mem_ctx, in, out);
        }
        out->length = strlen((char *)out->data);
        return 0;
@@ -95,18 +95,18 @@ static int ldif_read_objectSid(struct ldb_context *ldb, void *mem_ctx,
                char p[in->length+1];
                memcpy(p, in->data, in->length);
                p[in->length] = '\0';
-               
+
                ret = dom_sid_parse(p, &sid);
                if (ret == false) {
                        return -1;
                }
-               
+
                *out = data_blob_talloc(mem_ctx, NULL,
                                        ndr_size_dom_sid(&sid, 0));
                if (out->data == NULL) {
                        return -1;
                }
-       
+
                ndr_err = ndr_push_struct_into_fixed_blob(out, &sid,
                                (ndr_push_flags_fn_t)ndr_push_dom_sid);
                if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -144,7 +144,7 @@ bool ldif_comparision_objectSid_isString(const struct ldb_val *v)
        }
 
        if (strncmp("S-", (const char *)v->data, 2) != 0) return false;
-       
+
        return true;
 }
 
@@ -208,7 +208,7 @@ static int extended_dn_read_SID(struct ldb_context *ldb, void *mem_ctx,
                        return 0;
                }
        }
-       
+
        /* Perhaps not a string after all */
        *out = data_blob_talloc(mem_ctx, NULL, in->length/2+1);
 
@@ -290,13 +290,13 @@ static int extended_dn_read_GUID(struct ldb_context *ldb, void *mem_ctx,
        if (in->length != 32) {
                return -1;
        }
-               
+
        *out = data_blob_talloc(mem_ctx, NULL, in->length/2+1);
-       
+
        if (!out->data) {
                return -1;
        }
-       
+
        (*out).length = strhex_to_str((char *)out->data, out->length,
                                      (const char *)in->data, in->length);
 
@@ -407,12 +407,12 @@ static int ldif_write_ntSecurityDescriptor(struct ldb_context *ldb, void *mem_ct
        enum ndr_err_code ndr_err;
 
        if (ldb_get_flags(ldb) & LDB_FLG_SHOW_BINARY) {
-               return ldif_write_NDR(ldb, mem_ctx, in, out, 
+               return ldif_write_NDR(ldb, mem_ctx, in, out,
                                      sizeof(struct security_descriptor),
                                      (ndr_pull_flags_fn_t)ndr_pull_security_descriptor,
                                      (ndr_print_fn_t)ndr_print_security_descriptor,
                                      true);
-                                     
+
        }
 
        sd = talloc(mem_ctx, struct security_descriptor);
@@ -457,7 +457,7 @@ static int ldif_write_sddlSecurityDescriptor(struct ldb_context *ldb, void *mem_
        return ldb_handler_copy(ldb, mem_ctx, in, out);
 }
 
-/* 
+/*
    canonicalise an objectCategory.  We use the long form as the canonical form:
    'person' becomes cn=Person,cn=Schema,cn=Configuration,<basedn>
 
@@ -588,7 +588,7 @@ static int ldif_read_prefixMap(struct ldb_context *ldb, void *mem_ctx,
 
        /* If this does not parse, then it is probably the text version, and we should try it that way */
        blob->version = PREFIX_MAP_VERSION_DSDB;
-       
+
        string = talloc_strndup(mem_ctx, (const char *)in->data, in->length);
        if (string == NULL) {
                talloc_free(blob);
@@ -612,9 +612,9 @@ static int ldif_read_prefixMap(struct ldb_context *ldb, void *mem_ctx,
                if (line == p) {
                        break;
                }
-               
-               blob->ctr.dsdb.mappings = talloc_realloc(blob, 
-                                                        blob->ctr.dsdb.mappings, 
+
+               blob->ctr.dsdb.mappings = talloc_realloc(blob,
+                                                        blob->ctr.dsdb.mappings,
                                                         struct drsuapi_DsReplicaOIDMapping,
                                                         blob->ctr.dsdb.num_mappings+1);
                if (!blob->ctr.dsdb.mappings) {
@@ -650,7 +650,7 @@ static int ldif_read_prefixMap(struct ldb_context *ldb, void *mem_ctx,
                }
        }
 
-       ndr_err = ndr_push_struct_blob(out, mem_ctx, 
+       ndr_err = ndr_push_struct_blob(out, mem_ctx,
                                       blob,
                                       (ndr_push_flags_fn_t)ndr_push_prefixMapBlob);
        talloc_free(tmp_ctx);
@@ -694,7 +694,7 @@ static int ldif_write_prefixMap(struct ldb_context *ldb, void *mem_ctx,
        if (blob == NULL) {
                return -1;
        }
-       ndr_err = ndr_pull_struct_blob_all(in, blob, 
+       ndr_err = ndr_pull_struct_blob_all(in, blob,
                                           blob,
                                           (ndr_pull_flags_fn_t)ndr_pull_prefixMapBlob);
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -713,7 +713,7 @@ static int ldif_write_prefixMap(struct ldb_context *ldb, void *mem_ctx,
                char *partial_oid = NULL;
 
                if (i > 0) {
-                       string = talloc_asprintf_append(string, ";"); 
+                       string = talloc_asprintf_append(string, ";");
                }
 
                oid_blob = data_blob_const(blob->ctr.dsdb.mappings[i].oid.binary_oid,
@@ -723,7 +723,7 @@ static int ldif_write_prefixMap(struct ldb_context *ldb, void *mem_ctx,
                                  blob->ctr.dsdb.mappings[i].id_prefix));
                        goto failed;
                }
-               string = talloc_asprintf_append(string, "%u:%s", 
+               string = talloc_asprintf_append(string, "%u:%s",
                                                   blob->ctr.dsdb.mappings[i].id_prefix,
                                                   partial_oid);
                talloc_free(discard_const(partial_oid));
@@ -750,7 +750,7 @@ static bool ldif_comparision_prefixMap_isString(const struct ldb_val *v)
        if (IVAL(v->data, 0) == PREFIX_MAP_VERSION_DSDB) {
                return false;
        }
-       
+
        return true;
 }
 
@@ -947,7 +947,7 @@ static int ldif_comparison_int64(struct ldb_context *ldb, void *mem_ctx,
 static int ldif_write_repsFromTo(struct ldb_context *ldb, void *mem_ctx,
                                 const struct ldb_val *in, struct ldb_val *out)
 {
-       return ldif_write_NDR(ldb, mem_ctx, in, out, 
+       return ldif_write_NDR(ldb, mem_ctx, in, out,
                              sizeof(struct repsFromToBlob),
                              (ndr_pull_flags_fn_t)ndr_pull_repsFromToBlob,
                              (ndr_print_fn_t)ndr_print_repsFromToBlob,
@@ -960,7 +960,7 @@ static int ldif_write_repsFromTo(struct ldb_context *ldb, void *mem_ctx,
 static int ldif_write_replPropertyMetaData(struct ldb_context *ldb, void *mem_ctx,
                                           const struct ldb_val *in, struct ldb_val *out)
 {
-       return ldif_write_NDR(ldb, mem_ctx, in, out, 
+       return ldif_write_NDR(ldb, mem_ctx, in, out,
                              sizeof(struct replPropertyMetaDataBlob),
                              (ndr_pull_flags_fn_t)ndr_pull_replPropertyMetaDataBlob,
                              (ndr_print_fn_t)ndr_print_replPropertyMetaDataBlob,
@@ -973,7 +973,7 @@ static int ldif_write_replPropertyMetaData(struct ldb_context *ldb, void *mem_ct
 static int ldif_write_replUpToDateVector(struct ldb_context *ldb, void *mem_ctx,
                                         const struct ldb_val *in, struct ldb_val *out)
 {
-       return ldif_write_NDR(ldb, mem_ctx, in, out, 
+       return ldif_write_NDR(ldb, mem_ctx, in, out,
                              sizeof(struct replUpToDateVectorBlob),
                              (ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob,
                              (ndr_print_fn_t)ndr_print_replUpToDateVectorBlob,
@@ -1314,7 +1314,7 @@ static int samba_syntax_operator_fn(struct ldb_context *ldb, enum ldb_parse_op o
 
 /*
   compare two binary objects.  This is correct for sorting as the sort order is:
-  
+
   a
   aa
   b
@@ -1326,7 +1326,7 @@ static int samba_syntax_operator_fn(struct ldb_context *ldb, enum ldb_parse_op o
   b
   aa
   bb
-  
+
 */
 static int samba_ldb_comparison_binary(struct ldb_context *ldb, void *mem_ctx,
                                       const struct ldb_val *v1, const struct ldb_val *v2)
@@ -1749,7 +1749,7 @@ const struct ldb_schema_syntax *ldb_samba_syntax_by_name(struct ldb_context *ldb
 {
        unsigned int j;
        const struct ldb_schema_syntax *s = NULL;
-       
+
        for (j=0; j < ARRAY_SIZE(samba_syntaxes); j++) {
                if (strcmp(name, samba_syntaxes[j].name) == 0) {
                        s = &samba_syntaxes[j];
@@ -1770,7 +1770,7 @@ const struct ldb_schema_syntax *ldb_samba_syntax_by_lDAPDisplayName(struct ldb_c
                        break;
                }
        }
-       
+
        return s;
 }
 
index 3cb62bf567bd3f96eabb56288c1d9f6cca344759..d90b8a523474e8e5cb3363f4f93541f105ab0d5a 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    ldb database library
 
    Copyright (C) Andrew Bartlett 2005-2009
@@ -7,7 +7,7 @@
      ** NOTE! The following LGPL license applies to the ldb
      ** library. This does NOT imply that all of Samba is released
      ** under the LGPL
-   
+
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
@@ -116,7 +116,7 @@ static int rdn_name_add(struct ldb_module *module, struct ldb_request *req)
        if (rdn_name == NULL) {
                return LDB_ERR_OPERATIONS_ERROR;
        }
-       
+
        rdn_val_p = ldb_dn_get_rdn_val(msg->dn);
        if (rdn_val_p == NULL) {
                return LDB_ERR_OPERATIONS_ERROR;
@@ -176,13 +176,13 @@ static int rdn_name_add(struct ldb_module *module, struct ldb_request *req)
                }
                if (i == attribute->num_values) {
                        char *rdn_errstring = talloc_asprintf(ac,
-                               "RDN mismatch on %s: %s (%.*s) should match one of:", 
-                               ldb_dn_get_linearized(msg->dn), rdn_name, 
+                               "RDN mismatch on %s: %s (%.*s) should match one of:",
+                               ldb_dn_get_linearized(msg->dn), rdn_name,
                                (int)rdn_val.length, (const char *)rdn_val.data);
                        for (i = 0; i < attribute->num_values; i++) {
                                rdn_errstring = talloc_asprintf_append(
                                        rdn_errstring, " (%.*s)",
-                                       (int)attribute->values[i].length, 
+                                       (int)attribute->values[i].length,
                                        (const char *)attribute->values[i].data);
                        }
                        ldb_set_errstring(ldb, rdn_errstring);
index b56e17379cb04c877b2099250990d164b32df4e8..08a23dd60f2d35cfeebf5b9e1f3d1dac5523e2d5 100644 (file)
@@ -1,19 +1,19 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
-   
+
    Copyright (C) Andrew Tridgell 2005
    Copyright (C) Jelmer Vernooij 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/>.
 */
@@ -84,7 +84,7 @@ _PUBLIC_ char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const cha
        while (string && *string) {
                size_t len = strcspn(string, sep);
                char **ret2;
-               
+
                if (len == 0) {
                        string += strspn(string, sep);
                        continue;
@@ -114,7 +114,7 @@ _PUBLIC_ char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const cha
 }
 
 /**
- * build a null terminated list of strings from an argv-like input string 
+ * build a null terminated list of strings from an argv-like input string
  * Entries are separated by spaces and can be enclosed by quotes.
  * Does NOT support escaping
  */
@@ -135,7 +135,7 @@ _PUBLIC_ char **str_list_make_shell(TALLOC_CTX *mem_ctx, const char *string, con
                size_t len = strcspn(string, sep);
                char *element;
                char **ret2;
-               
+
                if (len == 0) {
                        string += strspn(string, sep);
                        continue;
@@ -163,7 +163,7 @@ _PUBLIC_ char **str_list_make_shell(TALLOC_CTX *mem_ctx, const char *string, con
                }
                ret = ret2;
 
-               ret[num_elements] = element;    
+               ret[num_elements] = element;
 
                num_elements++;
        }
@@ -175,13 +175,13 @@ _PUBLIC_ char **str_list_make_shell(TALLOC_CTX *mem_ctx, const char *string, con
 }
 
 /**
- * join a list back to one string 
+ * join a list back to one string
  */
 _PUBLIC_ char *str_list_join(TALLOC_CTX *mem_ctx, const char **list, char separator)
 {
        char *ret = NULL;
        int i;
-       
+
        if (list[0] == NULL)
                return talloc_strdup(mem_ctx, "");
 
@@ -194,25 +194,25 @@ _PUBLIC_ char *str_list_join(TALLOC_CTX *mem_ctx, const char **list, char separa
        return ret;
 }
 
-/** join a list back to one (shell-like) string; entries 
+/** join a list back to one (shell-like) string; entries
  * separated by spaces, using quotes where necessary */
 _PUBLIC_ char *str_list_join_shell(TALLOC_CTX *mem_ctx, const char **list, char sep)
 {
        char *ret = NULL;
        int i;
-       
+
        if (list[0] == NULL)
                return talloc_strdup(mem_ctx, "");
 
-       if (strchr(list[0], ' ') || strlen(list[0]) == 0) 
+       if (strchr(list[0], ' ') || strlen(list[0]) == 0)
                ret = talloc_asprintf(mem_ctx, "\"%s\"", list[0]);
-       else 
+       else
                ret = talloc_strdup(mem_ctx, list[0]);
 
        for (i = 1; list[i]; i++) {
-               if (strchr(list[i], ' ') || strlen(list[i]) == 0) 
+               if (strchr(list[i], ' ') || strlen(list[i]) == 0)
                        ret = talloc_asprintf_append_buffer(ret, "%c\"%s\"", sep, list[i]);
-               else 
+               else
                        ret = talloc_asprintf_append_buffer(ret, "%c%s", sep, list[i]);
        }
 
@@ -240,9 +240,9 @@ _PUBLIC_ char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list)
 
        if (list == NULL)
                return NULL;
-       
+
        ret = talloc_array(mem_ctx, char *, str_list_length(list)+1);
-       if (ret == NULL) 
+       if (ret == NULL)
                return NULL;
 
        for (i=0;list && list[i];i++) {
@@ -263,11 +263,11 @@ _PUBLIC_ bool str_list_equal(const char * const *list1,
                             const char * const *list2)
 {
        int i;
-       
+
        if (list1 == NULL || list2 == NULL) {
-               return (list1 == list2); 
+               return (list1 == list2);
        }
-       
+
        for (i=0;list1[i] && list2[i];i++) {
                if (strcmp(list1[i], list2[i]) != 0) {
                        return false;
@@ -547,9 +547,9 @@ _PUBLIC_ const char **str_list_copy_const(TALLOC_CTX *mem_ctx,
 
        if (list == NULL)
                return NULL;
-       
+
        ret = talloc_array(mem_ctx, const char *, str_list_length(list)+1);
-       if (ret == NULL) 
+       if (ret == NULL)
                return NULL;
 
        for (i=0;list && list[i];i++) {
index 09cf898ddff11f47d5a8b38acc607e76945f3c00..da9101305a83ca30dc5886d90a8a1501f15172bd 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    string substitution functions
    Copyright (C) Andrew Tridgell 1992-2000
@@ -324,7 +324,7 @@ char *talloc_sub_basic(TALLOC_CTX *mem_ctx,
                b = a_string;
 
                switch (*(p+1)) {
-               case 'U' : 
+               case 'U' :
                        r = strlower_talloc(tmp_ctx, smb_name);
                        if (r == NULL) {
                                goto error;
@@ -391,7 +391,7 @@ char *talloc_sub_basic(TALLOC_CTX *mem_ctx,
                        a_string = realloc_string_sub(a_string, "%J", r);
                        break;
                }
-               case 'i': 
+               case 'i':
                        a_string = realloc_string_sub(
                                a_string, "%i",
                                sub_sockaddr[0] ? sub_sockaddr : "0.0.0.0");
@@ -403,12 +403,12 @@ char *talloc_sub_basic(TALLOC_CTX *mem_ctx,
                        a_string = realloc_string_sub(a_string, "%j", r);
                        break;
                }
-               case 'L' : 
+               case 'L' :
                        if ( strncasecmp_m(p, "%LOGONSERVER%", strlen("%LOGONSERVER%")) == 0 ) {
                                break;
                        }
                        if (local_machine_name && *local_machine_name) {
-                               a_string = realloc_string_sub(a_string, "%L", local_machine_name); 
+                               a_string = realloc_string_sub(a_string, "%L", local_machine_name);
                        } else {
                                a_string = realloc_string_sub(a_string, "%L", lp_netbios_name());
                        }
@@ -460,7 +460,7 @@ char *talloc_sub_basic(TALLOC_CTX *mem_ctx,
                        slprintf(vnnstr,sizeof(vnnstr)-1, "%u", get_my_vnn());
                        a_string = realloc_string_sub(a_string, "%V", vnnstr);
                        break;
-               default: 
+               default:
                        break;
                }
 
@@ -516,11 +516,11 @@ char *talloc_sub_specified(TALLOC_CTX *mem_ctx,
                b = a_string;
 
                switch (*(p+1)) {
-               case 'U' : 
+               case 'U' :
                        a_string = talloc_string_sub(
                                tmp_ctx, a_string, "%U", username);
                        break;
-               case 'u' : 
+               case 'u' :
                        a_string = talloc_string_sub(
                                tmp_ctx, a_string, "%u", username);
                        break;
@@ -571,7 +571,7 @@ char *talloc_sub_specified(TALLOC_CTX *mem_ctx,
                        a_string = talloc_string_sub(tmp_ctx, a_string,
                                                     "%N", lp_netbios_name());
                        break;
-               default: 
+               default:
                        break;
                }
 
@@ -627,19 +627,19 @@ char *talloc_sub_advanced(TALLOC_CTX *ctx,
                        TALLOC_FREE(h);
                        break;
                }
-               case 'P': 
-                       a_string = realloc_string_sub(a_string, "%P", connectpath); 
+               case 'P':
+                       a_string = realloc_string_sub(a_string, "%P", connectpath);
                        break;
-               case 'S': 
+               case 'S':
                        a_string = realloc_string_sub(a_string, "%S", servicename);
                        break;
-               case 'g': 
-                       a_string = realloc_string_sub(a_string, "%g", gidtoname(gid)); 
+               case 'g':
+                       a_string = realloc_string_sub(a_string, "%g", gidtoname(gid));
                        break;
-               case 'u': 
-                       a_string = realloc_string_sub(a_string, "%u", user); 
+               case 'u':
+                       a_string = realloc_string_sub(a_string, "%u", user);
                        break;
-               default: 
+               default:
                        break;
                }
 
index d8192e055f23b63cdbb62a52f32a89d8679a4656..85b322c1fe2ca3c5c2fc982455d8f98c3ddece84 100644 (file)
@@ -1,19 +1,19 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    ads (active directory) utility library
    Copyright (C) Guenther Deschner 2005-2007
    Copyright (C) Gerald (Jerry) Carter 2006
-   
+
    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/>.
 */
@@ -40,7 +40,7 @@ static ADS_STATUS ads_get_attrnames_by_oids(ADS_STRUCT *ads,
        char *expr = NULL;
        const char *attrs[] = { "lDAPDisplayName", "attributeId", NULL };
        int i = 0, p = 0;
-       
+
        if (!ads || !mem_ctx || !names || !count || !OIDs || !OIDs_out) {
                return ADS_ERROR(LDAP_PARAM_ERROR);
        }
@@ -55,7 +55,7 @@ static ADS_STATUS ads_get_attrnames_by_oids(ADS_STRUCT *ads,
 
        for (i=0; i<num_OIDs; i++) {
 
-               if ((expr = talloc_asprintf_append_buffer(expr, "(attributeId=%s)", 
+               if ((expr = talloc_asprintf_append_buffer(expr, "(attributeId=%s)",
                                                   OIDs[i])) == NULL) {
                        return ADS_ERROR(LDAP_NO_MEMORY);
                }
@@ -65,7 +65,7 @@ static ADS_STATUS ads_get_attrnames_by_oids(ADS_STRUCT *ads,
                return ADS_ERROR(LDAP_NO_MEMORY);
        }
 
-       status = ads_do_search_retry(ads, schema_path, 
+       status = ads_do_search_retry(ads, schema_path,
                                     LDAP_SCOPE_SUBTREE, expr, attrs, &res);
        if (!ADS_ERR_OK(status)) {
                return status;
@@ -86,12 +86,12 @@ static ADS_STATUS ads_get_attrnames_by_oids(ADS_STRUCT *ads,
                goto out;
        }
 
-       for (msg = ads_first_entry(ads, res); msg != NULL; 
+       for (msg = ads_first_entry(ads, res); msg != NULL;
             msg = ads_next_entry(ads, msg)) {
 
-               (*names)[p]     = ads_pull_string(ads, mem_ctx, msg, 
+               (*names)[p]     = ads_pull_string(ads, mem_ctx, msg,
                                                  "lDAPDisplayName");
-               (*OIDs_out)[p]  = ads_pull_string(ads, mem_ctx, msg, 
+               (*OIDs_out)[p]  = ads_pull_string(ads, mem_ctx, msg,
                                                  "attributeId");
                if (((*names)[p] == NULL) || ((*OIDs_out)[p] == NULL)) {
                        status = ADS_ERROR(LDAP_NO_MEMORY);
@@ -113,9 +113,9 @@ out:
        return status;
 }
 
-const char *ads_get_attrname_by_guid(ADS_STRUCT *ads, 
-                                    const char *schema_path, 
-                                    TALLOC_CTX *mem_ctx, 
+const char *ads_get_attrname_by_guid(ADS_STRUCT *ads,
+                                    const char *schema_path,
+                                    TALLOC_CTX *mem_ctx,
                                     const struct GUID *schema_guid)
 {
        ADS_STATUS rc;
@@ -139,7 +139,7 @@ const char *ads_get_attrname_by_guid(ADS_STRUCT *ads,
                goto done;
        }
 
-       rc = ads_do_search_retry(ads, schema_path, LDAP_SCOPE_SUBTREE, 
+       rc = ads_do_search_retry(ads, schema_path, LDAP_SCOPE_SUBTREE,
                                 expr, attrs, &res);
        if (!ADS_ERR_OK(rc)) {
                goto done;
@@ -155,7 +155,7 @@ const char *ads_get_attrname_by_guid(ADS_STRUCT *ads,
        TALLOC_FREE(guid_bin);
        ads_msgfree(ads, res);
        return result;
-       
+
 }
 
 /*********************************************************************
@@ -194,13 +194,13 @@ ADS_STATUS ads_schema_path(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **schema_p
  * @param enum mapping type
  * @return ADS_STATUS status of search (False if one or more attributes couldn't be
  * found in Active Directory)
- **/ 
+ **/
 ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
                                          ADS_STRUCT *ads,
                                          enum wb_posix_mapping map_type,
-                                         struct posix_schema **s ) 
+                                         struct posix_schema **s )
 {
-       TALLOC_CTX *ctx = NULL; 
+       TALLOC_CTX *ctx = NULL;
        ADS_STATUS status;
        char **oids_out, **names_out;
        size_t num_names;
@@ -232,7 +232,7 @@ ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
        DEBUG(10,("ads_check_posix_schema_mapping for schema mode: %d\n", map_type));
 
        switch (map_type) {
-       
+
                case WB_POSIX_MAP_TEMPLATE:
                case WB_POSIX_MAP_UNIXINFO:
                        DEBUG(10,("ads_check_posix_schema_mapping: nothing to do\n"));
@@ -257,7 +257,7 @@ ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
                TALLOC_FREE( ctx );
                return ADS_ERROR(LDAP_NO_MEMORY);
        }
-       
+
        status = ads_schema_path(ads, ctx, &schema_path);
        if (!ADS_ERR_OK(status)) {
                DEBUG(3,("ads_check_posix_mapping: Unable to retrieve schema DN!\n"));
@@ -266,18 +266,18 @@ ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
 
        switch (map_type) {
                case WB_POSIX_MAP_SFU:
-                       status = ads_get_attrnames_by_oids(ads, ctx, schema_path, oids_sfu, 
-                                                          ARRAY_SIZE(oids_sfu), 
+                       status = ads_get_attrnames_by_oids(ads, ctx, schema_path, oids_sfu,
+                                                          ARRAY_SIZE(oids_sfu),
                                                           &oids_out, &names_out, &num_names);
                        break;
                case WB_POSIX_MAP_SFU20:
-                       status = ads_get_attrnames_by_oids(ads, ctx, schema_path, oids_sfu20, 
-                                                          ARRAY_SIZE(oids_sfu20), 
+                       status = ads_get_attrnames_by_oids(ads, ctx, schema_path, oids_sfu20,
+                                                          ARRAY_SIZE(oids_sfu20),
                                                           &oids_out, &names_out, &num_names);
                        break;
                case WB_POSIX_MAP_RFC2307:
-                       status = ads_get_attrnames_by_oids(ads, ctx, schema_path, oids_rfc2307, 
-                                                          ARRAY_SIZE(oids_rfc2307), 
+                       status = ads_get_attrnames_by_oids(ads, ctx, schema_path, oids_rfc2307,
+                                                          ARRAY_SIZE(oids_rfc2307),
                                                           &oids_out, &names_out, &num_names);
                        break;
                default:
@@ -286,7 +286,7 @@ ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
        }
 
        if (!ADS_ERR_OK(status)) {
-               DEBUG(3,("ads_check_posix_schema_mapping: failed %s\n", 
+               DEBUG(3,("ads_check_posix_schema_mapping: failed %s\n",
                        ads_errstr(status)));
                goto done;
        }
@@ -299,28 +299,28 @@ ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
                    strequal(ADS_ATTR_SFU_UIDNUMBER_OID, oids_out[i]) ||
                    strequal(ADS_ATTR_SFU20_UIDNUMBER_OID, oids_out[i])) {
                        schema->posix_uidnumber_attr = talloc_strdup(schema, names_out[i]);
-                       continue;                      
+                       continue;
                }
 
                if (strequal(ADS_ATTR_RFC2307_GIDNUMBER_OID, oids_out[i]) ||
                    strequal(ADS_ATTR_SFU_GIDNUMBER_OID, oids_out[i]) ||
                    strequal(ADS_ATTR_SFU20_GIDNUMBER_OID, oids_out[i])) {
                        schema->posix_gidnumber_attr = talloc_strdup(schema, names_out[i]);
-                       continue;               
+                       continue;
                }
 
                if (strequal(ADS_ATTR_RFC2307_HOMEDIR_OID, oids_out[i]) ||
                    strequal(ADS_ATTR_SFU_HOMEDIR_OID, oids_out[i]) ||
                    strequal(ADS_ATTR_SFU20_HOMEDIR_OID, oids_out[i])) {
                        schema->posix_homedir_attr = talloc_strdup(schema, names_out[i]);
-                       continue;                       
+                       continue;
                }
 
                if (strequal(ADS_ATTR_RFC2307_SHELL_OID, oids_out[i]) ||
                    strequal(ADS_ATTR_SFU_SHELL_OID, oids_out[i]) ||
                    strequal(ADS_ATTR_SFU20_SHELL_OID, oids_out[i])) {
                        schema->posix_shell_attr = talloc_strdup(schema, names_out[i]);
-                       continue;                       
+                       continue;
                }
 
                if (strequal(ADS_ATTR_RFC2307_GECOS_OID, oids_out[i]) ||
@@ -342,14 +342,14 @@ ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
            !schema->posix_shell_attr ||
            !schema->posix_gecos_attr) {
                status = ADS_ERROR(LDAP_NO_MEMORY);
-               TALLOC_FREE( schema );          
+               TALLOC_FREE( schema );
                goto done;
        }
 
        *s = schema;
-       
+
        status = ADS_ERROR(LDAP_SUCCESS);
-       
+
 done:
        TALLOC_FREE(ctx);
 
index 3155a2224de811ffc33503b2eaf29028fd37bf0f..bed4e4227965f0fecc8f82dac07d98d2e1d98015 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
 
    Winbind daemon - miscellaneous other functions
@@ -228,7 +228,7 @@ bool winbindd_list_trusted_domains(struct winbindd_cli_state *state)
 
        for ( i = 0; i < num_domains; i++ ) {
                struct winbindd_domain *domain;
-               bool is_online = true;          
+               bool is_online = true;
                struct winbindd_tdc_domain *d = NULL;
                char *trust_type = NULL;
                struct dom_sid_buf buf;