Bug 2455

Summary: ftpwho gives wrong output
Product: [Retired] Red Hat Linux Reporter: Bert de Bruijn <bob>
Component: wu-ftpdAssignee: Jay Turner <jturner>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 6.0CC: cadams, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-06-08 14:36:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Bert de Bruijn 1999-05-01 00:28:42 UTC
[root@sun /root]# ftpwho
Service class local:
    1 ?        S      0:03 init
   -   1 users ( 10 maximum)

Apparently ftpwho fails to grep for the right process.
As far as I can tell, ftpwho does select the right class for
ftp-users, but always gives process info for init, never for
an ftpd process.

(I observed this bug on sparc and i386)

Comment 1 Jay Turner 1999-05-05 14:42:59 UTC
Verfied on 6.0 intel system.

Comment 2 Jeff Johnson 1999-05-26 21:08:59 UTC
*** Bug 3042 has been marked as a duplicate of this bug. ***

The 'ftpwho' program uses 'ps' to list the process and then
show the 'ftpd' process.  The 'ftpwho' program doesn't
understand the new output format of 'ps', so it shows
meaningless process.

------- Additional Comments From dkl@redhat.com  05/25/99 19:38 -------
I have verified this bug to be true in 6.0.

------- Additional Comments From bob@ccl.kuleuven.ac.be  05/25/99 23:17 -------
this is a duplicate of bug# 2455.

Comment 3 Jeff Johnson 1999-06-07 23:14:59 UTC
Fixed in wu-ftpd-2.5.0-1.

Comment 4 Derek Tattersall 1999-06-08 14:36:59 UTC
Tested all archs 4.2, 5.2, 6.0 8 JUN 1999

Comment 5 cadams 1999-06-11 19:11:59 UTC
There is still a bug in ftpcount/ftpwho: they try to open the PID file
O_RDWR (read/write), even though they only read from it.  This means
that only root can use ftpcount/ftpwho (which is not a security
problem - they just gather and present available information).  This
one line change will fix that:

--- wu-ftpd-2.5.0-clean/src/ftpcount.c  Fri Jun 11 14:04:56 1999
+++ wu-ftpd-2.5.0/src/ftpcount.c        Fri Jun 11 14:08:59 1999
@@ -229 +229 @@
-    pidfd = open(pidfile, O_RDWR, 0644);
+    pidfd = open(pidfile, O_RDONLY, 0644);