Use common strlist implementation in Samba 3 and Samba 4.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 11 Oct 2008 22:56:56 +0000 (00:56 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 11 Oct 2008 22:56:56 +0000 (00:56 +0200)
23 files changed:
lib/util/tests/strlist.c
lib/util/util.h
lib/util/util_strlist.c
libcli/nbt/namerefresh.c
libcli/nbt/nameregister.c
source3/Makefile.in
source3/auth/auth.c
source3/include/proto.h
source3/lib/util_str.c
source3/libads/ldap.c
source3/rpc_server/srv_svcctl_nt.c
source3/smbd/password.c
source4/auth/sam.c
source4/client/client.c
source4/dsdb/common/util.c
source4/libcli/resolve/wins.c
source4/libnet/libnet_lookup.c
source4/nbt_server/wins/winsclient.c
source4/param/generic.c
source4/param/loadparm.c
source4/rpc_server/remote/dcesrv_remote.c
source4/torture/nbt/wins.c
source4/winbind/wb_samba3_cmd.c

index 9af26f9e71efebff9f9b3b87d8599dbe99459263..86051029548e18eb498fd2c9b54723545d59a9a7 100644 (file)
@@ -71,17 +71,17 @@ static bool test_list_copy(struct torture_context *tctx)
        const char *empty_list[] = { NULL };
        const char **null_list = NULL;
 
-       result = str_list_copy(tctx, list);
+       result = (const char **)str_list_copy(tctx, list);
        torture_assert_int_equal(tctx, str_list_length(result), 2, "list length");
        torture_assert_str_equal(tctx, result[0], "foo", "element 0");
        torture_assert_str_equal(tctx, result[1], "bar", "element 1");
        torture_assert_str_equal(tctx, result[2], NULL, "element 2");
 
-       result = str_list_copy(tctx, empty_list);
+       result = (const char **)str_list_copy(tctx, empty_list);
        torture_assert_int_equal(tctx, str_list_length(result), 0, "list length");
        torture_assert_str_equal(tctx, result[0], NULL, "element 0");
 
-       result = str_list_copy(tctx, null_list);
+       result = (const char **)str_list_copy(tctx, null_list);
        torture_assert(tctx, result == NULL, "result NULL");
        
        return true;
index 861b6affe54d7355340da60e2f611123fcbe54f9..5cecad7350187ed5bdb1d7163453824c5d8d60b1 100644 (file)
 #ifndef _SAMBA_UTIL_H_
 #define _SAMBA_UTIL_H_
 
+#include "lib/charset/charset.h"
 #include "../lib/util/attr.h"
 
-#include "charset/charset.h"
-
 /* for TALLOC_CTX */
 #include <talloc.h>
 
@@ -452,7 +451,7 @@ _PUBLIC_ bool strequal(const char *s1, const char *s2);
   separator list. The separator list must contain characters less than
   or equal to 0x2f for this to work correctly on multi-byte strings
 */
-_PUBLIC_ const char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
+_PUBLIC_ char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
 
 /**
  * build a null terminated list of strings from an argv-like input string 
@@ -473,12 +472,12 @@ _PUBLIC_ char *str_list_join_shell(TALLOC_CTX *mem_ctx, const char **list, char
 /**
   return the number of elements in a string list
 */
-_PUBLIC_ size_t str_list_length(const char **list);
+_PUBLIC_ size_t str_list_length(const char * const *list);
 
 /**
   copy a string list
 */
-_PUBLIC_ const char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list);
+_PUBLIC_ char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list);
 
 /**
    Return true if all the elements of the list match exactly.
index 30de4b962dffe1963d64156e14e379c110af414a..f576024cd18fa2bcf138819857ec52436b29583e 100644 (file)
@@ -21,6 +21,8 @@
 #include "includes.h"
 #include "system/locale.h"
 
+#undef strcasecmp
+
 /**
  * @file
  * @brief String list manipulation
   separator list. The separator list must contain characters less than
   or equal to 0x2f for this to work correctly on multi-byte strings
 */
-_PUBLIC_ const char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep)
+_PUBLIC_ char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep)
 {
        int num_elements = 0;
-       const char **ret = NULL;
+       char **ret = NULL;
 
        if (sep == NULL) {
                sep = LIST_SEP;
        }
 
-       ret = talloc_array(mem_ctx, const char *, 1);
+       ret = talloc_array(mem_ctx, char *, 1);
        if (ret == NULL) {
                return NULL;
        }
 
        while (string && *string) {
                size_t len = strcspn(string, sep);
-               const char **ret2;
+               char **ret2;
                
                if (len == 0) {
                        string += strspn(string, sep);
                        continue;
                }
 
-               ret2 = talloc_realloc(mem_ctx, ret, const char *, num_elements+2);
+               ret2 = talloc_realloc(mem_ctx, ret, char *, num_elements+2);
                if (ret2 == NULL) {
                        talloc_free(ret);
                        return NULL;
@@ -196,15 +198,15 @@ _PUBLIC_ size_t str_list_length(const char **list)
 /**
   copy a string list
 */
-_PUBLIC_ const char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list)
+_PUBLIC_ char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list)
 {
        int i;
-       const char **ret;
+       char **ret;
 
        if (list == NULL)
                return NULL;
        
-       ret = talloc_array(mem_ctx, const char *, str_list_length(list)+1);
+       ret = talloc_array(mem_ctx, char *, str_list_length(list)+1);
        if (ret == NULL) 
                return NULL;
 
index 37bf0fc8f121a4af0e75ae3b0c0105953a809c0a..77f9cbd45c39c908e35ee8d5421bd31102612b47 100644 (file)
@@ -234,11 +234,11 @@ _PUBLIC_ struct composite_context *nbt_name_refresh_wins_send(struct nbt_name_so
        if (state->io == NULL) goto failed;
 
        state->wins_port = io->in.wins_port;
-       state->wins_servers = str_list_copy(state, io->in.wins_servers);
+       state->wins_servers = (const char **)str_list_copy(state, io->in.wins_servers);
        if (state->wins_servers == NULL ||
            state->wins_servers[0] == NULL) goto failed;
 
-       state->addresses = str_list_copy(state, io->in.addresses);
+       state->addresses = (const char **)str_list_copy(state, io->in.addresses);
        if (state->addresses == NULL ||
            state->addresses[0] == NULL) goto failed;
 
index d4728a8e021d3e693de37da044d24f9a941e3404..d9e616feccb816dc07923def29fc8df186988a4d 100644 (file)
@@ -372,11 +372,11 @@ _PUBLIC_ struct composite_context *nbt_name_register_wins_send(struct nbt_name_s
        if (state->io == NULL) goto failed;
 
        state->wins_port = io->in.wins_port;
-       state->wins_servers = str_list_copy(state, io->in.wins_servers);
+       state->wins_servers = (const char **)str_list_copy(state, io->in.wins_servers);
        if (state->wins_servers == NULL ||
            state->wins_servers[0] == NULL) goto failed;
 
-       state->addresses = str_list_copy(state, io->in.addresses);
+       state->addresses = (const char **)str_list_copy(state, io->in.addresses);
        if (state->addresses == NULL ||
            state->addresses[0] == NULL) goto failed;
 
index 52dcbfb9396d330f4eeb7124781e75d858559412..65a9ca42e45d7856cd20c44ce0e1005a3ad10a30 100644 (file)
@@ -323,8 +323,8 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) \
          ../lib/util/time.o \
          lib/ufc.o lib/genrand.o lib/username.o \
          lib/util_pw.o lib/access.o lib/smbrun.o \
-         lib/bitmap.o ../lib/crypto/crc32.o lib/dprintf.o \
-         ../lib/util/xfile.o lib/wins_srv.o $(UTIL_REG_OBJ) \
+         lib/bitmap.o ../lib/crypto/crc32.o lib/dprintf.o $(UTIL_REG_OBJ) \
+         ../lib/util/xfile.o ../lib/util/util_strlist.o lib/wins_srv.o \
          lib/util_str.o lib/clobber.o lib/util_sid.o lib/util_uuid.o \
          lib/util_unistr.o lib/util_file.o lib/data_blob.o \
          lib/util.o lib/util_sock.o lib/sock_exec.o lib/util_sec.o \
index 754cb7a508073308fe67b92d57275ead5fafca5b..7f95656befd7d8abcdaa453456374b3317a4d386 100644 (file)
@@ -459,8 +459,8 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
        NTSTATUS nt_status;
 
        if (lp_auth_methods()
-           && !str_list_copy(talloc_tos(), &auth_method_list,
-                             lp_auth_methods())) {
+           && !(auth_method_list = str_list_copy(talloc_tos(), 
+                             lp_auth_methods()))) {
                return NT_STATUS_NO_MEMORY;
        }
 
index d4b9e67caadc781bd7f361f49729824b8bd09191..34db104905d1c9c149152f0fa931193f59098e8f 100644 (file)
@@ -1672,9 +1672,9 @@ char *binary_string_rfc2254(char *buf, int len);
 char *binary_string(char *buf, int len);
 int fstr_sprintf(fstring s, const char *fmt, ...);
 char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
-bool str_list_copy(TALLOC_CTX *mem_ctx, char ***dest, const char **src);
+char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list);
 bool str_list_compare(char **list1, char **list2);
-int str_list_count( const char **list );
+size_t str_list_length( const char **list );
 bool str_list_sub_basic( char **list, const char *smb_name,
                         const char *domain_name );
 bool str_list_substitute(char **list, const char *pattern, const char *insert);
index 9f952abf1010c6440fceb1f23552ddd03e466526..b0a7cb072df14b95504b4d47265232b742240a04 100644 (file)
@@ -1843,97 +1843,6 @@ int fstr_sprintf(fstring s, const char *fmt, ...)
 
 #define S_LIST_ABS 16 /* List Allocation Block Size */
 
-char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep)
-{
-       char **list;
-       const char *str;
-       char *s;
-       int num, lsize;
-       char *tok;
-
-       if (!string || !*string)
-               return NULL;
-
-       list = TALLOC_ARRAY(mem_ctx, char *, S_LIST_ABS+1);
-       if (list == NULL) {
-               return NULL;
-       }
-       lsize = S_LIST_ABS;
-
-       s = talloc_strdup(list, string);
-       if (s == NULL) {
-               DEBUG(0,("str_list_make: Unable to allocate memory"));
-               TALLOC_FREE(list);
-               return NULL;
-       }
-       if (!sep) sep = LIST_SEP;
-
-       num = 0;
-       str = s;
-
-       while (next_token_talloc(list, &str, &tok, sep)) {
-
-               if (num == lsize) {
-                       char **tmp;
-
-                       lsize += S_LIST_ABS;
-
-                       tmp = TALLOC_REALLOC_ARRAY(mem_ctx, list, char *,
-                                                  lsize + 1);
-                       if (tmp == NULL) {
-                               DEBUG(0,("str_list_make: "
-                                       "Unable to allocate memory"));
-                               TALLOC_FREE(list);
-                               return NULL;
-                       }
-
-                       list = tmp;
-
-                       memset (&list[num], 0,
-                               ((sizeof(char**)) * (S_LIST_ABS +1)));
-               }
-
-               list[num] = tok;
-               num += 1;
-       }
-
-       list[num] = NULL;
-
-       TALLOC_FREE(s);
-       return list;
-}
-
-bool str_list_copy(TALLOC_CTX *mem_ctx, char ***dest, const char **src)
-{
-       char **list;
-       int i, num;
-
-       *dest = NULL;
-       if (!src)
-               return false;
-
-       num = 0;
-       while (src[num] != NULL) {
-               num += 1;
-       }
-
-       list = TALLOC_ARRAY(mem_ctx, char *, num+1);
-       if (list == NULL) {
-               return false;
-       }
-
-       for (i=0; i<num; i++) {
-               list[i] = talloc_strdup(list, src[i]);
-               if (list[i] == NULL) {
-                       TALLOC_FREE(list);
-                       return false;
-               }
-       }
-       list[i] = NULL;
-       *dest = list;
-       return true;
-}
-
 /**
  * Return true if all the elements of the list match exactly.
  **/
@@ -1956,22 +1865,6 @@ bool str_list_compare(char **list1, char **list2)
        return true;
 }
 
