| Summary: | user with login 'connected' shows bogus ftpd ps output | ||
|---|---|---|---|
| Product: | Base System | Reporter: | peter <peter> |
| Component: | misc | Assignee: | Yar Tikhiy <yar> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.2-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->analyzed Fixed in -current, thanks. The fix in -stable will follow. Responsible Changed From-To: freebsd-bugs->yar I'll take care of it. State Changed From-To: analyzed->closed Fixed in -stable and -current, thanks! |
If a user's loginname is 'connected', the setproctitle code in ftpd will show his login as "remote.host.name: connected". This same text is used for still-unauthenticated logins. This creates ambiguity. I ran into this problem while contemplating writing an ftpwho-like tool for FreeBSD, btw. Fix: A possible fix would be changing snprintf(proctitle, sizeof(proctitle), "%s: %s", remotehost, pw->pw_name); to snprintf(proctitle, sizeof(proctitle), "%s: user[%s]", remotehost, pw->pw_name); or something similar. How-To-Repeat: - proctitle before login ftpd: minor.dataloss.net: connected (ftpd) - proctitle after user 'peter' logs in ftpd: minor.dataloss.net: peter (ftpd) - proctitle before login ftpd: minor.dataloss.net: connected (ftpd) - proctitle after user 'connected' logs in ftpd: minor.dataloss.net: connected (ftpd)