Import ncpfs 0.16

This commit is contained in:
ncpfs archive import
2026-04-28 20:39:57 +02:00
parent b8ce93c8bd
commit 5753870858
35 changed files with 462 additions and 106 deletions

View File

@@ -3,7 +3,7 @@
#
CFLAGS = -Wall -Wstrict-prototypes -O2 -DMODULE -fomit-frame-pointer \
$(INCLUDES) \
$(INCLUDES) -DNCPFS_VERSION=\"$(VERSION)\"\
# -DDEBUG_NCP=1 -DDEBUG_NCP_MALLOC
# -DDEBUG_NCP_MALLOC

View File

@@ -797,7 +797,8 @@ ncp_create(struct inode *dir, const char *name, int len, int mode,
if (ncp_open_create_file_or_subdir(NCP_SERVER(dir),
NCP_ISTRUCT(dir), _name,
OC_MODE_CREATE|OC_MODE_OPEN,
OC_MODE_CREATE|OC_MODE_OPEN|
OC_MODE_REPLACE,
0, AR_READ|AR_WRITE,
&finfo) != 0)
{
@@ -895,7 +896,7 @@ ncp_rmdir(struct inode *dir, const char *name, int len)
}
else
{
error = -EINVAL;
error = -EACCES;
}
}
iput(dir);
@@ -932,7 +933,7 @@ ncp_unlink(struct inode *dir, const char *name, int len)
}
else
{
error = -EINVAL;
error = -EACCES;
}
}
iput(dir);

View File

@@ -510,6 +510,7 @@ init_module( void)
ncp_init_dir_cache();
register_filesystem(&ncp_fs_type);
printk("ncpfs version %s loaded\n", NCPFS_VERSION);
return 0;
}

View File

@@ -417,12 +417,18 @@ ncp_open_create_file_or_subdir(struct ncp_server *server,
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