From 5b54781e1c63be1f63b601f74cf8d4cc5eb788d1 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 10 Sep 2008 12:05:18 +0200 Subject: net: share_type is defined in net_rap.c, net_rpc.c needs to use that. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a crash in net rpc share that Günther Deschner found. (This used to be commit 50af6d609dcbbdadb9af44ede980d9c85ac834e3) --- source3/utils/net.h | 1 - source3/utils/net_rpc.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/utils/net.h b/source3/utils/net.h index e7f9ce03be..5dc2b11d4e 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -68,7 +68,6 @@ struct net_context { bool display_usage; void *private_data; - const char *share_type[]; }; #define NET_TRANSPORT_LOCAL 0x01 diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 904729073d..7ebd749899 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -26,6 +26,8 @@ static int net_mode_share; static bool sync_files(struct copy_clistate *cp_clistate, const char *mask); +extern const char *share_type[]; + /** * @file net_rpc.c * @@ -2874,7 +2876,7 @@ static void display_share_info_1(struct net_context *c, if (c->opt_long_list_entries) { d_printf("%-12s %-8.8s %-50s\n", r->name, - c->share_type[r->type & ~(STYPE_TEMPORARY|STYPE_HIDDEN)], + share_type[r->type & ~(STYPE_TEMPORARY|STYPE_HIDDEN)], r->comment); } else { d_printf("%s\n", r->name); -- cgit