syntax error in source3/locking/brlock.c

Michael Adam obnox at samba.org
Mon Mar 16 14:21:10 MDT 2015


Oops, soory: the previously attached patch was
not right, in that I kept Thomas Schulz' authorship
in squashing. Attached an updated patch with the
correct authorship.

Michael

On 2015-03-16 at 19:10 +0100, Michael Adam wrote:
> On 2015-03-16 at 18:43 +0100, Michael Adam wrote:
> > Attached find a patch for removal.
> > The function is not used. Builds fine.
> > 
> > Attached a patch for removal.
> 
> Heh, not sure why I repeat myself... ;)
> 
> > This is currently on top of the prototype-fix-patch.
> > If we chose to remove the function, then these
> > should be combined (squashed).
> 
> Attached find the squashed patch.
> 
> Michael
> 
> PS: If we chose to push the proto-fix patch, I suggest
> that you (Christof) should add 'Reviewed-by:' instead
> of signed-off-by, because you are not the author.
> 
> 
> 
> > Michael
> > 
> > On 2015-03-16 at 10:40 -0700, Christof Schmitt wrote:
> > > On Mon, Mar 16, 2015 at 06:31:21PM +0100, Michael Adam wrote:
> > > > Reviewed-by: me
> > > > 
> > > > But this function is never used. Should we remove it?
> > > 
> > > Good question.
> > > 
> > > Metze, you introduced the function netlogon_creds_cli_context_tmp in
> > > commit 6e6d9f9f, but this function is unused. What is your preference,
> > > fixing the declaration, or removing the function?
> > > 
> > > Christof
> > > 
> > > > 
> > > > Michael
> > > > 
> > > > On 2015-03-16 at 10:26 -0700, Christof Schmitt wrote:
> > > > > On Mon, Mar 16, 2015 at 10:46:10AM -0400, Thomas Schulz wrote:
> > > > > > Note that bug 11140 is another problem uncovered by the Solaris C
> > > > > > compiler and the bug report containes a patch. If that could be taken
> > > > > > care of then all the problems with the Solaris C compiler would be resolved.
> > > > > 
> > > > > Thank you for reporting this. Attached is the patch from the bugzilla
> > > > > with my sign-off for master. Can we get a second sign-off to push this
> > > > > to autobuid? After that, the patch can be backported.
> > > > > 
> > > > > Christof
> > > > 
> > > > > From abd1870f8a9c906a765eda67edb9b510c929e6ee Mon Sep 17 00:00:00 2001
> > > > > From: Thomas Schulz <schulz at adi.com>
> > > > > Date: Mon, 16 Mar 2015 10:21:46 -0700
> > > > > Subject: [PATCH] libcli/auth: Match Declaration of  netlogon_creds_cli_context_tmp with implementation
> > > > > 
> > > > > I have been building 4.2.0 with the GNU C compiler but I decided to see
> > > > > how it works with the Sun C 5.11 compiler. The Sun compiler complains
> > > > > about a identifier being redeclared in libcli/auth/netlogon_creds_cli.c
> > > > > 
> > > > > BUG: https://bugzilla.samba.org/show_bug.cgi?id=11140
> > > > > 
> > > > > Signed-off-by: Christof Schmitt <cs at samba.org>
> > > > > ---
> > > > >  libcli/auth/netlogon_creds_cli.h |    2 +-
> > > > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > > > 
> > > > > diff --git a/libcli/auth/netlogon_creds_cli.h b/libcli/auth/netlogon_creds_cli.h
> > > > > index 401ce8c..006367a 100644
> > > > > --- a/libcli/auth/netlogon_creds_cli.h
> > > > > +++ b/libcli/auth/netlogon_creds_cli.h
> > > > > @@ -44,9 +44,9 @@ NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx,
> > > > >  NTSTATUS netlogon_creds_cli_context_tmp(const char *client_computer,
> > > > >  				const char *client_account,
> > > > >  				enum netr_SchannelType type,
> > > > > -				enum dcerpc_AuthLevel auth_level,
> > > > >  				uint32_t proposed_flags,
> > > > >  				uint32_t required_flags,
> > > > > +				enum dcerpc_AuthLevel auth_level,
> > > > >  				const char *server_computer,
> > > > >  				const char *server_netbios_domain,
> > > > >  				TALLOC_CTX *mem_ctx,
> > > > > -- 
> > > > > 1.7.1
> > > > > 
> > > > 
> > > 
> 
> > From ce839ede859ea7a07934ab080669f70e1c59d681 Mon Sep 17 00:00:00 2001
> > From: Michael Adam <obnox at samba.org>
> > Date: Mon, 16 Mar 2015 18:36:42 +0100
> > Subject: [PATCH] libcli: remove unused function
> >  netlogon_creds_cli_context_tmp()
> > 
> > Signed-off-by: Michael Adam <obnox at samba.org>
> > ---
> >  libcli/auth/netlogon_creds_cli.c | 40 ----------------------------------------
> >  libcli/auth/netlogon_creds_cli.h | 10 ----------
> >  2 files changed, 50 deletions(-)
> > 
> > diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c
> > index 1ea2f75..235db4a 100644
> > --- a/libcli/auth/netlogon_creds_cli.c
> > +++ b/libcli/auth/netlogon_creds_cli.c
> > @@ -443,46 +443,6 @@ NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx,
> >  	return NT_STATUS_OK;
> >  }
> >  
> > -NTSTATUS netlogon_creds_cli_context_tmp(const char *client_computer,
> > -				const char *client_account,
> > -				enum netr_SchannelType type,
> > -				uint32_t proposed_flags,
> > -				uint32_t required_flags,
> > -				enum dcerpc_AuthLevel auth_level,
> > -				const char *server_computer,
> > -				const char *server_netbios_domain,
> > -				TALLOC_CTX *mem_ctx,
> > -				struct netlogon_creds_cli_context **_context)
> > -{
> > -	NTSTATUS status;
> > -	struct netlogon_creds_cli_context *context = NULL;
> > -
> > -	*_context = NULL;
> > -
> > -	status = netlogon_creds_cli_context_common(client_computer,
> > -						   client_account,
> > -						   type,
> > -						   auth_level,
> > -						   proposed_flags,
> > -						   required_flags,
> > -						   server_computer,
> > -						   server_netbios_domain,
> > -						   mem_ctx,
> > -						   &context);
> > -	if (!NT_STATUS_IS_OK(status)) {
> > -		return status;
> > -	}
> > -
> > -	context->db.ctx = db_open_rbt(context);
> > -	if (context->db.ctx == NULL) {
> > -		talloc_free(context);
> > -		return NT_STATUS_NO_MEMORY;
> > -	}
> > -
> > -	*_context = context;
> > -	return NT_STATUS_OK;
> > -}
> > -
> >  enum dcerpc_AuthLevel netlogon_creds_cli_auth_level(
> >  		struct netlogon_creds_cli_context *context)
> >  {
> > diff --git a/libcli/auth/netlogon_creds_cli.h b/libcli/auth/netlogon_creds_cli.h
> > index 006367a..de26de0 100644
> > --- a/libcli/auth/netlogon_creds_cli.h
> > +++ b/libcli/auth/netlogon_creds_cli.h
> > @@ -41,16 +41,6 @@ NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx,
> >  				const char *server_netbios_domain,
> >  				TALLOC_CTX *mem_ctx,
> >  				struct netlogon_creds_cli_context **_context);
> > -NTSTATUS netlogon_creds_cli_context_tmp(const char *client_computer,
> > -				const char *client_account,
> > -				enum netr_SchannelType type,
> > -				uint32_t proposed_flags,
> > -				uint32_t required_flags,
> > -				enum dcerpc_AuthLevel auth_level,
> > -				const char *server_computer,
> > -				const char *server_netbios_domain,
> > -				TALLOC_CTX *mem_ctx,
> > -				struct netlogon_creds_cli_context **_context);
> >  
> >  enum dcerpc_AuthLevel netlogon_creds_cli_auth_level(
> >  		struct netlogon_creds_cli_context *context);
> > -- 
> > 2.1.0
> > 
> 
> 
> 

> From 35b52f72613e26138c8137aaabcd5d26af782ffa Mon Sep 17 00:00:00 2001
> From: Thomas Schulz <schulz at adi.com>
> Date: Mon, 16 Mar 2015 10:21:46 -0700
> Subject: [PATCH] libcli: remove unused function
>  netlogon_creds_cli_context_tmp()
> 
> Signed-off-by: Michael Adam <obnox at samba.org>
> ---
>  libcli/auth/netlogon_creds_cli.c | 40 ----------------------------------------
>  libcli/auth/netlogon_creds_cli.h | 10 ----------
>  2 files changed, 50 deletions(-)
> 
> diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c
> index 1ea2f75..235db4a 100644
> --- a/libcli/auth/netlogon_creds_cli.c
> +++ b/libcli/auth/netlogon_creds_cli.c
> @@ -443,46 +443,6 @@ NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx,
>  	return NT_STATUS_OK;
>  }
>  
> -NTSTATUS netlogon_creds_cli_context_tmp(const char *client_computer,
> -				const char *client_account,
> -				enum netr_SchannelType type,
> -				uint32_t proposed_flags,
> -				uint32_t required_flags,
> -				enum dcerpc_AuthLevel auth_level,
> -				const char *server_computer,
> -				const char *server_netbios_domain,
> -				TALLOC_CTX *mem_ctx,
> -				struct netlogon_creds_cli_context **_context)
> -{
> -	NTSTATUS status;
> -	struct netlogon_creds_cli_context *context = NULL;
> -
> -	*_context = NULL;
> -
> -	status = netlogon_creds_cli_context_common(client_computer,
> -						   client_account,
> -						   type,
> -						   auth_level,
> -						   proposed_flags,
> -						   required_flags,
> -						   server_computer,
> -						   server_netbios_domain,
> -						   mem_ctx,
> -						   &context);
> -	if (!NT_STATUS_IS_OK(status)) {
> -		return status;
> -	}
> -
> -	context->db.ctx = db_open_rbt(context);
> -	if (context->db.ctx == NULL) {
> -		talloc_free(context);
> -		return NT_STATUS_NO_MEMORY;
> -	}
> -
> -	*_context = context;
> -	return NT_STATUS_OK;
> -}
> -
>  enum dcerpc_AuthLevel netlogon_creds_cli_auth_level(
>  		struct netlogon_creds_cli_context *context)
>  {
> diff --git a/libcli/auth/netlogon_creds_cli.h b/libcli/auth/netlogon_creds_cli.h
> index 401ce8c..de26de0 100644
> --- a/libcli/auth/netlogon_creds_cli.h
> +++ b/libcli/auth/netlogon_creds_cli.h
> @@ -41,16 +41,6 @@ NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx,
>  				const char *server_netbios_domain,
>  				TALLOC_CTX *mem_ctx,
>  				struct netlogon_creds_cli_context **_context);
> -NTSTATUS netlogon_creds_cli_context_tmp(const char *client_computer,
> -				const char *client_account,
> -				enum netr_SchannelType type,
> -				enum dcerpc_AuthLevel auth_level,
> -				uint32_t proposed_flags,
> -				uint32_t required_flags,
> -				const char *server_computer,
> -				const char *server_netbios_domain,
> -				TALLOC_CTX *mem_ctx,
> -				struct netlogon_creds_cli_context **_context);
>  
>  enum dcerpc_AuthLevel netlogon_creds_cli_auth_level(
>  		struct netlogon_creds_cli_context *context);
> -- 
> 2.1.0
> 



