[PATCH] s4:smbtorture: Add forward declaration of test_netuseradd()

Andrew Bartlett abartlet at samba.org
Mon Jun 1 09:15:33 GMT 2009


On Sun, 2009-05-31 at 20:11 -0500, Andrew Kroeger wrote:
> All:
> 
> Please find attached a patch to fix a missing prototype issue with the 
> new LIBNETAPI test.
> 
> Sincerely,
> Andrew Kroeger
> plain text document attachment
> (0002-s4-smbtorture-Add-forward-declaration-of-test_netus.patch)
> >From 9c027530d4b51a90600977988ae23d00f35ca94e Mon Sep 17 00:00:00 2001
> From: Andrew Kroeger <andrew at id10ts.net>
> Date: Sun, 31 May 2009 19:38:14 -0500
> Subject: [PATCH] s4:smbtorture: Add forward declaration of test_netuseradd().
> 
> After upgrading the locally installed libnetapi to support building the new
> LIBNETAPI testsuite the build failed because libnetapi_group.c did not have a
> function definition for test_netuseradd().
> 
> mkproto.pl does not create a private prototype for test_netuseradd() because
> the return type is NET_API_STATUS, and mkproto.pl is not aware of the
> NET_API_STATUS return type.  Decided against modifying mkproto.pl, as the
> torture tests are currently the only area in S4 where NET_API_STATUS is used.
> ---
>  source4/torture/libnetapi/libnetapi_group.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/source4/torture/libnetapi/libnetapi_group.c b/source4/torture/libnetapi/libnetapi_group.c
> index e8e5ad9..5402986 100644
> --- a/source4/torture/libnetapi/libnetapi_group.c
> +++ b/source4/torture/libnetapi/libnetapi_group.c
> @@ -32,6 +32,9 @@
>  	torture_warning(tctx, "FAILURE: line %d: %s failed with status: %s (%d), %s\n", \
>  		__LINE__, fn, libnetapi_get_error_string(x,y), y, z);
>  
> +NET_API_STATUS test_netuseradd(struct torture_context *,
> +				const char *, const char *);
> +
>  static NET_API_STATUS test_netgroupenum(struct torture_context *tctx,
>  					const char *hostname,
>  					uint32_t level,

Whatever the problem, I don't think the solution is to add a non-static
header to a .c file

Can you either fix the proto script, or add this to a header file?

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20090601/063d3ed4/attachment.bin


More information about the samba-technical mailing list