Author: ab
Date: 2007-05-14 19:26:22 +0000 (Mon, 14 May 2007)
New Revision: 22867

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22867

Log:
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 <[EMAIL PROTECTED]>. This also fixes smb4k crashes as it 
does call 'net share -l'.

Modified:
   branches/SAMBA_3_0/source/utils/net_rpc.c
   branches/SAMBA_3_0_25/source/utils/net_rpc.c
   branches/SAMBA_3_0_26/source/utils/net_rpc.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_rpc.c   2007-05-14 18:02:49 UTC (rev 
22866)
+++ branches/SAMBA_3_0/source/utils/net_rpc.c   2007-05-14 19:26:22 UTC (rev 
22867)
@@ -3118,7 +3118,7 @@
 {
        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);

Modified: branches/SAMBA_3_0_25/source/utils/net_rpc.c
===================================================================
--- branches/SAMBA_3_0_25/source/utils/net_rpc.c        2007-05-14 18:02:49 UTC 
(rev 22866)
+++ branches/SAMBA_3_0_25/source/utils/net_rpc.c        2007-05-14 19:26:22 UTC 
(rev 22867)
@@ -3113,7 +3113,7 @@
 
        if (opt_long_list_entries) {
                d_printf("%-12s %-8.8s %-50s\n",
-                        netname, share_type[info1->info_1.type], remark);
+                        netname, share_type[info1->info_1.type & 
~(STYPE_TEMPORARY|STYPE_HIDDEN)], remark);
        } else {
                d_printf("%s\n", netname);
        }

Modified: branches/SAMBA_3_0_26/source/utils/net_rpc.c
===================================================================
--- branches/SAMBA_3_0_26/source/utils/net_rpc.c        2007-05-14 18:02:49 UTC 
(rev 22866)
+++ branches/SAMBA_3_0_26/source/utils/net_rpc.c        2007-05-14 19:26:22 UTC 
(rev 22867)
@@ -3113,7 +3113,7 @@
 
        if (opt_long_list_entries) {
                d_printf("%-12s %-8.8s %-50s\n",
-                        netname, share_type[info1->info_1.type], remark);
+                        netname, share_type[info1->info_1.type & 
~(STYPE_TEMPORARY|STYPE_HIDDEN)], remark);
        } else {
                d_printf("%s\n", netname);
        }

Reply via email to