patch-1.3.68 linux/fs/ncpfs/ncplib_kernel.c

Next file: linux/fs/ncpfs/sock.c
Previous file: linux/fs/ncpfs/mmap.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.67/linux/fs/ncpfs/ncplib_kernel.c linux/fs/ncpfs/ncplib_kernel.c
@@ -411,12 +411,18 @@
 			       struct nw_file_info *target)
 {
 	int result;
+	__u16 search_attribs = 0x0006;
+
+	if ((create_attributes & aDIR) != 0)
+	{
+		search_attribs |= 0x8000;
+	}
 
 	ncp_init_request(server);
 	ncp_add_byte(server, 1); /* subfunction */
 	ncp_add_byte(server, 0); /* dos name space */
 	ncp_add_byte(server, open_create_mode);
-	ncp_add_word(server, 0x8006);
+	ncp_add_word(server, search_attribs);
 	ncp_add_dword(server, RIM_ALL);
 	ncp_add_dword(server, create_attributes);
 	/* The desired acc rights seem to be the inherited rights mask

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this