public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 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 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 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 15:00 NCPFS flags all files executable on NetWare Volumes wit 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
  -- 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 23:54 Petr Vandrovec
2000-10-27 22:31 ` 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