Re: NCPFS overhaul

Petr Vandrovec Ing. VTEI (VANDROVE@vc.cvut.cz)
Wed, 1 Apr 1998 12:20:45 MET-1


Hello Dave, Alan and others,
Dave wrote:
> I'm like to overhaul the NCPFS code in the kernel so that a server (or volume)
> only needs to be mounted once, rather than being separately mounted by a suid
> mount program for each user.
> The idea is to get each user to log in to the server, and the kernel keeps the
> IPX connection open for them.
I'm thinking about NCP sockets for _2.3_. It allow NCP connection without
mount and you can then have more mountpoints using one connection. I do not
think that I'm able do this in few weeks and that Linus agrees with major
change of this code just before code freeze.
> Then when they attempt to access something on the ncpfs filesystem, the NCP
> call is made using their IPX connection.
> The local filesystem still keeps a cache for files and directories, but keeps a
> record of the Netware userid with the cached data, and refetches the data if
> the Netware userid is different.
It is done in UnixWare... But I'm not sure that my knowledge is good enough -
at this time data are cached in system (AFAIK) without owning user, only
path is relevant. That implies that directory contents must be same for
all users on that mountpoint. And that implies that this is not way to go.
If someone (not me :-)) changes it, we can talk about this again.
There is major difference between NCP and NFS - on NFS you see same thing
if you are root or nobody, but you see different things over NCP.

But "looks like" behavior can be done by "user environment symlinks" idea
which I saw month (two?) ago here (/netware -> /.netware/${USER}). And if you
set /.netware/${USER} to mode=700 and owner=${USER}.root, you are in.
I think that it is possible in userspace. But in this case, you still
need su-id mount or, better, daemon. And you can run out of 64
mountpoints :-(

And if we are talking about per-user mounts, there is NUC protocol
(undocumented) which allows full access to Netware volumes from Unix
(with user IDs, devices, links, symlinks). If someone is interested
in reverse engineering, it is NCP 0x5F :-) (Keep UnixWare handy).
> Users who aren't logged in to the Netware server are either refused access, or
> they get read-only access as the Netware user under which the filesystem was
> mounted, according to the mount flags.
Yes... /.netware/<thatuser> will be empty... But I do not think that
seamless integration of new, per user mounts and old, per system, is good
idea. I think that /netware should be reserved for user mounts. And root
can still mount per-system NCPFS volumes where he want (into /netware/user
too).
> The down side of this, and the reason I'm asking for approval, is that the
> table of Netware IPX connections for each user would then have to be kept by
> the kernel. I don't like the idea of doing that, the only alternative I can see
> is to have the whole thing done in userspace as a local NFS mount, which is
> likely to be horribly slow.
Not IPX, but NCP connections (sockets). And I do not see any reason
why not to have NCP connections in kernel. Since NCPFS 2.0.12.6 and
kernel 2.1.92.2 it is possible to access NetWare5 through native IP,
without IPX (at this time you must have IPX configured in kernel, sorry).
Petr Vandrovec
vandrove@vc.cvut.cz

P.S.: If you want immediate response, CC me. I read kernel-digest only.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu