9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Steve Simon" <steve.simon@ntlworld.com>
To: "9fans" <9fans@cse.psu.edu>
Subject: [9fans] ftpfs tweeks for Netware 4.0
Date: Thu,  2 Jan 2003 21:40:19 +0000	[thread overview]
Message-ID: <000e01c2b2a7$e43fbc60$b6b4fc3e@swlocal> (raw)

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

Hi,

Attached are diffs for ftpfs to make it happier
with Netware4.

One fix, the Netware ftp server will not allow
a CWD to a path which starts with two slashes.

A bug in ftpfs does exactly this if the remote mount
point is '/' and  thus you cannot access anything
below the root directory on the server.

Also a few tweeks to parse the new LIST -L format.

Share and enjoy.

-Steve


[-- Attachment #2: ftpfs.diff --]
[-- Type: application/octet-stream, Size: 1146 bytes --]

53c53
< static int	nw_mode(char dirlet, char *s);
---
> 
593,603d592
< 		case 8:		/* New style */
< 			s = s_copy(field[7]);
< 			d.uid = field[2];
< 			d.gid = d.uid;
< 			d.mode = nw_mode(field[0][0], field[1]);
< 			d.length = atoi(field[3]);
< 			if(strchr(field[6], ':'))
< 				d.atime = cracktime(field[4], field[5], nil, field[6]);
< 			else
< 				d.atime = cracktime(field[4], field[5], field[6], nil);
< 			break;
1394c1383
< 	if(s_len(path) > 0 && strcmp(s_to_c(path), "/") != 0)
---
> 	if(s_len(path) > 0)
1571,1593d1559
< }
< 
< static int
< nw_mode(char dirlet, char *s)		/* NetWare file mode mapping */
< {
< 	int mode = 0777;
< 
< 	if(dirlet == 'd')
< 		mode |= DMDIR;
< 
< 	if (strlen(s) >= 10 && s[0] != '[' || s[9] != ']')
< 		return(mode);
< 
< 	if (s[1] == '-')					/* can't read file */
< 		mode &= ~0444;
< 	if (dirlet == 'd' && s[6] == '-')			/* cannot scan dir */
< 		mode &= ~0444;
< 	if (s[2] == '-')					/* can't write file */
< 		mode &= ~0222;
< 	if (dirlet == 'd' && s[7] == '-' && s[3] == '-')	/* cannot create in, or modify dir */
< 		mode &= ~0222;
< 
< 	return(mode);

             reply	other threads:[~2003-01-02 21:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-02 21:40 Steve Simon [this message]
2003-01-03  0:23 ` David Presotto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000e01c2b2a7$e43fbc60$b6b4fc3e@swlocal' \
    --to=steve.simon@ntlworld.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).