Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d0e3d011b | ||
|
|
84cb1f167d |
BIN
.downloads/ncpfs-0.23.tgz
Normal file
BIN
.downloads/ncpfs-0.23.tgz
Normal file
Binary file not shown.
BIN
.downloads/ncpfs-0.24.tgz
Normal file
BIN
.downloads/ncpfs-0.24.tgz
Normal file
Binary file not shown.
13
Changes
13
Changes
@@ -1,6 +1,19 @@
|
||||
I only began this file with ncpfs-0.12. If you're interested in older
|
||||
versions, you can find them on ftp.gwdg.de:/pub/linux/misc/ncpfs/old.
|
||||
|
||||
ncpfs-0.23 -> ncpfs-0.24
|
||||
- Fixed a bug that made it impossible to umount a filesystem after you
|
||||
tried 'mkdir .' or 'mkdir ..'.
|
||||
- Fixed a bad race condition when opening files.
|
||||
- Made the default timeout values more robust.
|
||||
|
||||
ncpfs-0.22 -> ncpfs-0.23
|
||||
- Fixed a memory allocation problem in nwmsg.c. Thanks to
|
||||
Andrew Ross <anr1001@hermes.cam.ac.uk>
|
||||
- slist hopefully does not ask for a password anymore.
|
||||
- cleaned up error messages a bit.
|
||||
- ncpmount now calls modprobe instead of insmod.
|
||||
|
||||
ncpfs-0.21 -> ncpfs-0.22
|
||||
- removed a bad race condition in kernel-1.2/src/dir.c.
|
||||
- handle 0x9999-responses from the ncp server correctly.
|
||||
|
||||
21
FAQ
21
FAQ
@@ -4,6 +4,27 @@ enough.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Q: The ncpfs utilities like slist or ncpmount tell me that they can
|
||||
not find a server, although I'm sure there are servers on my
|
||||
net. What's wrong?
|
||||
|
||||
You probably used
|
||||
|
||||
ipx_configure --auto_interface=on --auto_primary=on
|
||||
|
||||
and you have Windows (95?) workstations on your network. Windows 95
|
||||
makes Linux configure IPX interfaces for non-existent frame types. To
|
||||
solve this problem, you have to configure your IPX interface manually
|
||||
with the command
|
||||
|
||||
ipx_interface add -p <device> <frame>
|
||||
|
||||
For <device> use eth0, eth1 or whatever you network adapter is
|
||||
called. The value for <frame> must match the frame type used on your
|
||||
network. Possible values are 802.2, 802.3, SNAP and EtherII.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Q: I have difficulties with NetWare 4.1. What can I do?
|
||||
|
||||
To be honest, I do not really know. Currently my only test equipment
|
||||
|
||||
12
Makefile
12
Makefile
@@ -2,7 +2,7 @@
|
||||
# Makefile for the linux ncp-filesystem routines.
|
||||
#
|
||||
|
||||
VERSION = 0.22
|
||||
VERSION = 0.24
|
||||
|
||||
# If you are using kerneld to autoload ncp support,
|
||||
# uncomment this (kerneld is in linux since about 1.3.57):
|
||||
@@ -42,7 +42,7 @@ clean:
|
||||
mrproper: clean
|
||||
rm -fr $(INTERM_BINDIR)/* ncpfs.tgz
|
||||
make -C util mrproper
|
||||
(cd ncpd; make clean)
|
||||
(cd daemon; make clean)
|
||||
|
||||
modules: ncpfs.o
|
||||
|
||||
@@ -50,7 +50,13 @@ SRCPATH=$(shell pwd)
|
||||
SRCDIR=$(shell basename $(SRCPATH))
|
||||
DISTFILE=$(SRCDIR).tgz
|
||||
|
||||
dist: tgz
|
||||
dist: mrproper
|
||||
mv daemon ..
|
||||
(cd ..; \
|
||||
tar cvf - $(SRCDIR) | \
|
||||
gzip -9 > $(DISTFILE); \
|
||||
mv $(DISTFILE) $(SRCDIR))
|
||||
mv ../daemon .
|
||||
make dep
|
||||
make all
|
||||
|
||||
|
||||
8
README
8
README
@@ -5,6 +5,14 @@ provided.
|
||||
|
||||
INSTALLATION
|
||||
|
||||
Before you start the installation, make sure that your kernel has IPX
|
||||
support compiled in. When 'make config' asks you for
|
||||
|
||||
The IPX protocol (CONFIG_IPX) [N/y/m/?]
|
||||
|
||||
simply answer 'y'. Probably you do not need the full internal net that
|
||||
you are asked for next.
|
||||
|
||||
The installation of ncpfs depends on the kernel version you are
|
||||
using. For kernel 1.2, you should simply type 'make' and look at
|
||||
what's in the bin/ directory after that. Please be sure that your
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/ncp_fs.h>
|
||||
#include <asm/segment.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/locks.h>
|
||||
#include "ncplib_kernel.h"
|
||||
|
||||
struct ncp_dirent {
|
||||
@@ -827,7 +828,7 @@ ncp_lookup(struct inode *dir, const char *__name, int len,
|
||||
|
||||
memcpy(name, __name, len);
|
||||
name[len] = 0;
|
||||
|
||||
lock_super(dir->i_sb);
|
||||
result_info = ncp_find_dir_inode(dir, name);
|
||||
|
||||
if (result_info != 0)
|
||||
@@ -841,6 +842,7 @@ ncp_lookup(struct inode *dir, const char *__name, int len,
|
||||
inode number */
|
||||
|
||||
*result = iget(dir->i_sb, ncp_info_ino(server, result_info));
|
||||
unlock_super(dir->i_sb);
|
||||
iput(dir);
|
||||
|
||||
if (*result == NULL)
|
||||
@@ -903,6 +905,7 @@ ncp_lookup(struct inode *dir, const char *__name, int len,
|
||||
}
|
||||
if (res != 0)
|
||||
{
|
||||
unlock_super(dir->i_sb);
|
||||
iput(dir);
|
||||
return -ENOENT;
|
||||
}
|
||||
@@ -913,10 +916,12 @@ ncp_lookup(struct inode *dir, const char *__name, int len,
|
||||
|
||||
if (!(*result = ncp_iget(dir, &finfo)))
|
||||
{
|
||||
unlock_super(dir->i_sb);
|
||||
iput(dir);
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
unlock_super(dir->i_sb);
|
||||
iput(dir);
|
||||
return 0;
|
||||
}
|
||||
@@ -946,6 +951,7 @@ ncp_create(struct inode *dir, const char *name, int len, int mode,
|
||||
_name[len] = '\0';
|
||||
str_upper(_name);
|
||||
|
||||
lock_super(dir->i_sb);
|
||||
if (ncp_open_create_file_or_subdir(NCP_SERVER(dir),
|
||||
NCP_ISTRUCT(dir), _name,
|
||||
OC_MODE_CREATE|OC_MODE_OPEN|
|
||||
@@ -953,6 +959,7 @@ ncp_create(struct inode *dir, const char *name, int len, int mode,
|
||||
0, AR_READ|AR_WRITE,
|
||||
&finfo) != 0)
|
||||
{
|
||||
unlock_super(dir->i_sb);
|
||||
iput(dir);
|
||||
return -EACCES;
|
||||
}
|
||||
@@ -965,10 +972,12 @@ ncp_create(struct inode *dir, const char *name, int len, int mode,
|
||||
if (!(*result = ncp_iget(dir, &finfo)) < 0)
|
||||
{
|
||||
ncp_close_file(NCP_SERVER(dir), finfo.file_handle);
|
||||
unlock_super(dir->i_sb);
|
||||
iput(dir);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
unlock_super(dir->i_sb);
|
||||
iput(dir);
|
||||
return 0;
|
||||
}
|
||||
@@ -985,6 +994,7 @@ ncp_mkdir(struct inode *dir, const char *name, int len, int mode)
|
||||
|| ( (len == 2)
|
||||
&& (name[1] == '.'))))
|
||||
{
|
||||
iput(dir);
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/stat.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/ncp_fs.h>
|
||||
#include <linux/locks.h>
|
||||
#include "ncplib_kernel.h"
|
||||
#include <linux/malloc.h>
|
||||
|
||||
@@ -50,8 +51,10 @@ ncp_make_open(struct inode *i, int right)
|
||||
|
||||
DPRINTK("ncp_make_open: dirent->opened = %d\n", finfo->opened);
|
||||
|
||||
lock_super(i->i_sb);
|
||||
if (finfo->opened == 0)
|
||||
{
|
||||
finfo->access = -1;
|
||||
/* tries max. rights */
|
||||
if (ncp_open_create_file_or_subdir(NCP_SERVER(i),
|
||||
NULL, NULL,
|
||||
@@ -69,12 +72,10 @@ ncp_make_open(struct inode *i, int right)
|
||||
{
|
||||
finfo->access = O_RDONLY;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -EACCES;
|
||||
}
|
||||
}
|
||||
|
||||
unlock_super(i->i_sb);
|
||||
|
||||
if ( ((right == O_RDONLY) && ( (finfo->access == O_RDONLY)
|
||||
|| (finfo->access == O_RDWR)))
|
||||
|| ((right == O_WRONLY) && ( (finfo->access == O_WRONLY)
|
||||
|
||||
@@ -132,7 +132,9 @@ static void
|
||||
ncp_put_inode(struct inode *inode)
|
||||
{
|
||||
struct nw_file_info *finfo = NCP_FINFO(inode);
|
||||
struct super_block *sb = inode->i_sb;
|
||||
|
||||
lock_super(sb);
|
||||
if (finfo->opened != 0)
|
||||
{
|
||||
if (ncp_close_file(NCP_SERVER(inode), finfo->file_handle)!=0)
|
||||
@@ -155,6 +157,7 @@ ncp_put_inode(struct inode *inode)
|
||||
}
|
||||
|
||||
clear_inode(inode);
|
||||
unlock_super(sb);
|
||||
}
|
||||
|
||||
struct super_block *
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Begin3
|
||||
Title: ncpfs
|
||||
Version: 0.22
|
||||
Entered-date: 17. April 1996
|
||||
Version: 0.24
|
||||
Entered-date: 02. June 1996
|
||||
Description: With ncpfs you can mount volumes of your netware
|
||||
server under Linux. You can also print to netware
|
||||
print queues and spool netware print queues to the
|
||||
@@ -9,11 +9,11 @@ Description: With ncpfs you can mount volumes of your netware
|
||||
1.3.71 and above. ncpfs does NOT work with any 1.3.x
|
||||
kernel below 1.3.71.
|
||||
Keywords: filesystem ncp novell netware printing
|
||||
Author: lendecke@namu01.gwdg.de (Volker Lendecke)
|
||||
Maintained-by: lendecke@namu01.gwdg.de (Volker Lendecke)
|
||||
Author: lendecke@namu01.Num.Math.Uni-Goettingen.de (Volker Lendecke)
|
||||
Maintained-by: lendecke@namu01.Num.Math.Uni-Goettingen.de (Volker Lendecke)
|
||||
Primary-site: ftp.gwdg.de:/pub/linux/misc/ncpfs
|
||||
Alternate-site: sunsite.unc.edu:/pub/system/Filesystems/
|
||||
~120k ncpfs-0.22.tgz
|
||||
~ 1k ncpfs-0.22.lsm
|
||||
Alternate-site: sunsite.unc.edu:/pub/system/Filesystems/ncpfs
|
||||
~120k ncpfs-0.24.tgz
|
||||
~ 1k ncpfs-0.24.lsm
|
||||
Copying-policy: GPL
|
||||
End
|
||||
@@ -255,6 +255,10 @@ ipx_sap_find_nearest(int server_type, struct sockaddr_ipx *result,
|
||||
|
||||
if(bind(sock,(struct sockaddr*)&addr,sizeof(addr))==-1)
|
||||
{
|
||||
if (errno == EADDRNOTAVAIL)
|
||||
{
|
||||
errno = NCPL_ET_NO_INTERFACE;
|
||||
}
|
||||
goto finished;
|
||||
}
|
||||
|
||||
@@ -516,7 +520,7 @@ do_ncp_call(struct ncp_conn *conn, int request_size)
|
||||
*((struct ncp_request_header *)(&(conn->packet)));
|
||||
|
||||
int result;
|
||||
int retries = 3;
|
||||
int retries = 20;
|
||||
int len;
|
||||
long err;
|
||||
struct ncp_reply_header *r =
|
||||
@@ -538,7 +542,7 @@ do_ncp_call(struct ncp_conn *conn, int request_size)
|
||||
|
||||
re_select:
|
||||
len = ipx_recv(conn->ncp_sock,
|
||||
conn->packet, NCP_PACKET_SIZE, 0, 1, &err);
|
||||
conn->packet, NCP_PACKET_SIZE, 0, 3, &err);
|
||||
|
||||
if ( (len == sizeof(*r))
|
||||
&& (r->type == NCP_POSITIVE_ACK))
|
||||
@@ -753,9 +757,10 @@ ncp_connect_any(struct ncp_conn *conn, int wdog_needed)
|
||||
char name[NCP_BINDERY_NAME_LEN];
|
||||
long result;
|
||||
|
||||
if (ipx_sap_find_nearest(IPX_SAP_FILE_SERVER, &addr, name) != 0)
|
||||
if ((result = ipx_sap_find_nearest(IPX_SAP_FILE_SERVER,
|
||||
&addr, name)) != 0)
|
||||
{
|
||||
return -1;
|
||||
return result;
|
||||
}
|
||||
|
||||
if ((result = ncp_connect_addr(conn, &addr, wdog_needed)) != 0)
|
||||
@@ -1310,7 +1315,7 @@ ncp_fopen_nwc(const char *user, const char *mode)
|
||||
|
||||
struct ncp_conn_spec *
|
||||
ncp_find_conn_spec(const char *server, const char *user, const char *password,
|
||||
uid_t uid, long *err)
|
||||
int login_necessary, uid_t uid, long *err)
|
||||
{
|
||||
static struct ncp_conn_spec spec;
|
||||
|
||||
@@ -1407,6 +1412,12 @@ ncp_find_conn_spec(const char *server, const char *user, const char *password,
|
||||
}
|
||||
}
|
||||
|
||||
if (login_necessary == 0)
|
||||
{
|
||||
memset(spec.user, 0, sizeof(spec.user));
|
||||
memset(spec.password, 0, sizeof(spec.password));
|
||||
}
|
||||
|
||||
if (strlen(spec.user) == 0)
|
||||
{
|
||||
return &spec;
|
||||
@@ -1524,7 +1535,8 @@ ncp_initialize_as(int *argc, char **argv,
|
||||
i += 1;
|
||||
}
|
||||
|
||||
spec = ncp_find_conn_spec(server, user, password, getuid(), err);
|
||||
spec = ncp_find_conn_spec(server, user, password, login_necessary,
|
||||
getuid(), err);
|
||||
|
||||
if (spec == NULL)
|
||||
{
|
||||
|
||||
@@ -146,7 +146,7 @@ ncp_get_conn_ent(FILE *filep);
|
||||
|
||||
struct ncp_conn_spec *
|
||||
ncp_find_conn_spec(const char *server, const char *user, const char *password,
|
||||
uid_t uid, long *err);
|
||||
int login_necessary, uid_t uid, long *err);
|
||||
|
||||
long
|
||||
ncp_get_file_server_description_strings(struct ncp_conn *conn,
|
||||
|
||||
@@ -21,7 +21,16 @@ ec NCPL_ET_NO_SPEC,
|
||||
ec NCPL_ET_INVALID_MODE,
|
||||
"$HOME/.nwclient has invalid mode"
|
||||
|
||||
ec NCPL_ET_LOGIN_FAILED,
|
||||
"Login failed"
|
||||
ec NCPL_ET_LOGIN_DENIED,
|
||||
"Login denied"
|
||||
|
||||
ec NCPL_ET_NO_INTERFACE,
|
||||
"No primary IPX interface found"
|
||||
|
||||
ec NCPL_ET_NO_PASSWORD,
|
||||
"Could not get password"
|
||||
|
||||
ec NCPL_ET_PWD_TOO_LONG,
|
||||
"Password too long"
|
||||
|
||||
end
|
||||
@@ -10,7 +10,7 @@
|
||||
* a conditional which leaves out the test and load code.
|
||||
*
|
||||
* Even if we _do_ want ncpmount to load the module, passing a
|
||||
* fully-qualified pathname to insmod causes it to bypass a
|
||||
* fully-qualified pathname to modprobe causes it to bypass a
|
||||
* path search. This may lead to ncpfs.o not being found on
|
||||
* some systems.
|
||||
*/
|
||||
@@ -102,7 +102,7 @@ load_ncpfs(void)
|
||||
else if (pid == 0)
|
||||
{
|
||||
/* child */
|
||||
execl("/sbin/insmod", "insmod", "ncpfs", NULL);
|
||||
execl("/sbin/modprobe", "modprobe", "ncpfs", NULL);
|
||||
_exit(127); /* execl error */
|
||||
}
|
||||
else
|
||||
@@ -321,7 +321,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if ((spec = ncp_find_conn_spec(server, user, password, data.uid, &err))
|
||||
if ((spec = ncp_find_conn_spec(server,user,password,1, data.uid, &err))
|
||||
== NULL)
|
||||
{
|
||||
com_err(progname, err, "in find_conn_spec");
|
||||
|
||||
@@ -32,6 +32,7 @@ main(int argc, char *argv[])
|
||||
{
|
||||
struct ncp_conn *conn;
|
||||
char message[256];
|
||||
char *mount_point;
|
||||
struct ncp_fs_info info;
|
||||
struct passwd *pwd;
|
||||
char tty[256];
|
||||
@@ -53,7 +54,8 @@ main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((conn = ncp_open_mount(argv[1], &err)) == NULL)
|
||||
mount_point = argv[1];
|
||||
if ((conn = ncp_open_mount(mount_point, &err)) == NULL)
|
||||
{
|
||||
com_err(progname, err, "in ncp_open_mount");
|
||||
exit(1);
|
||||
@@ -104,7 +106,7 @@ main(int argc, char *argv[])
|
||||
|
||||
while ((mnt = getmntent(mtab)) != NULL)
|
||||
{
|
||||
if (strcmp(mnt->mnt_dir, conn->mount_point) == 0)
|
||||
if (strcmp(mnt->mnt_dir, mount_point) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user