Subject: pkg/10143: rumba can't delete dot-files on samba server
To: None <gnats-bugs@gnats.netbsd.org>
From: None <r-katoh@mxp.mesh.ne.jp>
List: netbsd-bugs
Date: 05/17/2000 17:11:12
>Number:         10143
>Category:       pkg
>Synopsis:       rumba can't delete dot-files on samba server
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 17 17:12:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Ryoji Kato
>Release:        NetBSD 1.4Y
>Organization:
>Environment:
NetBSD vaio.foo.gr.jp 1.4Y NetBSD 1.4Y (VAIO-PCGC1) #0: Sun May 14 07:51:01 PDT 2000     root@:/usr/src/sys/arch/i386/compile/VAIO-PCGC1 i386
>Description:
The problem is that rumba can't remove dot-files (e.g. .shrc) on
samba servers. The trial of /bin/rm returns with "Permission denied"
error. smbclient can remove these files. This problem will be fixed
by the following patch.
>How-To-Repeat:
1. mount any directory served by any samba servers.
2. "/usr/bin/touch .hehe" on the mounted directory.
3. "/bin/rm .hehe" will error.
>Fix:
It will be fixed by patching the following patch for pkgsrc/net

diff -u -P -r rumba.orig/files/patch-sum rumba/files/patch-sum
--- rumba.orig/files/patch-sum  Fri Jul  9 14:12:27 1999
+++ rumba/files/patch-sum       Wed May 17 12:52:27 2000
@@ -3,3 +3,4 @@
 MD5 (patch-aa) = b49fdd34baa36ce8ec84d889fecc3b08
 MD5 (patch-ab) = d9e8bbf3fc231b36ce6c2bf63c86e0ad
 MD5 (patch-ac) = bea96514b66561818e9973aff7111161
+MD5 (patch-ad) = 71ccecd7f62f9139298199afd9cbcaa8
diff -u -P -r rumba.orig/patches/patch-ad rumba/patches/patch-ad
--- rumba.orig/patches/patch-ad Thu Jan  1 00:00:00 1970
+++ rumba/patches/patch-ad      Wed May 17 12:52:04 2000
@@ -0,0 +1,17 @@
+--- proc.c.orig        Wed Dec 31 00:28:48 1997
++++ proc.c     Wed May 17 12:51:36 2000
+@@ -878,12 +878,13 @@
+         char *p;
+         char *buf = server->packet;
+         int result;
++        const word o_attr = aSYSTEM | aHIDDEN;
+
+         smb_lock_server(server);
+
+  retry:
+         p = smb_setup_header(server, SMBunlink, 1, 2 + len);
+-        WSET(buf, smb_vwv0, 0);
++        WSET(buf, smb_vwv0, o_attr);
+         smb_encode_ascii(p, path, len);
+
+         if ((result = smb_request_ok(server, SMBunlink, 0, 0)) < 0) {
>Release-Note:
>Audit-Trail:
>Unformatted: