git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84ed752
)
net: share_type is defined in net_rap.c, net_rpc.c needs to use that.
author
Kai Blin
<kai@samba.org>
Wed, 10 Sep 2008 10:05:18 +0000
(12:05 +0200)
committer
Kai Blin
<kai@samba.org>
Wed, 10 Sep 2008 10:05:18 +0000
(12:05 +0200)
This fixes a crash in net rpc share that Günther Deschner found.
source/utils/net.h
patch
|
blob
|
history
source/utils/net_rpc.c
patch
|
blob
|
history
diff --git
a/source/utils/net.h
b/source/utils/net.h
index e7f9ce03be9c20cae79cfe1bee8eb12b5343cbf9..5dc2b11d4e5da94a2bd4b5d2fe11c497e5ca1911 100644
(file)
--- a/
source/utils/net.h
+++ b/
source/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/source/utils/net_rpc.c
b/source/utils/net_rpc.c
index 904729073d36eae6ec726699e7edd2bd4966c5ed..7ebd749899c6b004ef1094df2f03f77466feb341 100644
(file)
--- a/
source/utils/net_rpc.c
+++ b/
source/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);