-/******************************************************************************
- *****************************************************************************/
-
-int str_list_count( const char **list )
-{
-       int i = 0;
-
-       if ( ! list )
-               return 0;
-
-       /* count the number of list members */
-
-       for ( i=0; *list; i++, list++ );
-
-       return i;
-}
 
 /******************************************************************************
  version of standard_sub_basic() for string lists; uses talloc_sub_basic()
index 40f052281ddf28e8cf02c5030279a723d2355395..e78465f7da91bc4a8541b1073df63b74e182c674 100644 (file)
@@ -832,7 +832,7 @@ static ADS_STATUS ads_do_paged_search_args(ADS_STRUCT *ads,
        else {
                /* This would be the utf8-encoded version...*/
                /* if (!(search_attrs = ads_push_strvals(ctx, attrs))) */
-               if (!(str_list_copy(talloc_tos(), &search_attrs, attrs))) {
+               if (!(search_attrs = str_list_copy(talloc_tos(), attrs))) {
                        rc = LDAP_NO_MEMORY;
                        goto done;
                }
@@ -1144,7 +1144,7 @@ ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
        else {
                /* This would be the utf8-encoded version...*/
                /* if (!(search_attrs = ads_push_strvals(ctx, attrs)))  */
-               if (!(str_list_copy(talloc_tos(), &search_attrs, attrs)))
+               if (!(search_attrs = str_list_copy(talloc_tos(), attrs)))
                {
                        DEBUG(1,("ads_do_search: str_list_copy() failed!"));
                        rc = LDAP_NO_MEMORY;
index a57d0ff4a4f914135762f690ec8d0846e2cb692d..1caf4941a4cbec02b9d11c7dad4119096d17c5be 100644 (file)
@@ -61,7 +61,7 @@ static const struct generic_mapping svc_generic_map =
 bool init_service_op_table( void )
 {
        const char **service_list = lp_svcctl_list();
-       int num_services = SVCCTL_NUM_INTERNAL_SERVICES + str_list_count( service_list );
+       int num_services = SVCCTL_NUM_INTERNAL_SERVICES + str_list_length( service_list );
        int i;
 
        if ( !(svcctl_ops = TALLOC_ARRAY( NULL, struct service_control_op, num_services+1)) ) {
index 1d3514429f33d5c74d3aae06dc12b93b5c841b97..88e7b766beda625b4d22a1bfb5771ad6a2d39810 100644 (file)
@@ -545,7 +545,7 @@ static bool user_ok(const char *user, int snum)
        ret = True;
 
        if (lp_invalid_users(snum)) {
-               str_list_copy(talloc_tos(), &invalid, lp_invalid_users(snum));
+               invalid = str_list_copy(talloc_tos(), lp_invalid_users(snum));
                if (invalid &&
                    str_list_substitute(invalid, "%S", lp_servicename(snum))) {
 
@@ -561,7 +561,7 @@ static bool user_ok(const char *user, int snum)
        TALLOC_FREE(invalid);
 
        if (ret && lp_valid_users(snum)) {
-               str_list_copy(talloc_tos(), &valid, lp_valid_users(snum));
+               valid = str_list_copy(talloc_tos(), lp_valid_users(snum));
                if ( valid &&
                     str_list_substitute(valid, "%S", lp_servicename(snum)) ) {
 
index 19ddc7cb74b923e92403eef13af180830ceaa741..d04a254d6c87512d9b62d262a4ce947feb5de107 100644 (file)
@@ -207,7 +207,7 @@ _PUBLIC_ NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
        if (logon_workstation && workstation_list && *workstation_list) {
                bool invalid_ws = true;
                int i;
-               const char **workstations = str_list_make(mem_ctx, workstation_list, ",");
+               const char **workstations = (const char **)str_list_make(mem_ctx, workstation_list, ",");
                
                for (i = 0; workstations && workstations[i]; i++) {
                        DEBUG(10,("sam_account_ok: checking for workstation match '%s' and '%s'\n",
index 3523c4d2748c7452703e5145a95771e1f697a33d..3213c8931ff33ac0d1aac88decbe8a1f468b3dc0 100644 (file)
@@ -2754,7 +2754,7 @@ process a -c command string
 ****************************************************************************/
 static int process_command_string(struct smbclient_context *ctx, const char *cmd)
 {
-       const char **lines;
+       char **lines;
        int i, rc = 0;
 
        lines = str_list_make(NULL, cmd, ";");
index 21e6781d79a032b0e9b8724da53b2380fa5206fb..5b93efb316b88927777bcb59544bd2fb6b86b004 100644 (file)
@@ -1912,7 +1912,7 @@ struct ldb_dn *samdb_dns_domain_to_dn(struct ldb_context *ldb, TALLOC_CTX *mem_c
                return NULL;
        }
        
-       split_realm = str_list_make(tmp_ctx, dns_domain, ".");
+       split_realm = (const char **)str_list_make(tmp_ctx, dns_domain, ".");
        if (!split_realm) {
                talloc_free(tmp_ctx);
                return NULL;
index ebce9b98bdc37f755afce1d5962f200d96e1eaa8..f787d52d3135614580d681d326cff85144cf2591 100644 (file)
@@ -79,7 +79,7 @@ NTSTATUS resolve_name_wins(struct nbt_name *name,
 bool resolve_context_add_wins_method(struct resolve_context *ctx, const char **address_list, struct interface *ifaces, uint16_t nbt_port, int nbt_timeout)
 {
        struct resolve_wins_data *wins_data = talloc(ctx, struct resolve_wins_data);
-       wins_data->address_list = str_list_copy(wins_data, address_list);
+       wins_data->address_list = (const char **)str_list_copy(wins_data, address_list);
        wins_data->ifaces = talloc_reference(wins_data, ifaces);
        wins_data->nbt_port = nbt_port;
        wins_data->nbt_timeout = nbt_timeout;
index cab4d9e73f76173fa48c21a6cb53e08c40e2dbeb..dc54ec3cf1b51fcfd6206b8d3713a20c4706fddd 100644 (file)
@@ -129,7 +129,7 @@ NTSTATUS libnet_Lookup_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
        if (NT_STATUS_IS_OK(status)) {
                s = talloc_get_type(c->private_data, struct lookup_state);
 
-               io->out.address = str_list_make(mem_ctx, s->address, NULL);
+               io->out.address = (const char **)str_list_make(mem_ctx, s->address, NULL);
                NT_STATUS_HAVE_NO_MEMORY(io->out.address);
        }
 
index 1d07f4a60aaff28ebe12a8591f3b7d5a8f270a14..133592f1fd42d3e97c207c4dd5681684da455c99 100644 (file)
@@ -140,7 +140,7 @@ static void nbtd_wins_refresh(struct event_context *ev, struct timed_event *te,
 
        /* setup a wins name refresh request */
        io.in.name            = iname->name;
-       io.in.wins_servers    = str_list_make(tmp_ctx, iname->wins_server, NULL);
+       io.in.wins_servers    = (const char **)str_list_make(tmp_ctx, iname->wins_server, NULL);
        io.in.wins_port       = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
        io.in.addresses       = nbtd_address_list(iface, tmp_ctx);
        io.in.nb_flags        = iname->nb_flags;
index 80735d2a3384921b59635844c4a7e76bf855d3be..ed3045605db6b3ef43e81e3ad4f93c5b0bd9ed07 100644 (file)
@@ -130,7 +130,7 @@ const char **param_get_string_list(struct param_context *ctx, const char *param,
        if (separator == NULL)
                separator = LIST_SEP;
        
-       return str_list_make(ctx, p->value, separator);
+       return (const char **)str_list_make(ctx, p->value, separator);
 }
 
 int param_set_string_list(struct param_context *ctx, const char *param, const char **list, const char *section)
index dbc4776bd8c3cdf73f674843885e5dcb0f61a196..e626cdf5ddd91a5616e032d7260cd6f604c8f025 100644 (file)
@@ -885,7 +885,7 @@ const char **lp_parm_string_list(TALLOC_CTX *mem_ctx,
        const char *value = lp_get_parametric(lp_ctx, service, type, option);
 
        if (value != NULL)
-               return str_list_make(mem_ctx, value, separator);
+               return (const char **)str_list_make(mem_ctx, value, separator);
 
        return NULL;
 }
@@ -1299,7 +1299,7 @@ static void copy_service(struct loadparm_service *pserviceDest,
                                        strupper(*(char **)dest_ptr);
                                        break;
                                case P_LIST:
-                                       *(const char ***)dest_ptr = str_list_copy(pserviceDest, 
+                                       *(const char ***)dest_ptr = (const char **)str_list_copy(pserviceDest, 
                                                                                  *(const char ***)src_ptr);
                                        break;
                                default:
@@ -1653,7 +1653,7 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr,
                }
 
                case P_LIST:
-                       *(const char ***)parm_ptr = str_list_make(mem_ctx,
+                       *(const char ***)parm_ptr = (const char **)str_list_make(mem_ctx,
                                                                  pszParmValue, NULL);
                        break;
 
index cd32160d88957d1c1f8d46325c587fac3a5ef223..3cf8fbe8fb074e7891bda39daf8dd9463184d37f 100644 (file)
@@ -225,7 +225,7 @@ static NTSTATUS remote_register_one_iface(struct dcesrv_context *dce_ctx, const
 static NTSTATUS remote_op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
 {
        int i;
-       const char **ifaces = str_list_make(dce_ctx, lp_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_remote", "interfaces"),NULL);
+       const char **ifaces = (const char **)str_list_make(dce_ctx, lp_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_remote", "interfaces"),NULL);
 
        if (!ifaces) {
                DEBUG(3,("remote_op_init_server: no interfaces configured\n"));
index ad9a97f1336ea8cc4ec76d486b7552a134839be2..0399daedf05204c986593448a2a32af566cb4a19 100644 (file)
@@ -95,8 +95,8 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
        torture_comment(tctx, "register the name\n");
        io.in.name = *name;
        io.in.wins_port = lp_nbt_port(tctx->lp_ctx);
-       io.in.wins_servers = str_list_make(tctx, address, NULL);
-       io.in.addresses = str_list_make(tctx, myaddress, NULL);
+       io.in.wins_servers = (const char **)str_list_make(tctx, address, NULL);
+       io.in.addresses = (const char **)str_list_make(tctx, myaddress, NULL);
        io.in.nb_flags = nb_flags;
        io.in.ttl = 300000;
        
@@ -168,8 +168,8 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
        torture_comment(tctx, "refresh the name\n");
        refresh.in.name = *name;
        refresh.in.wins_port = lp_nbt_port(tctx->lp_ctx);
-       refresh.in.wins_servers = str_list_make(tctx, address, NULL);
-       refresh.in.addresses = str_list_make(tctx, myaddress, NULL);
+       refresh.in.wins_servers = (const char **)str_list_make(tctx, address, NULL);
+       refresh.in.addresses = (const char **)str_list_make(tctx, myaddress, NULL);
        refresh.in.nb_flags = nb_flags;
        refresh.in.ttl = 12345;
        
index c2ba55ff18c39914f25828fce31bc5513da9bc03..03b59f56e9b40f0e9cd456cb4542da517c9e5ba8 100644 (file)
@@ -113,7 +113,7 @@ NTSTATUS wbsrv_samba3_netbios_name(struct wbsrv_samba3_call *s3call)
 
 NTSTATUS wbsrv_samba3_priv_pipe_dir(struct wbsrv_samba3_call *s3call)
 {
-       char *path = s3call->wbconn->listen_socket->service->priv_socket_path;
+       const char *path = s3call->wbconn->listen_socket->service->priv_socket_path;
        s3call->response.result          = WINBINDD_OK;
        s3call->response.extra_data.data = path;