-------------- next part --------------
From 258152318ca4811af72addc234a53c4c7fe5c44b Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Mon, 16 Mar 2015 21:18:05 +0100
Subject: [PATCH] libcli: remove unused function
 netlogon_creds_cli_context_tmp()

Signed-off-by: Michael Adam <obnox at samba.org>
---
 libcli/auth/netlogon_creds_cli.c | 40 ----------------------------------------
 libcli/auth/netlogon_creds_cli.h | 10 ----------
 2 files changed, 50 deletions(-)

diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c
index 1ea2f75..235db4a 100644
--- a/libcli/auth/netlogon_creds_cli.c
+++ b/libcli/auth/netlogon_creds_cli.c
@@ -443,46 +443,6 @@ NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx,
 	return NT_STATUS_OK;
 }
 
-NTSTATUS netlogon_creds_cli_context_tmp(const char *client_computer,
-				const char *client_account,
-				enum netr_SchannelType type,
-				uint32_t proposed_flags,
-				uint32_t required_flags,
-				enum dcerpc_AuthLevel auth_level,
-				const char *server_computer,
-				const char *server_netbios_domain,
-				TALLOC_CTX *mem_ctx,
-				struct netlogon_creds_cli_context **_context)
-{
-	NTSTATUS status;
-	struct netlogon_creds_cli_context *context = NULL;
-
-	*_context = NULL;
-
-	status = netlogon_creds_cli_context_common(client_computer,
-						   client_account,
-						   type,
-						   auth_level,
-						   proposed_flags,
-						   required_flags,
-						   server_computer,
-						   server_netbios_domain,
-						   mem_ctx,
-						   &context);
-	if (!NT_STATUS_IS_OK(status)) {
-		return status;
-	}
-
-	context->db.ctx = db_open_rbt(context);
-	if (context->db.ctx == NULL) {
-		talloc_free(context);
-		return NT_STATUS_NO_MEMORY;
-	}
-
-	*_context = context;
-	return NT_STATUS_OK;
-}
-
 enum dcerpc_AuthLevel netlogon_creds_cli_auth_level(
 		struct netlogon_creds_cli_context *context)
 {
diff --git a/libcli/auth/netlogon_creds_cli.h b/libcli/auth/netlogon_creds_cli.h
index 401ce8c..de26de0 100644
--- a/libcli/auth/netlogon_creds_cli.h
+++ b/libcli/auth/netlogon_creds_cli.h
@@ -41,16 +41,6 @@ NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx,
 				const char *server_netbios_domain,
 				TALLOC_CTX *mem_ctx,
 				struct netlogon_creds_cli_context **_context);
-NTSTATUS netlogon_creds_cli_context_tmp(const char *client_computer,
-				const char *client_account,
-				enum netr_SchannelType type,
-				enum dcerpc_AuthLevel auth_level,
-				uint32_t proposed_flags,
-				uint32_t required_flags,
-				const char *server_computer,
-				const char *server_netbios_domain,
-				TALLOC_CTX *mem_ctx,
-				struct netlogon_creds_cli_context **_context);
 
 enum dcerpc_AuthLevel netlogon_creds_cli_auth_level(
 		struct netlogon_creds_cli_context *context);
-- 
2.1.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150316/8883c339/attachment.pgp>


More information about the samba-technical mailing list