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

Andrew Kroeger andrew at id10ts.net
Mon Jun 1 01:11:29 GMT 2009


All:

Please find attached a patch to fix a missing prototype issue with the 
new LIBNETAPI test.

Sincerely,
Andrew Kroeger
-------------- next part --------------
>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,
-- 
1.6.0.6



More information about the samba-technical mailing list