From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <000e01c2b2a7$e43fbc60$b6b4fc3e@swlocal> From: "Steve Simon" To: "9fans" <9fans@cse.psu.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_000B_01C2B2A7.8C119400" Subject: [9fans] ftpfs tweeks for Netware 4.0 Date: Thu, 2 Jan 2003 21:40:19 +0000 Topicbox-Message-UUID: 3ace9bfa-eacb-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C2B2A7.8C119400 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_000B_01C2B2A7.8C119400 Content-Type: application/octet-stream; name="ftpfs.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ftpfs.diff" 53c53=0A= < static int nw_mode(char dirlet, char *s);=0A= ---=0A= > =0A= 593,603d592=0A= < case 8: /* New style */=0A= < s =3D s_copy(field[7]);=0A= < d.uid =3D field[2];=0A= < d.gid =3D d.uid;=0A= < d.mode =3D nw_mode(field[0][0], field[1]);=0A= < d.length =3D atoi(field[3]);=0A= < if(strchr(field[6], ':'))=0A= < d.atime =3D cracktime(field[4], field[5], nil, field[6]);=0A= < else=0A= < d.atime =3D cracktime(field[4], field[5], field[6], nil);=0A= < break;=0A= 1394c1383=0A= < if(s_len(path) > 0 && strcmp(s_to_c(path), "/") !=3D 0)=0A= ---=0A= > if(s_len(path) > 0)=0A= 1571,1593d1559=0A= < }=0A= < =0A= < static int=0A= < nw_mode(char dirlet, char *s) /* NetWare file mode mapping */=0A= < {=0A= < int mode =3D 0777;=0A= < =0A= < if(dirlet =3D=3D 'd')=0A= < mode |=3D DMDIR;=0A= < =0A= < if (strlen(s) >=3D 10 && s[0] !=3D '[' || s[9] !=3D ']')=0A= < return(mode);=0A= < =0A= < if (s[1] =3D=3D '-') /* can't read file */=0A= < mode &=3D ~0444;=0A= < if (dirlet =3D=3D 'd' && s[6] =3D=3D '-') /* cannot scan dir */=0A= < mode &=3D ~0444;=0A= < if (s[2] =3D=3D '-') /* can't write file */=0A= < mode &=3D ~0222;=0A= < if (dirlet =3D=3D 'd' && s[7] =3D=3D '-' && s[3] =3D=3D '-') /* = cannot create in, or modify dir */=0A= < mode &=3D ~0222;=0A= < =0A= < return(mode);=0A= ------=_NextPart_000_000B_01C2B2A7.8C119400--