* Re: NCPFS flags all files executable on NetWare Volumes wit
@ 2000-10-27 15:00 Petr Vandrovec
2000-10-27 16:57 ` Jeff V. Merkey
0 siblings, 1 reply; 8+ messages in thread
From: Petr Vandrovec @ 2000-10-27 15:00 UTC (permalink / raw)
To: Jeff V. Merkey; +Cc: linux-kernel
On 27 Oct 00 at 0:16, Jeff V. Merkey wrote:
> I noticed NCPFS is flagging all the files on a native NetWare volume as
> executable and chmod -x does not work, even if the NetWare server has
> the NFS namespace loaded. I looked at you code in more detail, and I
> did not see support their for the NFS/Unix namespace.
> Is this in a newer version, or has it not been implemented yet? I was
> testing with MARS and Native NetWare this evening and saw this. If the
> NFS namespace is loaded, you should be able to get to it and access and
> set all these bits in the file system namespace directory records.
>
> Do you need any info from me to get this working, or is there another
> version where I can get this for Ute-Linux?
Hi Jeff,
ncpfs does not support NFS fields, as access through namespace functions
is hopelessly broken (modify ns specific info has swapped some bits
in mask which data update and which not), and it also adds some (100%)
overhead on directory/inode lookups, as you must ask twice - first for
non-NFS info, and second for NFS specific...
There exists patch from Ben Harris <bjh21@cus.cam.ac.uk>, which adds
this feature to 2.2.16 kernel and 2.2.0.17 ncpfs. You can download
it from ftp://platan.vc.cvut.cz/pub/linux/ncpfs/ncp{1,2}.pat. ncp1.pat
is kernel patch (including email headers; cut them if applying), ncp2.pat
is patch for 2.2.0.17 ncpfs userspace - it adds mount option "nfsextras".
(I apologize to Ben - I promised to integrate it into ncpfs, and into
2.4 kernel, but...)
Except that, you can make all files non-executable by using
"filemode=0644" mount option. Or you can use "extras,symlinks", in which
case (NFS namespace incompatible) hidden/shareable/transactional attributes
are used to signal executability of file...
If you have some document which describes what each NFS specific field
does - currently ncpfs names them "name", "mode", "gid", "nlinks", "rdev",
"link", "created", "uid", "acsflag" and "myflag" - if I remember correctly,
it is how Unixware 2.0 nuc.h names them. And I did not found any information
about layout of NFS huge info, which is used for hardlinks :-(
Also, as NCP 87,8 kills almost every NW server I know, if used namespace
is NFS, I'm a bit sceptic about usability of NCP 87,* on NFS namespace.
In 1998 and 1999 I tried to ask Novell for documentation of NCP 95,*
(Netware Unix Client), but it was refused and ignored, so... here we are.
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz
P.S.: Jeff, if you want, there is ncpfs/MaRS/LinWare specific list,
linware@sh.cvut.cz. Subscribe: "subscribe linware" to "listserv@sh.cvut.cz".
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: NCPFS flags all files executable on NetWare Volumes wit
2000-10-27 15:00 Petr Vandrovec
@ 2000-10-27 16:57 ` Jeff V. Merkey
2000-10-27 17:11 ` Jeff V. Merkey
0 siblings, 1 reply; 8+ messages in thread
From: Jeff V. Merkey @ 2000-10-27 16:57 UTC (permalink / raw)
To: Petr Vandrovec; +Cc: linux-kernel
On Fri, Oct 27, 2000 at 03:00:31PM +0000, Petr Vandrovec wrote:
> On 27 Oct 00 at 0:16, Jeff V. Merkey wrote:
> > I noticed NCPFS is flagging all the files on a native NetWare volume as
> > executable and chmod -x does not work, even if the NetWare server has
> > the NFS namespace loaded. I looked at you code in more detail, and I
> > did not see support their for the NFS/Unix namespace.
>
> > Is this in a newer version, or has it not been implemented yet? I was
> > testing with MARS and Native NetWare this evening and saw this. If the
> > NFS namespace is loaded, you should be able to get to it and access and
> > set all these bits in the file system namespace directory records.
> >
> > Do you need any info from me to get this working, or is there another
> > version where I can get this for Ute-Linux?
>
> Hi Jeff,
> ncpfs does not support NFS fields, as access through namespace functions
> is hopelessly broken (modify ns specific info has swapped some bits
> in mask which data update and which not), and it also adds some (100%)
> overhead on directory/inode lookups, as you must ask twice - first for
> non-NFS info, and second for NFS specific...
>
> There exists patch from Ben Harris <bjh21@cus.cam.ac.uk>, which adds
> this feature to 2.2.16 kernel and 2.2.0.17 ncpfs. You can download
> it from ftp://platan.vc.cvut.cz/pub/linux/ncpfs/ncp{1,2}.pat. ncp1.pat
> is kernel patch (including email headers; cut them if applying), ncp2.pat
> is patch for 2.2.0.17 ncpfs userspace - it adds mount option "nfsextras".
> (I apologize to Ben - I promised to integrate it into ncpfs, and into
> 2.4 kernel, but...)
>
> Except that, you can make all files non-executable by using
> "filemode=0644" mount option. Or you can use "extras,symlinks", in which
> case (NFS namespace incompatible) hidden/shareable/transactional attributes
> are used to signal executability of file...
>
> If you have some document which describes what each NFS specific field
> does - currently ncpfs names them "name", "mode", "gid", "nlinks", "rdev",
> "link", "created", "uid", "acsflag" and "myflag" - if I remember correctly,
> it is how Unixware 2.0 nuc.h names them. And I did not found any information
> about layout of NFS huge info, which is used for hardlinks :-(
>
> Also, as NCP 87,8 kills almost every NW server I know, if used namespace
> is NFS, I'm a bit sceptic about usability of NCP 87,* on NFS namespace.
>
> In 1998 and 1999 I tried to ask Novell for documentation of NCP 95,*
> (Netware Unix Client), but it was refused and ignored, so... here we are.
> Best regards,
> Petr Vandrovec
> vandrove@vc.cvut.cz
Petr,
I've got the info you need including the layout of the NFS namspace
records. For a start, grab NWFS and look at the NFS structure in
NWDIR.H. The fields you have to provide are there. There are some
funky ones in this structure. You are correct regarding the NCP
extensions to support this. They are about 12 years old, BTW and are
not even supported any longer (no one has worked on this at Novell
since about 1994).
I will put together a complete description today (will take a couple
of hours) and post to the list on the implementation of of the NFS
namespace over the wire. Hardlinks use a root DirNo handle that
must point back to the DOS namespace record that owns the FAT chain
and this is probably the only nasty thing to deal with here.
I'll get started immediately.
:-)
Jeff
>
> P.S.: Jeff, if you want, there is ncpfs/MaRS/LinWare specific list,
> linware@sh.cvut.cz. Subscribe: "subscribe linware" to "listserv@sh.cvut.cz".
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: NCPFS flags all files executable on NetWare Volumes wit
2000-10-27 16:57 ` Jeff V. Merkey
@ 2000-10-27 17:11 ` Jeff V. Merkey
2000-10-27 19:46 ` Jeff V. Merkey
0 siblings, 1 reply; 8+ messages in thread
From: Jeff V. Merkey @ 2000-10-27 17:11 UTC (permalink / raw)
To: Petr Vandrovec; +Cc: linux-kernel
On Fri, Oct 27, 2000 at 10:57:54AM -0600, Jeff V. Merkey wrote:
> On Fri, Oct 27, 2000 at 03:00:31PM +0000, Petr Vandrovec wrote:
> > On 27 Oct 00 at 0:16, Jeff V. Merkey wrote:
> > > I noticed NCPFS is flagging all the files on a native NetWare volume as
> > > executable and chmod -x does not work, even if the NetWare server has
> > > the NFS namespace loaded. I looked at you code in more detail, and I
> > > did not see support their for the NFS/Unix namespace.
> >
> > > Is this in a newer version, or has it not been implemented yet? I was
> > > testing with MARS and Native NetWare this evening and saw this. If the
> > > NFS namespace is loaded, you should be able to get to it and access and
> > > set all these bits in the file system namespace directory records.
> > >
> > > Do you need any info from me to get this working, or is there another
> > > version where I can get this for Ute-Linux?
> >
> > Hi Jeff,
> > ncpfs does not support NFS fields, as access through namespace functions
> > is hopelessly broken (modify ns specific info has swapped some bits
> > in mask which data update and which not), and it also adds some (100%)
> > overhead on directory/inode lookups, as you must ask twice - first for
> > non-NFS info, and second for NFS specific...
> >
> > There exists patch from Ben Harris <bjh21@cus.cam.ac.uk>, which adds
> > this feature to 2.2.16 kernel and 2.2.0.17 ncpfs. You can download
> > it from ftp://platan.vc.cvut.cz/pub/linux/ncpfs/ncp{1,2}.pat. ncp1.pat
> > is kernel patch (including email headers; cut them if applying), ncp2.pat
> > is patch for 2.2.0.17 ncpfs userspace - it adds mount option "nfsextras".
> > (I apologize to Ben - I promised to integrate it into ncpfs, and into
> > 2.4 kernel, but...)
> >
> > Except that, you can make all files non-executable by using
> > "filemode=0644" mount option. Or you can use "extras,symlinks", in which
> > case (NFS namespace incompatible) hidden/shareable/transactional attributes
> > are used to signal executability of file...
> >
> > If you have some document which describes what each NFS specific field
> > does - currently ncpfs names them "name", "mode", "gid", "nlinks", "rdev",
> > "link", "created", "uid", "acsflag" and "myflag" - if I remember correctly,
Oh, and:
created is always set to 1 for the root entry.
acsflag is whehter NetWare or the NFS client last accessed the file
name is the name
mode CANNOT contain NFS v3.0 style permissions it's on v2.0 -- pipe and
fifo will hang the NetWare server, so mask these off.
nlinks is the number of hardlinks to a file.
rdev is the same as rdev in Linux
flags(myflag) contains the following values:
#define NFS_HASSTREAM_HARD_LINK 1 // indicates this record has the FAT chain
#define NFS_SYMBOLIC_LINK 2
#define NFS_HARD_LINK 3
There's also three linkage fields you have to fill out:
LinkNextDirNo // next record in the hardlink chain
LinkEndDirNo // always the dir record that holds the fat chain
LinkPreDirNo // previous record in the hardlink chain
records are added at the HEAD and not the TAIL of the linkage. The
root record is always at the END and not the HEAD of the list.
:-)
Jeff
I'll go dig up the specific NCP extensions and get them to you.
:-)
Jeff
> > it is how Unixware 2.0 nuc.h names them. And I did not found any information
> > about layout of NFS huge info, which is used for hardlinks :-(
> >
> > Also, as NCP 87,8 kills almost every NW server I know, if used namespace
> > is NFS, I'm a bit sceptic about usability of NCP 87,* on NFS namespace.
> >
> > In 1998 and 1999 I tried to ask Novell for documentation of NCP 95,*
> > (Netware Unix Client), but it was refused and ignored, so... here we are.
> > Best regards,
> > Petr Vandrovec
> > vandrove@vc.cvut.cz
>
>
> Petr,
>
> I've got the info you need including the layout of the NFS namspace
> records. For a start, grab NWFS and look at the NFS structure in
> NWDIR.H. The fields you have to provide are there. There are some
> funky ones in this structure. You are correct regarding the NCP
> extensions to support this. They are about 12 years old, BTW and are
> not even supported any longer (no one has worked on this at Novell
> since about 1994).
>
> I will put together a complete description today (will take a couple
> of hours) and post to the list on the implementation of of the NFS
> namespace over the wire. Hardlinks use a root DirNo handle that
> must point back to the DOS namespace record that owns the FAT chain
> and this is probably the only nasty thing to deal with here.
>
> I'll get started immediately.
>
> :-)
>
> Jeff
>
>
>
>
> >
> > P.S.: Jeff, if you want, there is ncpfs/MaRS/LinWare specific list,
> > linware@sh.cvut.cz. Subscribe: "subscribe linware" to "listserv@sh.cvut.cz".
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> Please read the FAQ at http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: NCPFS flags all files executable on NetWare Volumes wit
2000-10-27 17:11 ` Jeff V. Merkey
@ 2000-10-27 19:46 ` Jeff V. Merkey
0 siblings, 0 replies; 8+ messages in thread
From: Jeff V. Merkey @ 2000-10-27 19:46 UTC (permalink / raw)
To: Jeff V. Merkey; +Cc: Petr Vandrovec, linux-kernel
Petr,
Here's the complete set of 3.x/4.x/5.x Namespace NCP calls with proper
return codes. I'll run down the huge-data info and post a bit later.
1.
NCP code 2222/5716
Generate Directory Base and Volume Number
Returns the directory base for the file or directory in the name space
associated with
"namespace"
Request Packet (20 to ? bytes)
index bytes type or value description
0 6 structure Request Packet Header
6 2 0x5716 NCP Function Code
8 1 Namespace Namespace number (0-DOS, 2-NFS,
4-LONG, 1-MAC)
9 3 reserved '000''s
12 1 Volume Number The volume the file resides in.
13 4 ComponentHandle
17 1 ComponentHandleFlag
18 1 The number of components in
ComponentPath
19 1...? ComponentPath
Reply Packet (17 bytes)
index bytes type or value description
0 8 structure Server Response Header
8 4 The directory base of the file or
directory in the
namespace associated with
Namespace
12 4 The directory base of the file or
directory in the DOS Name Space (The FAT Chain head)
16 1 Volume Number
Completion codes
0x00 OK
2.
NCP code 2222/5717
Query Name Space Information Format
Attempts to return the format of the information for the specified name
space on the volume associated with VolumeNumber.
Request Packet (10 bytes)
index bytes type or value description
0 6 structure Request Packet Header
6 2 0x5717 NCP Function Code
8 1 Namespace
9 1 Volume Number
Reply Packet (154 bytes)
index bytes type or value description
0 8 structure ServerResponseHeader
8 4 fixed bit mask
12 4 variable bit mask
16 4 huge bit mask
20 2 fixed bits defined
22 2 variable bits defined
24 2 huge bits defined
26 128 fields length table (for NFS,
this is the NFS structure in NWDIR.H in NWFS)
Completion codes
0x00 OK
3.
NCP code 2222/5719
Set Name Space Information
Attempts to set iformation specific to the name space for the specified
entity.
Request Packet (531 bytes)
index bytes type or value description
0 6 structure RequestPacketHeader
6 2 0x5719 NCPFunctionCode
8 1 Source Name Space
9 1 Destination Name Space
10 1 Volume Number
11 4 DirEntry
15 4 NSInfoBitMask
19 512 NSSpecificInfo (the modified
namespace records)
Reply Packet (8 bytes)
index bytes type or value description
0 8 structure ServerResponseHeader
Completion Codes
0x00 OK
4.
NCP code 222/571B
Set Huge Name Space Information
Attempts to set the huge Namespace information for the entity associated
with DirEntry
Request Packet (39 bytes)
index bytes type of value description
0 6 structure RequestPacketHeader
6 2 0x571B NCPFunctionCode
8 1 Namespace
9 1 Volume Number
10 4 DirEntry
14 4 HugeMask
18 16 HugeStateInfo
34 4 HugeDataLength
38 1 HugeData
Reply Packet (28 bytes)
index bytes type or value description
0 8 structure ServerResponseHeader
8 16 HugeStateInfo
24 4 Total Amount of Huge Data Used
Completion Code
0x00 OK
I have the formats for the other NameSpace NCPs, but it looks like your
code is handling these. If you need them,
let me know. I have a 600 page document I wrote two years ago that
details every single NCP and NDS NCP used,
and can send it to you via UPS in .cz. It's too big to fax, or post.
The format of the namespace records is the same as in NWDIR.H in NWFS --
NetWare just passes them through to the client
so all the field layouts are there. Unless the NFS server is loaded on
NetWare, you can just about write anythin you
want into the NFS namespace, since NetWare does not check the namespace
records (other than the first seven common fields
that are the same for all namespace records). If NFSSERV.NLM loads on
the server, he does do a consistency check and
will vrepair the volume if any of the fields are hosed.
Other NCPs you may need (let me know if you need these as well) -- looks
like you are already implementing these correctly.
2222/5714 Get Name Space Information
2222/5715 Search for a File or Subdirectory
2222/5715 Get Path String from Short Dir Handle
2222/5718 Get Name Spaces Loaded List from Volume Number
2222/571C Get Full Path String
2222/571D Get Effective Directory Rights
2222/6801 Ping for NDS NCP
2222/6802 Send NDS FRagment/Reply
2222/6803 Close NDS Fragment
2222/6804 Return Bindery Context (you need to implement this one
-- I did not see it in your code)
2222/6805 Monitor NDS Connection (this one will allow you to
intercept NDS replica packets and suck an NDS replica local)
2222/162F Get Name Space Information
2222/1630 Get Name Space Directory Entry
2222/1631 Open Data Stream (this NCP will allow you to open the
MAC namespace data fork and read it remotely for MAC clients)
:-)
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: NCPFS flags all files executable on NetWare Volumes wit
2000-10-27 22:18 Petr Vandrovec
@ 2000-10-27 21:14 ` Jeff V. Merkey
0 siblings, 0 replies; 8+ messages in thread
From: Jeff V. Merkey @ 2000-10-27 21:14 UTC (permalink / raw)
To: Petr Vandrovec; +Cc: linux-kernel
Petr Vandrovec wrote:
>
> On 27 Oct 00 at 13:46, Jeff V. Merkey wrote:
> > Here's the complete set of 3.x/4.x/5.x Namespace NCP calls with proper
> > return codes. I'll run down the huge-data info and post a bit later.
>
> Thanks. Main problem with hardlinks is that unlink through NFS namespace
> kills server (at least up to 5.0, I did not checked it during last few
> months), and unlink through DOS (or OS2) namespace removes all instances
> of hardlinked file :-( A bit unfortunate behavior.
Where are you doing this in the code? I'll go look at it and attempt a
fix. It's killing the server because the linkage fields are probably
not getting set. If NFSSERV is loaded, and the
links ever get hosed, you will get an Abend on 3.x and 4.x, and a
"process suspended" error on 5.x (which also hangs the server). If the
wrong pipe of fifo octals get set in mode,
it will also hang the server. If it is removing the entire namespace
with hardlinks, it's
also because these linkage fields are not getting set properly. It does
not work this way
with the NetWare NFSSERV.NLM mounted as an NFS client from Linux.
>
> > let me know. I have a 600 page document I wrote two years ago that
> > details every single NCP and NDS NCP used,
> > and can send it to you via UPS in .cz. It's too big to fax, or post.
>
> Not for now.
>
> > 2222/6804 Return Bindery Context (you need to implement this one
> > -- I did not see it in your code)
>
> ncpfs 2.2.0.18 implements this (lib/ds/bindctx.c:NWDSGetBinderyContext),
> but does not use it itself...
It should. It will allow you to use NDS with your existing code and NCP
suite. I guess
doug's next project at TRG will be to put in NDS support in NCPFS and
submit the patches to you.
>
> > 2222/6805 Monitor NDS Connection (this one will allow you to
> > intercept NDS replica packets and suck an NDS replica local)
>
> Novell documentation is a bit - hmm - unclear on this one...
There's some undocumented diagnostic calls in NDS that basically render
it totally unsuitable for the internet and make it easy to hack. It's
great for LANs in an organization where the
servers can all be locked up, and employees can get fired for hacking.
On the internet, it's
a piece of "swiss cheese" and is vulnerable in many respects.
>
> > 2222/1631 Open Data Stream (this NCP will allow you to open the
> > MAC namespace data fork and read it remotely for MAC clients)
>
> Userspace ncpfs (specifically ncopy) uses
> (lib/filemgmt.c:ncp_ns_open_create_entry) NCP 87,30 or 87,33 for this
> (and NW3.x is out of luck, AFAIK). Kernel code does not support MAC
> forks (and ACL and extended attributes), as up to now there is no
> vfs API for this... You have to use ncopy,nwdir/nwrights,
> nwtrustee,...,nwdir/eaops,nwdir for accessing MAC(&FTAM)/ACL/EAs for now.
> (for EAs you must have post-August 27 ncpfs, betas are on
> ftp://platan.vc.cvut.cz/private/ncpfs)
You can expose these as .files the way HFS likes to see them, and MAC
clients to a Linux box
will be able to see and store their data in native MAC format -- with
finder info.
Jeff
> Thanks,
> Petr Vandrovec
> vandrove@vc.cvut.cz
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> Please read the FAQ at http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: NCPFS flags all files executable on NetWare Volumes wit
@ 2000-10-27 22:18 Petr Vandrovec
2000-10-27 21:14 ` Jeff V. Merkey
0 siblings, 1 reply; 8+ messages in thread
From: Petr Vandrovec @ 2000-10-27 22:18 UTC (permalink / raw)
To: Jeff V. Merkey; +Cc: linux-kernel
On 27 Oct 00 at 13:46, Jeff V. Merkey wrote:
> Here's the complete set of 3.x/4.x/5.x Namespace NCP calls with proper
> return codes. I'll run down the huge-data info and post a bit later.
Thanks. Main problem with hardlinks is that unlink through NFS namespace
kills server (at least up to 5.0, I did not checked it during last few
months), and unlink through DOS (or OS2) namespace removes all instances
of hardlinked file :-( A bit unfortunate behavior.
> let me know. I have a 600 page document I wrote two years ago that
> details every single NCP and NDS NCP used,
> and can send it to you via UPS in .cz. It's too big to fax, or post.
Not for now.
> 2222/6804 Return Bindery Context (you need to implement this one
> -- I did not see it in your code)
ncpfs 2.2.0.18 implements this (lib/ds/bindctx.c:NWDSGetBinderyContext),
but does not use it itself...
> 2222/6805 Monitor NDS Connection (this one will allow you to
> intercept NDS replica packets and suck an NDS replica local)
Novell documentation is a bit - hmm - unclear on this one...
> 2222/1631 Open Data Stream (this NCP will allow you to open the
> MAC namespace data fork and read it remotely for MAC clients)
Userspace ncpfs (specifically ncopy) uses
(lib/filemgmt.c:ncp_ns_open_create_entry) NCP 87,30 or 87,33 for this
(and NW3.x is out of luck, AFAIK). Kernel code does not support MAC
forks (and ACL and extended attributes), as up to now there is no
vfs API for this... You have to use ncopy,nwdir/nwrights,
nwtrustee,...,nwdir/eaops,nwdir for accessing MAC(&FTAM)/ACL/EAs for now.
(for EAs you must have post-August 27 ncpfs, betas are on
ftp://platan.vc.cvut.cz/private/ncpfs)
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: NCPFS flags all files executable on NetWare Volumes wit
2000-10-27 23:54 NCPFS flags all files executable on NetWare Volumes wit Petr Vandrovec
@ 2000-10-27 22:31 ` Jeff V. Merkey
0 siblings, 0 replies; 8+ messages in thread
From: Jeff V. Merkey @ 2000-10-27 22:31 UTC (permalink / raw)
To: Petr Vandrovec; +Cc: linux-kernel
Petr Vandrovec wrote:
>
>
>
> In kernel fs/ncpfs/ncplib_kernel.c, there is function named
> ncp_del_file_or_subdir() which does:
>
> #ifdef CONFIG_NCPFS_NFS_NS
> if (server->name_space[volnum] == NW_NS_NFS)
> {
> int result;
>
> result = ncp_obtain_DOS_dir_base(server, volnum, dirent, name, &dirent);
> if (result) return result;
> return ncp_DeleteNSEntry(server, 1, volnum, dirent, NULL, NW_NS_DOS,
> htons(0x0680));
What wrong here is you have to read in each NS record (and the records
for the parent
file) and modify them. You are just doing one and expecting the server
to do the work
of unlinking just the one. You have to do each link yourself. I will
fix.
> }
> else
> #endif
> return ncp_DeleteNSEntry(server, 1, volnum, dirent, name,
> server->name_space[volnum], htons(0x0680));
>
> If you'll remove #ifdef-ed part, and you'll try to unlink some file
> using NFS namespace, server dies (on traditional filesystem, NSS works)
> with some internal inconsistency found error. Depending on search
> attributes (0x8006) passed to function, it either works only for directories
> (and abend for files), or works only for dirs (and refuses files), or
> does not work at all.
>
>
> > You can expose these as .files the way HFS likes to see them, and MAC
> > clients to a Linux box
> > will be able to see and store their data in native MAC format -- with
> > finder info.
>
> It is possible when using DOS or OS/2 namespace. But as NFS namespace
> allows all byte sequences up to 255 chars for filename (excluding chars
> 0, '/' and names "." and "..")...
I have code that translates MAC to DOS, DOS to NFS, NFS to MAC, etc.
You have to convert the
names using the tables in NWFS, file NWCREATE.C. There are tables I use
to generate the
MAC names from an NFS name using these tables of valid and invalid
characters for each
namespace. I have to do it for all the server Namespaces, since Netware
can cross mount
NWFS volumes created under Linux.
Jeff
> Best regards,
> Petr Vandrovec
> vandrove@vc.cvut.cz
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: NCPFS flags all files executable on NetWare Volumes wit
@ 2000-10-27 23:54 Petr Vandrovec
2000-10-27 22:31 ` Jeff V. Merkey
0 siblings, 1 reply; 8+ messages in thread
From: Petr Vandrovec @ 2000-10-27 23:54 UTC (permalink / raw)
To: Jeff V. Merkey; +Cc: linux-kernel
On 27 Oct 00 at 15:14, Jeff V. Merkey wrote:
> Petr Vandrovec wrote:
> >
> > On 27 Oct 00 at 13:46, Jeff V. Merkey wrote:
> > > Here's the complete set of 3.x/4.x/5.x Namespace NCP calls with proper
> > > return codes. I'll run down the huge-data info and post a bit later.
> >
> > Thanks. Main problem with hardlinks is that unlink through NFS namespace
> > kills server (at least up to 5.0, I did not checked it during last few
> > months), and unlink through DOS (or OS2) namespace removes all instances
> > of hardlinked file :-( A bit unfortunate behavior.
>
> Where are you doing this in the code? I'll go look at it and attempt a
> fix. It's killing the server because the linkage fields are probably
> not getting set. If NFSSERV is loaded, and the
In kernel fs/ncpfs/ncplib_kernel.c, there is function named
ncp_del_file_or_subdir() which does:
#ifdef CONFIG_NCPFS_NFS_NS
if (server->name_space[volnum] == NW_NS_NFS)
{
int result;
result = ncp_obtain_DOS_dir_base(server, volnum, dirent, name, &dirent);
if (result) return result;
return ncp_DeleteNSEntry(server, 1, volnum, dirent, NULL, NW_NS_DOS,
htons(0x0680));
}
else
#endif
return ncp_DeleteNSEntry(server, 1, volnum, dirent, name,
server->name_space[volnum], htons(0x0680));
If you'll remove #ifdef-ed part, and you'll try to unlink some file
using NFS namespace, server dies (on traditional filesystem, NSS works)
with some internal inconsistency found error. Depending on search
attributes (0x8006) passed to function, it either works only for directories
(and abend for files), or works only for dirs (and refuses files), or
does not work at all.
> links ever get hosed, you will get an Abend on 3.x and 4.x, and a
> "process suspended" error on 5.x (which also hangs the server). If the
It is always without any modifications through NFS namespace info, as
I'm not using it at all.
> also because these linkage fields are not getting set properly. It does
> not work this way
> with the NetWare NFSSERV.NLM mounted as an NFS client from Linux.
NUC interface is also OK (as unixware happily uses that), only NCP 87,8
is broken. I did not ever tried to unlink file if NFSSERV is loaded...
> > > 2222/6804 Return Bindery Context (you need to implement this one
> > > -- I did not see it in your code)
> >
> > ncpfs 2.2.0.18 implements this (lib/ds/bindctx.c:NWDSGetBinderyContext),
> > but does not use it itself...
>
> It should. It will allow you to use NDS with your existing code and NCP
> suite. I guess
> doug's next project at TRG will be to put in NDS support in NCPFS and
> submit the patches to you.
ncpfs (2.2.0.18/2.2.0.19pre) supports almost complete documented NWDS*
set of functions. Only thing missing are ACL assigning code, you must
do it yourself through NWDSModifyObject calls.
> > Userspace ncpfs (specifically ncopy) uses
> > (lib/filemgmt.c:ncp_ns_open_create_entry) NCP 87,30 or 87,33 for this
> > (and NW3.x is out of luck, AFAIK). Kernel code does not support MAC
> > forks (and ACL and extended attributes), as up to now there is no
> > vfs API for this... You have to use ncopy,nwdir/nwrights,
> > nwtrustee,...,nwdir/eaops,nwdir for accessing MAC(&FTAM)/ACL/EAs for now.
> > (for EAs you must have post-August 27 ncpfs, betas are on
> > ftp://platan.vc.cvut.cz/private/ncpfs)
>
> You can expose these as .files the way HFS likes to see them, and MAC
> clients to a Linux box
> will be able to see and store their data in native MAC format -- with
> finder info.
It is possible when using DOS or OS/2 namespace. But as NFS namespace
allows all byte sequences up to 255 chars for filename (excluding chars
0, '/' and names "." and "..")...
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2000-10-27 22:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-27 23:54 NCPFS flags all files executable on NetWare Volumes wit Petr Vandrovec
2000-10-27 22:31 ` Jeff V. Merkey
-- strict thread matches above, loose matches on Subject: below --
2000-10-27 22:18 Petr Vandrovec
2000-10-27 21:14 ` Jeff V. Merkey
2000-10-27 15:00 Petr Vandrovec
2000-10-27 16:57 ` Jeff V. Merkey
2000-10-27 17:11 ` Jeff V. Merkey
2000-10-27 19:46 ` Jeff V. Merkey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox