From: Alexander Bokovoy Date: Mon, 14 May 2007 19:26:22 +0000 (+0000) Subject: r22867: With Samba4's IDL, we now have two new flags for share types: STYPE_TEMPORARY... X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~463 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c3f4fdd37e62491a11d3993864ba51fdb596ea1b;p=thirdparty%2Fsamba.git r22867: With Samba4's IDL, we now have two new flags for share types: STYPE_TEMPORARY and STYPE_HIDDEN Strip them out when referencing share_type[] entries. Apparently, some Windows XP installs create shares set to STYPE_HIDDEN by default, found by Damir Shayhutdinov . This also fixes smb4k crashes as it does call 'net share -l'. --- diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c index b4a68b20583..e2639fe896f 100644 --- a/source/utils/net_rpc.c +++ b/source/utils/net_rpc.c @@ -3118,7 +3118,7 @@ static void display_share_info_1(struct srvsvc_NetShareInfo1 *info1) { if (opt_long_list_entries) { d_printf("%-12s %-8.8s %-50s\n", - info1->name, share_type[info1->type], + info1->name, share_type[info1->type & ~(STYPE_TEMPORARY|STYPE_HIDDEN)], info1->comment ? info1->comment : ""); } else { d_printf("%s\n", info1->name);