Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!uunet!panews.awdpa.ibm.com!ibmpa.awdpa.ibm.com!webb From: webb@ibmpa.awdpa.ibm.com (Bill Webb) Newsgroups: comp.sys.ibm.pc.rt Subject: Re: help with ftpd Message-ID: <1991Feb12.122613@ibmpa.awdpa.ibm.com> Date: 12 Feb 91 20:26:13 GMT References: <1991Feb11.210553.553@dartvax.dartmouth.edu> Sender: news@ibmpa.awdpa.ibm.com (news id) Reply-To: webb@ibmpa.awdpa.ibm.com (Bill Webb) Distribution: usa Organization: IBM AWD Paloalto Lines: 76 In article <1991Feb11.210553.553@dartvax.dartmouth.edu>, irvin@northstar7 (Tim Irvin) writes: |> I am trying to fix a bug with the ftpd on an RT running AOS. |> |> Background: |> |> The daemon drops the connection to a user when they issue the "dir" command |> to their ftp (which issues the LIST ftpd command). But, if they use |> "ls" (NLST) then all goes well. LIST tries to do a "/bin/ls -lg", while |> NLST does a "/bin/ls". I tried this on the current ftpd and on the shipped source for ftpd recompiled and didn't see the problem. |> |> My solution was to make LIST act just like NLST, to see if the problem would |> clear up. So I edited the ftpcmd.y command in the sources and tried to make |> ftpd. |> |> Now the fun part started: the compiler complained (horribly) that many |> function where being used with either too many args or too few args. These |> were all warnings, so it finished compiling, but the program would |> not work (as one might expect). The binary was about half as big as the |> current binary, leading me to believe that the binary IBM furnished didn't |> come from the source code. |> I recompiled the source and indeed got lots of warnings and the binary is smaller (I got 122880 when I compiled /usr/src/etc/ftpd, vrs 243712 for the /etc/ftpd on my system. However the resulting binary worked just fine. Most of the warnings are for a varargs-style function (reply) that isn't declared as such. If you get rid of the warnings with a -w on the compiler (set CFLAGS=-w -O in the Makefile) you don't get any complaints. If you look at a later version of ftpd (e.g. BSD reno) you will see that reply has been reworked with lots of dummy arguments. The reason for different versions of ftpd is that if you have AFS (Andrew File System) installed on your system it replaces the standard ftpd with a version that authenticates with AFS (the latest versions of AFS use kerberos for that, but I think the version shipped with AFS in DEC 88 didn't). |> So what I need is: |> |> 1) a fix to our initial problem |> Since I couldn't recreate it it's hard to diagnose what the problem was. I suggest you recompile the ORIGINAL sources and see if the problem still exists. Here's an ls -l on the sources I used: total 55 drwxrwxr-x 2 webb audit 512 Feb 12 12:30 . drwxrwxr-x 7 webb audit 1024 Feb 12 11:56 .. -rw-r--r-- 1 root system 716 Dec 9 1988 Makefile -rw-r--r-- 1 root system 16219 Dec 9 1988 ftpcmd.y -rw-r--r-- 1 root system 24168 Dec 9 1988 ftpd.c -rw-r--r-- 1 root system 9843 Dec 9 1988 glob.c -rw-r--r-- 1 root system 665 Dec 9 1988 newvers.sh -rw-r--r-- 1 webb audit 63 Feb 12 12:00 vers.c -rw-r--r-- 1 webb audit 4 Feb 12 12:00 version |> or |> |> 2) source code that will compile |> If you are using AFS then look in the AFS code for the source of ftpd that should give you the original binary that you had, then work from there. If you don't use AFS then the shipped source should be fine. |> Tim Irvin ---------------------------------------------------------------- The above views are my own, not necessarily those of my employer. Bill Webb (IBM AWD Palo Alto, Ca.), (415) 855-4457. UUCP: ...!uunet!ibmsupt!webb INTERNET: webb@ibminet.awdpa.ibm.com