[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Jun 19 13:18:03 MDT 2012


The branch, master has been updated
       via  671f610 Fix unused variable warnings.
       via  028a7d9 Fix unused variable warnings.
       via  53cc8f8 Remove unused variables.
       via  06cf0a9 Remove unused variables and code.
       via  76e2f29 Fix more "set but not used" warnings.
       via  0dfd15c Fix a bunch of "set but not used" warnings.
       via  acc9302 s3: We can depend on pthreadpool now
       via  8b35a4d s3: Add a dummy implementation for the pthreadpool API
       via  818fd7e Remove unused code now we set the correct command codes.
       via  737acc7 Fix warning: variable ‘status’ set but not used.
       via  d1bcbd7 Fix warnings using %lu to print a 64-bit value (should by %llu).
       via  6cef2a61 Fix  warning: variable ‘in_start_time’ set but not used.
       via  9b212d8 Fix warning: variable ‘XX’ set but not used.
      from  e43b745 waf: Fix make etags

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 671f61018d67ce0d14398de9922074511148a383
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jun 19 10:26:58 2012 -0700

    Fix unused variable warnings.
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Jun 19 21:17:51 CEST 2012 on sn-devel-104

commit 028a7d9b288bb2662bb45ccaff9cf9e7bc76a487
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jun 19 10:23:02 2012 -0700

    Fix unused variable warnings.

commit 53cc8f8011cf1644d1ed96546736ebbb15570b68
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jun 19 10:18:28 2012 -0700

    Remove unused variables.

commit 06cf0a95cd9fbe94d452df75395a7ae20dce7403
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jun 19 10:16:32 2012 -0700

    Remove unused variables and code.

commit 76e2f29389446626d10e10d38a813a624104b00a
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jun 19 10:09:45 2012 -0700

    Fix more "set but not used" warnings.

commit 0dfd15c2b389e91b16e139cae570cb8ac6ff8e0a
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jun 19 10:06:34 2012 -0700

    Fix a bunch of "set but not used" warnings.

commit acc930293104d198364521f82980382f4b2e290f
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jun 13 13:06:16 2012 +0200

    s3: We can depend on pthreadpool now
    
    Signed-off-by: Jeremy Allison <jra at samba.org>

commit 8b35a4de3880e1a3f64534db9748d5786a2ccb01
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jun 13 13:05:17 2012 +0200

    s3: Add a dummy implementation for the pthreadpool API
    
    Signed-off-by: Jeremy Allison <jra at samba.org>

commit 818fd7e917a7e2d6762e7b7f773a34e59c75b0df
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jun 18 16:36:30 2012 -0700

    Remove unused code now we set the correct command codes.

commit 737acc78078d0ee9e03cd17bbcf73cd3debdeb18
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jun 18 14:37:15 2012 -0700

    Fix warning: variable ‘status’ set but not used.

commit d1bcbd785fc0a2a5d07c27c962d666252fd234a2
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jun 18 14:35:02 2012 -0700

    Fix warnings using %lu to print a 64-bit value (should by %llu).

commit 6cef2a613c4706dab4fe797465e29fe32d81976f
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jun 18 14:28:48 2012 -0700

    Fix  warning: variable ‘in_start_time’ set but not used.

commit 9b212d8df5a6f4120dbfa135915597650a301cfa
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jun 18 14:25:27 2012 -0700

    Fix warning: variable ‘XX’ set but not used.

-----------------------------------------------------------------------

Summary of changes:
 libcli/security/create_descriptor.c            |    7 -
 source3/configure.in                           |    8 +-
 source3/lib/fncall.c                           |   42 ------
 source3/lib/pthreadpool/pthreadpool_sync.c     |  174 ++++++++++++++++++++++++
 source3/lib/pthreadpool/wscript_build          |   13 ++-
 source3/passdb/pdb_ipa.c                       |    8 +-
 source3/rpc_server/epmapper/srv_epmapper.c     |    9 --
 source3/rpc_server/lsa/srv_lsa_nt.c            |    9 +-
 source3/rpc_server/samr/srv_samr_nt.c          |   21 +--
 source3/rpcclient/cmd_fss.c                    |    4 +-
 source3/smbd/nttrans.c                         |    5 -
 source3/smbd/smb2_negprot.c                    |    2 -
 source3/smbd/trans2.c                          |    6 -
 source3/utils/net_g_lock.c                     |    3 +-
 source3/winbindd/idmap_adex/idmap_adex.c       |    8 -
 source3/winbindd/idmap_adex/provider_unified.c |   17 ++-
 16 files changed, 215 insertions(+), 121 deletions(-)
 create mode 100644 source3/lib/pthreadpool/pthreadpool_sync.c


Changeset truncated at 500 lines:

diff --git a/libcli/security/create_descriptor.c b/libcli/security/create_descriptor.c
index 9252896..0cac2e4 100644
--- a/libcli/security/create_descriptor.c
+++ b/libcli/security/create_descriptor.c
@@ -132,7 +132,6 @@ static struct security_acl *calculate_inherited_from_parent(TALLOC_CTX *mem_ctx,
 	uint32_t i;
 	TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
 	struct security_acl *tmp_acl = talloc_zero(mem_ctx, struct security_acl);
-	struct dom_sid *co, *cg;
 	if (!tmp_acl) {
 		return NULL;
 	}
@@ -140,8 +139,6 @@ static struct security_acl *calculate_inherited_from_parent(TALLOC_CTX *mem_ctx,
 	if (!acl) {
 		return NULL;
 	}
-	co = dom_sid_parse_talloc(tmp_ctx,  SID_CREATOR_OWNER);
-	cg = dom_sid_parse_talloc(tmp_ctx,  SID_CREATOR_GROUP);
 
 	for (i=0; i < acl->num_aces; i++) {
 		struct security_ace *ace = &acl->aces[i];
@@ -217,7 +214,6 @@ static struct security_acl *process_user_acl(TALLOC_CTX *mem_ctx,
 	TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
 	struct security_acl *tmp_acl = talloc_zero(tmp_ctx, struct security_acl);
 	struct security_acl *new_acl;
-	struct dom_sid *co, *cg;
 
 	if (!acl)
 		return NULL;
@@ -228,9 +224,6 @@ static struct security_acl *process_user_acl(TALLOC_CTX *mem_ctx,
 	tmp_acl->revision = acl->revision;
 	DEBUG(6,(__location__ ": acl revision %d\n", acl->revision));
 
-	co = dom_sid_parse_talloc(tmp_ctx,  SID_CREATOR_OWNER);
-	cg = dom_sid_parse_talloc(tmp_ctx,  SID_CREATOR_GROUP);
-
 	for (i=0; i < acl->num_aces; i++){
 		struct security_ace *ace = &acl->aces[i];
 		/* Remove ID flags from user-provided ACEs
diff --git a/source3/configure.in b/source3/configure.in
index c5775f8..6e324a1 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6172,15 +6172,17 @@ fi
 if test x"$enable_pthreadpool" = x"yes" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; then
     LIBS="$LIBS $PTHREAD_LDFLAGS"
     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-    AC_DEFINE(WITH_PTHREADPOOL, 1, [Whether to include pthreadpool helpers])
     AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool/pthreadpool.o")
-    PTHREADPOOLTEST="bin/pthreadpooltest"
-    AC_SUBST(PTHREADPOOLTEST)
     if test x"$samba_cv_HAVE_AIO" = x"yes"; then
         default_shared_modules="$default_shared_modules vfs_aio_pthread"
     fi
+else
+    AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool/pthreadpool_sync.o")
 fi
 
+PTHREADPOOLTEST="bin/pthreadpooltest"
+AC_SUBST(PTHREADPOOLTEST)
+
 
 #################################################
 # Check to see if we should use the included iniparser
diff --git a/source3/lib/fncall.c b/source3/lib/fncall.c
index 79bf826..e40fd83 100644
--- a/source3/lib/fncall.c
+++ b/source3/lib/fncall.c
@@ -20,8 +20,6 @@
 #include "includes.h"
 #include "../lib/util/tevent_unix.h"
 
-#if WITH_PTHREADPOOL
-
 #include "lib/pthreadpool/pthreadpool.h"
 
 struct fncall_state {
@@ -323,43 +321,3 @@ int fncall_recv(struct tevent_req *req, int *perr)
 	}
 	return 0;
 }
-
-#else  /* WITH_PTHREADPOOL */
-
-struct fncall_context {
-	uint8_t dummy;
-};
-
-struct fncall_context *fncall_context_init(TALLOC_CTX *mem_ctx,
-					   int max_threads)
-{
-	return talloc(mem_ctx, struct fncall_context);
-}
-
-struct fncall_state {
-	uint8_t dummy;
-};
-
-struct tevent_req *fncall_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-			       struct fncall_context *ctx,
-			       void (*fn)(void *private_data),
-			       void *private_data)
-{
-	struct tevent_req *req;
-	struct fncall_state *state;
-
-	req = tevent_req_create(mem_ctx, &state, struct fncall_state);
-	if (req == NULL) {
-		return NULL;
-	}
-	fn(private_data);
-	tevent_req_post(req, ev);
-	return req;
-}
-
-int fncall_recv(struct tevent_req *req, int *perr)
-{
-	return 0;
-}
-
-#endif
diff --git a/source3/lib/pthreadpool/pthreadpool_sync.c b/source3/lib/pthreadpool/pthreadpool_sync.c
new file mode 100644
index 0000000..6c18b8f
--- /dev/null
+++ b/source3/lib/pthreadpool/pthreadpool_sync.c
@@ -0,0 +1,174 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * sync dummy implementation of the pthreadpool API
+ * Copyright (C) Volker Lendecke 2009
+ *
+ * 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/>.
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <pthread.h>
+#include <signal.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <sys/time.h>
+
+#include "pthreadpool.h"
+
+struct pthreadpool {
+	/*
+	 * pipe for signalling
+	 */
+	int sig_pipe[2];
+
+	/*
+	 * Have we sent something into the pipe that has not been
+	 * retrieved yet?
+	 */
+	int pipe_busy;
+
+	/*
+	 * Jobids that we have not sent into the pipe yet
+	 */
+	size_t num_ids;
+	int *ids;
+};
+
+int pthreadpool_init(unsigned max_threads, struct pthreadpool **presult)
+{
+	struct pthreadpool *pool;
+	int ret;
+
+	pool = (struct pthreadpool *)calloc(1, sizeof(struct pthreadpool));
+	if (pool == NULL) {
+		return ENOMEM;
+	}
+	ret = pipe(pool->sig_pipe);
+	if (ret == -1) {
+		int err = errno;
+		free(pool);
+		return err;
+	}
+	*presult = pool;
+	return 0;
+}
+
+int pthreadpool_signal_fd(struct pthreadpool *pool)
+{
+	return pool->sig_pipe[0];
+}
+
+static int pthreadpool_write_to_pipe(struct pthreadpool *pool)
+{
+	ssize_t written;
+
+	if (pool->pipe_busy) {
+		return 0;
+	}
+	if (pool->num_ids == 0) {
+		return 0;
+	}
+
+	written = -1;
+	errno = EINTR;
+
+	while ((written == -1) && (errno == EINTR)) {
+		written = write(pool->sig_pipe[1], &pool->ids[0], sizeof(int));
+	}
+	if (written == -1) {
+		return errno;
+	}
+	if (written != sizeof(int)) {
+		/*
+		 * If a single int only partially fits into the pipe,
+		 * we can assume ourselves pretty broken
+		 */
+		close(pool->sig_pipe[1]);
+		pool->sig_pipe[1] = -1;
+		return EIO;
+	}
+
+	if (pool->num_ids > 1) {
+		memmove(pool->ids, pool->ids+1, sizeof(int) * (pool->num_ids-1));
+	}
+	pool->num_ids -= 1;
+	pool->pipe_busy = 1;
+	return 0;
+}
+
+int pthreadpool_add_job(struct pthreadpool *pool, int job_id,
+			void (*fn)(void *private_data), void *private_data)
+{
+	int *tmp;
+
+	if (pool->sig_pipe[1] == -1) {
+		return EIO;
+	}
+
+	fn(private_data);
+
+	tmp = realloc(pool->ids, sizeof(int) * (pool->num_ids+1));
+	if (tmp == NULL) {
+		return ENOMEM;
+	}
+	pool->ids = tmp;
+	pool->ids[pool->num_ids] = job_id;
+	pool->num_ids += 1;
+
+	return pthreadpool_write_to_pipe(pool);
+
+}
+
+int pthreadpool_finished_job(struct pthreadpool *pool, int *jobid)
+{
+	int ret_jobid;
+	ssize_t nread;
+
+	nread = -1;
+	errno = EINTR;
+
+	while ((nread == -1) && (errno == EINTR)) {
+		nread = read(pool->sig_pipe[0], &ret_jobid, sizeof(int));
+	}
+	if (nread == -1) {
+		return errno;
+	}
+	if (nread != sizeof(int)) {
+		return EINVAL;
+	}
+	*jobid = ret_jobid;
+
+	pool->pipe_busy = 0;
+	return pthreadpool_write_to_pipe(pool);
+}
+
+int pthreadpool_destroy(struct pthreadpool *pool)
+{
+	if (pool->sig_pipe[0] != -1) {
+		close(pool->sig_pipe[0]);
+		pool->sig_pipe[0] = -1;
+	}
+
+	if (pool->sig_pipe[1] != -1) {
+		close(pool->sig_pipe[1]);
+		pool->sig_pipe[1] = -1;
+	}
+	free(pool->ids);
+	free(pool);
+	return 0;
+}
diff --git a/source3/lib/pthreadpool/wscript_build b/source3/lib/pthreadpool/wscript_build
index 5488c3a..2cdd2ab 100644
--- a/source3/lib/pthreadpool/wscript_build
+++ b/source3/lib/pthreadpool/wscript_build
@@ -1,9 +1,14 @@
 #!/usr/bin/env python
 
-bld.SAMBA3_SUBSYSTEM('PTHREADPOOL',
-                     source='pthreadpool.c',
-                     deps='pthread rt replace',
-                     enabled=bld.env.WITH_PTHREADPOOL)
+if bld.env.WITH_PTHREADPOOL:
+    bld.SAMBA3_SUBSYSTEM('PTHREADPOOL',
+                         source='pthreadpool.c',
+                         deps='pthread rt replace')
+else:
+    bld.SAMBA3_SUBSYSTEM('PTHREADPOOL',
+                         source='pthreadpool_sync.c',
+                         deps='replace')
+
 
 bld.SAMBA3_BINARY('pthreadpooltest',
                   source='tests.c',
diff --git a/source3/passdb/pdb_ipa.c b/source3/passdb/pdb_ipa.c
index 74ac677..c4c3bc8 100644
--- a/source3/passdb/pdb_ipa.c
+++ b/source3/passdb/pdb_ipa.c
@@ -1301,7 +1301,6 @@ static NTSTATUS ipasam_create_dom_group(struct pdb_methods *pdb_methods,
 {
 	NTSTATUS status;
 	struct ldapsam_privates *ldap_state;
-	int ldap_op = LDAP_MOD_REPLACE;
 	char *dn;
 	uint32_t has_objectclass = 0;
 
@@ -1312,11 +1311,8 @@ static NTSTATUS ipasam_create_dom_group(struct pdb_methods *pdb_methods,
 	}
 
 	status = find_group(ldap_state, name, &dn, &has_objectclass);
-	if (NT_STATUS_IS_OK(status)) {
-		ldap_op = LDAP_MOD_REPLACE;
-	} else if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
-		ldap_op = LDAP_MOD_ADD;
-	} else {
+	if (!NT_STATUS_IS_OK(status) &&
+			!NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
 		return status;
 	}
 
diff --git a/source3/rpc_server/epmapper/srv_epmapper.c b/source3/rpc_server/epmapper/srv_epmapper.c
index 4fea588..5cd25ed 100644
--- a/source3/rpc_server/epmapper/srv_epmapper.c
+++ b/source3/rpc_server/epmapper/srv_epmapper.c
@@ -538,7 +538,6 @@ error_status_t _epm_Lookup(struct pipes_struct *p,
 
 	if (r->in.entry_handle == NULL ||
 	    ndr_policy_handle_empty(r->in.entry_handle)) {
-		struct GUID *obj;
 		char *srv_addr = NULL;
 
 		DEBUG(7, ("_epm_Lookup: No entry_handle found, creating it.\n"));
@@ -549,12 +548,6 @@ error_status_t _epm_Lookup(struct pipes_struct *p,
 			goto done;
 		}
 
-		if (r->in.object == NULL || GUID_all_zero(r->in.object)) {
-			obj = NULL;
-		} else {
-			obj = r->in.object;
-		}
-
 		if (p->local_address != NULL) {
 			srv_addr = tsocket_address_inet_addr_string(p->local_address,
 								    tmp_ctx);
@@ -857,7 +850,6 @@ error_status_t _epm_Map(struct pipes_struct *p,
 	error_status_t rc;
 	uint32_t count = 0;
 	uint32_t num_towers = 0;
-	uint32_t num_floors = 0;
 	uint32_t i;
 	bool ok;
 
@@ -897,7 +889,6 @@ error_status_t _epm_Map(struct pipes_struct *p,
 	 * | Floor 6 | Routing                                               |
 	 * +---------+-------------------------------------------------------+
 	 */
-	num_floors = r->in.map_tower->tower.num_floors;
 	floors = r->in.map_tower->tower.floors;
 
 	/* We accept NDR as the transfer syntax */
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index f1605af..ed73651 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -4141,9 +4141,7 @@ static NTSTATUS check_ft_info(TALLOC_CTX *mem_ctx,
 	struct dom_sid *sid = NULL;
 	const char *tname = NULL;
 	size_t dns_len = 0;
-	size_t nb_len;
 	size_t tlen = 0;
-	NTSTATUS nt_status;
 	uint32_t new_fti_idx;
 	uint32_t i;
 	/* use always TDO type, until we understand when Xref can be used */
@@ -4178,7 +4176,6 @@ static NTSTATUS check_ft_info(TALLOC_CTX *mem_ctx,
 			dns_name = nrec->data.info.dns_name.string;
 			dns_len = nrec->data.info.dns_name.size;
 			nb_name = nrec->data.info.netbios_name.string;
-			nb_len = nrec->data.info.netbios_name.size;
 			sid = &nrec->data.info.sid;
 			break;
 		}
@@ -4248,19 +4245,19 @@ static NTSTATUS check_ft_info(TALLOC_CTX *mem_ctx,
 		}
 
 		if (tln_conflict) {
-			nt_status = add_collision(c_info, new_fti_idx,
+			(void)add_collision(c_info, new_fti_idx,
 						  collision_type,
 						  LSA_TLN_DISABLED_CONFLICT,
 						  tdo_name);
 		}
 		if (sid_conflict) {
-			nt_status = add_collision(c_info, new_fti_idx,
+			(void)add_collision(c_info, new_fti_idx,
 						  collision_type,
 						  LSA_SID_DISABLED_CONFLICT,
 						  tdo_name);
 		}
 		if (nb_conflict) {
-			nt_status = add_collision(c_info, new_fti_idx,
+			(void)add_collision(c_info, new_fti_idx,
 						  collision_type,
 						  LSA_NB_DISABLED_CONFLICT,
 						  tdo_name);
diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c
index b52e88c..da82572 100644
--- a/source3/rpc_server/samr/srv_samr_nt.c
+++ b/source3/rpc_server/samr/srv_samr_nt.c
@@ -435,7 +435,6 @@ NTSTATUS _samr_Close(struct pipes_struct *p, struct samr_Close *r)
 NTSTATUS _samr_OpenDomain(struct pipes_struct *p,
 			  struct samr_OpenDomain *r)
 {
-	struct samr_connect_info *cinfo;
 	struct samr_domain_info *dinfo;
 	struct security_descriptor *psd = NULL;
 	uint32    acc_granted;
@@ -446,7 +445,7 @@ NTSTATUS _samr_OpenDomain(struct pipes_struct *p,
 
 	/* find the connection policy handle. */
 
-	cinfo = policy_handle_find(p, r->in.connect_handle, 0, NULL,
+	(void)policy_handle_find(p, r->in.connect_handle, 0, NULL,
 				   struct samr_connect_info, &status);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
@@ -667,7 +666,6 @@ static bool check_change_pw_access(TALLOC_CTX *mem_ctx, struct dom_sid *user_sid
 NTSTATUS _samr_QuerySecurity(struct pipes_struct *p,
 			     struct samr_QuerySecurity *r)
 {
-	struct samr_connect_info *cinfo;
 	struct samr_domain_info *dinfo;
 	struct samr_user_info *uinfo;
 	struct samr_group_info *ginfo;
@@ -676,7 +674,7 @@ NTSTATUS _samr_QuerySecurity(struct pipes_struct *p,
 	struct security_descriptor * psd = NULL;
 	size_t sd_size = 0;
 
-	cinfo = policy_handle_find(p, r->in.handle,
+	(void)policy_handle_find(p, r->in.handle,
 				   SEC_STD_READ_CONTROL, NULL,
 				   struct samr_connect_info, &status);
 	if (NT_STATUS_IS_OK(status)) {
@@ -3890,7 +3888,6 @@ NTSTATUS _samr_CreateUser(struct pipes_struct *p,
 NTSTATUS _samr_Connect(struct pipes_struct *p,
 		       struct samr_Connect *r)
 {
-	struct samr_connect_info *info;
 	uint32_t acc_granted;
 	struct policy_handle hnd;
 	uint32    des_access = r->in.access_mask;
@@ -3918,7 +3915,7 @@ NTSTATUS _samr_Connect(struct pipes_struct *p,
 
 	/* set up the SAMR connect_anon response */
 
-	info = policy_handle_create(p, &hnd, acc_granted,
+	(void)policy_handle_create(p, &hnd, acc_granted,
 				    struct samr_connect_info,
 				    &status);
 	if (!NT_STATUS_IS_OK(status)) {
@@ -3936,7 +3933,6 @@ NTSTATUS _samr_Connect(struct pipes_struct *p,
 NTSTATUS _samr_Connect2(struct pipes_struct *p,
 			struct samr_Connect2 *r)
 {
-	struct samr_connect_info *info = NULL;
 	struct policy_handle hnd;
 	struct security_descriptor *psd = NULL;
 	uint32    acc_granted;
@@ -3983,7 +3979,7 @@ NTSTATUS _samr_Connect2(struct pipes_struct *p,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list