Commit a4a72c30 authored by Christoph Biedl's avatar Christoph Biedl Committed by Josué Ortega

Import Debian changes 0.17-15.2

bsd-finger (0.17-15.2) unstable; urgency=medium

  * Non-maintainer upload
  * Use cmake as build system. Closes: #873085, #912121

bsd-finger (0.17-15.1) unstable; urgency=medium

  * Non-maintainer upload.
  * Do not specify bzip2 compressor to dh_builddeb
    (Closes: #833210)

bsd-finger (0.17-15) unstable; urgency=low

  * Fix "finger client causes long timeouts"
    Add 06-572211-decrease-timeout.patch 
    Patch by Mats Erik Andersson
    Closes: #572211
  * Suggests: finger
    Closes: #622105
  * Enable hardened build flags
  * DH compatibility level is 9
  * Standards version is 3.9.3
  * Debian source format is 3.0 (quilt)
  * Fix debian-rules-missing-recommended-target

bsd-finger (0.17-14) unstable; urgency=low

  [ Mats Erik Andersson <mats.andersson@gisladisker.se> ]
  * Implement IPv6-support
    Add 03-468454-fingerd-ipv6.patch
    Add 04-468454-finger-ipv6.patch
    Closes: #468454
  * debian/fingerd.examples: Add debian/local/finger.xinetd

  [ Anibal Monsalve Salazar ]
  * Don't segfault when /etc/passwd has netgroup entry
    Add 05-547014-netgroup.patch
    Patch by Matthew A. Dunford
    Closes: #547014
  * Debian source format is 3.0 (quilt)
  * Fix out-of-date-standards-version
  * Fix maintainer-script-without-set-e

bsd-finger (0.17-13) unstable; urgency=low

  * Priority is optional
  * Build depends on quilt
  * Standards Version is 3.8.1
  * DH compatibility level is 7
  * Run dh_prep instead of dh_clean -k
  * Work with a non-iterable nsswitch source
    02-518559-nsswitch-sources.patch by Tim Abbott
    closes: #518559

bsd-finger (0.17-12) unstable; urgency=low

  * Added debian/watch
  * Fixed the following lintian issues:
    - bsd-finger source: debian-rules-sets-DH_COMPAT line 10
    - bsd-finger source: debian-rules-ignores-make-clean-error line 34
    - bsd-finger source: out-of-date-standards-version 3.7.2 (current is 3.7.3)

bsd-finger (0.17-11) unstable; urgency=low

  * Resynchronise with Ubuntu.

bsd-finger (0.17-10ubuntu1) feisty; urgency=low

  * Make fingerd depend on update-inetd for update-inetd.

bsd-finger (0.17-10) unstable; urgency=low

  * Set Standards-Version to 3.7.2.
  * Set DH_COMPAT to 5.

bsd-finger (0.17-9) unstable; urgency=low

  * Set Standards-Version to 3.6.2.
  * Set DH_COMPAT to 4.
  * Fixed "fingerd.postrm is a #!/bin/sh script but uses command
    -v", closes: #292977.
  * Fixed "/usr/share/doc/finger/README.gz not helpful for user",
    closes: #323230.

bsd-finger (0.17-8) unstable; urgency=low

  * Fixed "Manpage mentions ~/.pgp when it should say ~/.pgpkey"
    (Closes: #244217).
  * Fixed "Manpage describes ~/.project as restricted to one line"
    (Closes: #244218).
  * New maintainer's email address.

bsd-finger (0.17-7) unstable; urgency=low

  * New maintainer.

bsd-finger (0.17-6) unstable; urgency=low

  * Exit with a nonzero status when a request fails (closes: #122915).

bsd-finger (0.17-5) unstable; urgency=low

  * Use asprintf in preference to an array on the stack (closes: #106385).

bsd-finger (0.17-4) unstable; urgency=low

  * Restored old strsep code since gecos may be empty (closes: #103273).

bsd-finger (0.17-3) unstable; urgency=low

  * Finger no longer complains about remote X displays.

bsd-finger (0.17-2) unstable; urgency=low

  * Fixed typo in finger(1) man page (closes: #99328).

bsd-finger (0.17-1) unstable; urgency=low

  * New upstream release.
  * Fixed compilation problems with glibc 2.2 (closes: #90356).

bsd-finger (0.16-3) unstable; urgency=low

  * Set pn->realname to NULL by default (closes: #67593).

bsd-finger (0.16-2) unstable; urgency=low

  * Fixed a null pointer dereference (closes: #66829).  Reported and fixed by
    Peter Toneby.
  * Added build-time dependency on debhelper.

bsd-finger (0.16-1) unstable; urgency=low

  * New upstream release.
  * Added .pgpkey to finger.1 (closes: #65632).

bsd-finger (0.10-3) frozen unstable; urgency=low

  * Clear the idle time if we cannot obtain a valid value, which is the case
    for X logins (closes: #53816).

bsd-finger (0.10-2) unstable; urgency=low

  * Fixed finger width calculation (closes: #49510).

bsd-finger (0.10-1) unstable; urgency=low

  * Initial release.
  * Don't print an error message if we can't open a tty file as it may be a
    remote X login.
  * finger now supports pts devices (closes: #39196, #41552, #43342, #43952).
parent 2da9c570
bsd-finger (0.17-15.2) unstable; urgency=medium
* Non-maintainer upload
* Use cmake as build system. Closes: #873085, #912121
-- Christoph Biedl <debian.axhn@manchmal.in-ulm.de> Sat, 08 Dec 2018 10:36:30 +0100
bsd-finger (0.17-15.1) unstable; urgency=medium
* Non-maintainer upload.
* Do not specify bzip2 compressor to dh_builddeb
(Closes: #833210)
-- Jonathan Wiltshire <jmw@debian.org> Fri, 11 Nov 2016 14:58:53 +0000
bsd-finger (0.17-15) unstable; urgency=low
* Fix "finger client causes long timeouts"
Add 06-572211-decrease-timeout.patch
Patch by Mats Erik Andersson
Closes: #572211
* Suggests: finger
Closes: #622105
* Enable hardened build flags
* DH compatibility level is 9
* Standards version is 3.9.3
* Debian source format is 3.0 (quilt)
* Fix debian-rules-missing-recommended-target
-- Anibal Monsalve Salazar <anibal@debian.org> Mon, 18 Jun 2012 15:37:11 +1000
bsd-finger (0.17-14) unstable; urgency=low
[ Mats Erik Andersson <mats.andersson@gisladisker.se> ]
* Implement IPv6-support
Add 03-468454-fingerd-ipv6.patch
Add 04-468454-finger-ipv6.patch
Closes: #468454
* debian/fingerd.examples: Add debian/local/finger.xinetd
[ Anibal Monsalve Salazar ]
* Don't segfault when /etc/passwd has netgroup entry
Add 05-547014-netgroup.patch
Patch by Matthew A. Dunford
Closes: #547014
* Debian source format is 3.0 (quilt)
* Fix out-of-date-standards-version
* Fix maintainer-script-without-set-e
-- Anibal Monsalve Salazar <anibal@debian.org> Fri, 12 Feb 2010 14:49:23 +1100
bsd-finger (0.17-13) unstable; urgency=low
* Priority is optional
* Build depends on quilt
* Standards Version is 3.8.1
* DH compatibility level is 7
* Run dh_prep instead of dh_clean -k
* Work with a non-iterable nsswitch source
02-518559-nsswitch-sources.patch by Tim Abbott
closes: #518559
-- Anibal Monsalve Salazar <anibal@debian.org> Wed, 10 Jun 2009 19:49:18 +1000
bsd-finger (0.17-12) unstable; urgency=low
* Added debian/watch
* Fixed the following lintian issues:
- bsd-finger source: debian-rules-sets-DH_COMPAT line 10
- bsd-finger source: debian-rules-ignores-make-clean-error line 34
- bsd-finger source: out-of-date-standards-version 3.7.2 (current is 3.7.3)
-- Anibal Monsalve Salazar <anibal@debian.org> Sun, 06 Apr 2008 17:30:13 +1000
bsd-finger (0.17-11) unstable; urgency=low
* Resynchronise with Ubuntu.
-- Anibal Monsalve Salazar <anibal@debian.org> Fri, 09 Feb 2007 10:43:05 +1100
bsd-finger (0.17-10ubuntu1) feisty; urgency=low
* Make fingerd depend on update-inetd for update-inetd.
-- Tollef Fog Heen <tfheen@ubuntu.com> Thu, 14 Dec 2006 11:40:14 +0100
bsd-finger (0.17-10) unstable; urgency=low
* Set Standards-Version to 3.7.2.
* Set DH_COMPAT to 5.
-- Anibal Monsalve Salazar <anibal@debian.org> Thu, 22 Jun 2006 09:03:02 +1000
bsd-finger (0.17-9) unstable; urgency=low
* Set Standards-Version to 3.6.2.
* Set DH_COMPAT to 4.
* Fixed "fingerd.postrm is a #!/bin/sh script but uses command
-v", closes: #292977.
* Fixed "/usr/share/doc/finger/README.gz not helpful for user",
closes: #323230.
-- Anibal Monsalve Salazar <anibal@debian.org> Sat, 08 Oct 2005 19:10:10 +1000
bsd-finger (0.17-8) unstable; urgency=low
* Fixed "Manpage mentions ~/.pgp when it should say ~/.pgpkey"
(Closes: #244217).
* Fixed "Manpage describes ~/.project as restricted to one line"
(Closes: #244218).
* New maintainer's email address.
-- Anibal Monsalve Salazar <anibal@debian.org> Thu, 10 Feb 2005 23:22:52 +1100
bsd-finger (0.17-7) unstable; urgency=low
* New maintainer.
-- Anibal Monsalve Salazar <A.Monsalve.Salazar@IEEE.org> Thu, 20 May 2004 09:24:26 +1000
bsd-finger (0.17-6) unstable; urgency=low
* Exit with a nonzero status when a request fails (closes: #122915).
-- Herbert Xu <herbert@debian.org> Sat, 8 Dec 2001 18:39:54 +1100
bsd-finger (0.17-5) unstable; urgency=low
* Use asprintf in preference to an array on the stack (closes: #106385).
-- Herbert Xu <herbert@debian.org> Tue, 24 Jul 2001 19:25:14 +1000
bsd-finger (0.17-4) unstable; urgency=low
* Restored old strsep code since gecos may be empty (closes: #103273).
-- Herbert Xu <herbert@debian.org> Tue, 3 Jul 2001 21:24:19 +1000
bsd-finger (0.17-3) unstable; urgency=low
* Finger no longer complains about remote X displays.
-- Herbert Xu <herbert@debian.org> Tue, 19 Jun 2001 22:21:25 +1000
bsd-finger (0.17-2) unstable; urgency=low
* Fixed typo in finger(1) man page (closes: #99328).
-- Herbert Xu <herbert@debian.org> Thu, 31 May 2001 19:17:12 +1000
bsd-finger (0.17-1) unstable; urgency=low
* New upstream release.
* Fixed compilation problems with glibc 2.2 (closes: #90356).
-- Herbert Xu <herbert@debian.org> Tue, 20 Mar 2001 21:30:56 +1100
bsd-finger (0.16-3) unstable; urgency=low
* Set pn->realname to NULL by default (closes: #67593).
-- Herbert Xu <herbert@debian.org> Sun, 23 Jul 2000 14:12:52 +1000
bsd-finger (0.16-2) unstable; urgency=low
* Fixed a null pointer dereference (closes: #66829). Reported and fixed by
Peter Toneby.
* Added build-time dependency on debhelper.
-- Herbert Xu <herbert@debian.org> Fri, 7 Jul 2000 19:09:11 +1000
bsd-finger (0.16-1) unstable; urgency=low
* New upstream release.
* Added .pgpkey to finger.1 (closes: #65632).
-- Herbert Xu <herbert@debian.org> Mon, 19 Jun 2000 14:58:04 +1000
bsd-finger (0.10-3) frozen unstable; urgency=low
* Clear the idle time if we cannot obtain a valid value, which is the case
for X logins (closes: #53816).
-- Herbert Xu <herbert@debian.org> Tue, 21 Mar 2000 22:09:23 +1100
bsd-finger (0.10-2) unstable; urgency=low
* Fixed finger width calculation (closes: #49510).
-- Herbert Xu <herbert@debian.org> Thu, 11 Nov 1999 20:11:24 +1100
bsd-finger (0.10-1) unstable; urgency=low
* Initial release.
* Don't print an error message if we can't open a tty file as it may be a
remote X login.
* finger now supports pts devices (closes: #39196, #41552, #43342, #43952).
-- Herbert Xu <herbert@debian.org> Wed, 3 Nov 1999 10:00:20 +1100
Source: bsd-finger
Section: net
Priority: optional
Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
Standards-Version: 3.9.3
Build-Depends: dpkg-dev (>= 1.16.1~), debhelper (>= 10~), cmake
Package: finger
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces: netstd
Description: user information lookup program
finger displays information about the system users.
Package: fingerd
Architecture: any
Depends: update-inetd, netbase, ${shlibs:Depends}, ${misc:Depends}
Suggests: finger
Replaces: netstd
Description: remote user information server
Fingerd is a simple daemon based on RFC1196 that provides an interface to the
"finger" program at most network sites. The program is supposed to return a
friendly, human-oriented status report on either the system at the moment or a
particular person in depth.
This package was split from netstd by Herbert Xu herbert@debian.org on
Wed, 3 Nov 1999 10:03:41 +1100.
It is maintained by Anibal Monsalve Salazar <anibal@debian.org>.
netstd was created by Peter Tobias tobias@et-inf.fho-emden.de on
Wed, 20 Jul 1994 17:23:21 +0200.
It was downloaded from ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/.
Copyright:
Copyright (c) 1980-1991 The Regents of the University of California.
The license can be found in /usr/share/common-licenses/BSD.
debian/tmp/usr/share/man/man1/finger.1
debian/local/finger.xinetd
usr/sbin/in.fingerd
debian/tmp/usr/share/man/man8/in.fingerd.8
#!/bin/sh
set -e
enable_if_alone() {
if ! grep -q ^finger /etc/inetd.conf; then
update-inetd --pattern /usr/sbin/in\\.fingerd --enable finger
fi
}
case "$1" in
abort-upgrade | abort-deconfigure | abort-remove)
enable_if_alone
;;
configure)
if [ -n "$2" ]; then
enable_if_alone
else
fingerentry="finger stream tcp nowait nobody /usr/sbin/tcpd /usr/sbin/in.fingerd"
if grep -q ^finger /etc/inetd.conf; then
update-inetd --group INFO --add "#$fingerentry"
else
update-inetd --group INFO --add "$fingerentry"
fi
fi
;;
*)
printf "$0: incorrect arguments: $*\n" >&2
exit 1
;;
esac
#DEBHELPER#
#!/bin/sh
set -e
case "$1" in
abort-install | remove | abort-upgrade | upgrade | failed-upgrade | disappear)
;;
purge)
# If netbase is not installed, then we don't need to do the remove.
#if command -v update-inetd >/dev/null 2>&1; then
if [ -x /usr/sbin/update-inetd ]; then
update-inetd --remove "finger .* /usr/sbin/in\.fingerd"
fi
;;
*)
echo "$0: incorrect arguments: $*" >&2
exit 1
;;
esac
#DEBHELPER#
#!/bin/sh
set -e
update-inetd --pattern /usr/sbin/in\\.fingerd --disable finger
#DEBHELPER#
service finger
{
disable = no
socket_type = stream
protocol = tcp
flags = IPv6
wait = no
user = nobody
server = /usr/sbin/in.fingerd
server_args = -l -w
log_type = SYSLOG daemon info
log_on_success = HOST
}
--- a/finger/finger.1 2000-07-31 09:56:57.000000000 +1000
+++ b/finger/finger.1 2009-06-10 20:08:45.000000000 +1000
@@ -169,16 +169,14 @@ started by
must be able to see the
.Pa .nofinger
file. This generally means that the home directory containing the file
-must have the other-users-execute bit set (o+w). See
+must have the other-users-execute bit set (o+x). See
.Xr chmod 1 .
If you use this feature for privacy, please test it with ``finger
@localhost'' before relying on it, just in case.
.It ~/.plan
.It ~/.project
-.It ~/.pgp
+.It ~/.pgpkey
These files are printed as part of a long-format request. The
-.Pa .project
-file is limited to one line; the
.Pa .plan
file may be arbitrarily long.
.El
--- a/finger/finger.c 1999-12-19 03:41:51.000000000 +1100
+++ b/finger/finger.c 2009-06-10 20:08:45.000000000 +1000
@@ -77,7 +77,7 @@ char finger_rcsid[] = \
#include "../version.h"
static void loginlist(void);
-static void userlist(int argc, char *argv[]);
+static int userlist(int argc, char *argv[]);
int lflag, pplan;
static int sflag, mflag;
@@ -92,6 +92,7 @@ int entries; /* number of people */
int main(int argc, char *argv[]) {
int ch;
+ int err = 0;
struct sockaddr_in sin;
socklen_t slen = sizeof(sin);
@@ -159,7 +160,7 @@ int main(int argc, char *argv[]) {
}
}
else {
- userlist(argc, argv);
+ err = userlist(argc, argv);
/*
* Assign explicit "large" format if names given and -s not
* explicitly stated. Force the -l AFTER we get names so any
@@ -172,7 +173,7 @@ int main(int argc, char *argv[]) {
if (lflag) lflag_print();
else sflag_print();
}
- return 0;
+ return err;
}
/* Returns 1 if .nofinger is found and enable_nofinger is set. */
@@ -181,10 +182,16 @@ int
check_nofinger(struct passwd *pw)
{
if (enable_nofinger) {
- char path[PATH_MAX];
struct stat tripe;
- snprintf(path, sizeof(path), "%s/.nofinger", pw->pw_dir);
- if (stat(path, &tripe)==0) {
+ int ret;
+ char *path;
+ if (asprintf(&path, "%s/.nofinger", pw->pw_dir) < 0) {
+ eprintf("finger: Out of space.\n");
+ exit(1);
+ }
+ ret = stat(path, &tripe);
+ free(path);
+ if (!ret) {
return 1;
}
}
@@ -264,10 +271,11 @@ static void do_local(int argc, char *arg
}
-static void
+static int
userlist(int argc, char *argv[])
{
int i;
+ int err = 0;
PERSON *pn;
PERSON *nethead, **nettail;
struct utmp *uptr;
@@ -297,13 +305,13 @@ userlist(int argc, char *argv[])
/* handle network requests */
for (pn = nethead; pn; pn = pn->next) {
- netfinger(pn->name);
+ err |= netfinger(pn->name);
if (pn->next || entries)
xputc('\n');
}
if (entries == 0)
- return;
+ return err;
/*
* Scan thru the list of users currently logged in, saving
@@ -331,4 +339,6 @@ userlist(int argc, char *argv[])
enter_lastlog(pn);
}
endutent();
+
+ return err;
}
--- a/finger/finger.h 1999-09-14 20:51:11.000000000 +1000
+++ b/finger/finger.h 2009-06-10 20:08:45.000000000 +1000
@@ -92,7 +92,7 @@ void sflag_print(void);
void enter_where(struct utmp *ut, PERSON *pn);
void enter_lastlog(PERSON *pn);
int match(struct passwd *pw, const char *user);
-void netfinger(const char *name);
+int netfinger(const char *name);
const char *prphone(const char *num);
#ifndef DAYSPERNYEAR
--- a/finger/lprint.c 1999-09-14 20:51:11.000000000 +1000
+++ b/finger/lprint.c 2009-06-10 20:08:45.000000000 +1000
@@ -48,7 +48,7 @@ char lprint_rcsid[] =
#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
-#include <sys/time.h>
+#include <time.h>
#include "finger.h"
static void lprint(PERSON *pn);
@@ -100,7 +100,7 @@ lprint(PERSON *pn)
* office, office phone, home phone if available
*/
xprintf("Login: %-15s\t\t\tName: %s\nDirectory: %-25s",
- pn->name, pn->realname, pn->dir);
+ pn->name, pn->realname ? pn->realname : "", pn->dir);
xprintf("\tShell: %-s\n", *pn->shell ? pn->shell : _PATH_BSHELL);
/*
--- a/finger/net.c 1999-09-14 20:51:11.000000000 +1000
+++ b/finger/net.c 2009-06-10 20:08:45.000000000 +1000
@@ -51,7 +51,7 @@ char net_rcsid[] = "$Id: net.c,v 1.9 199
#include <ctype.h>
#include "finger.h"
-void netfinger(const char *name) {
+int netfinger(const char *name) {
register FILE *fp;
struct in_addr defaddr;
register int c, sawret, ateol;
@@ -62,7 +62,7 @@ void netfinger(const char *name) {
char *alist[1], *host;
host = strrchr(name, '@');
- if (!host) return;
+ if (!host) return 1;
*host++ = '\0';
memset(&sn, 0, sizeof(sn));
@@ -70,7 +70,7 @@ void netfinger(const char *name) {
sp = getservbyname("finger", "tcp");
if (!sp) {
eprintf("finger: tcp/finger: unknown service\n");
- return;
+ return 1;
}
sn.sin_port = sp->s_port;
@@ -78,7 +78,7 @@ void netfinger(const char *name) {
if (!hp) {
if (!inet_aton(host, &defaddr)) {
eprintf("finger: unknown host: %s\n", host);
- return;
+ return 1;
}
def.h_name = host;
def.h_addr_list = alist;
@@ -96,7 +96,7 @@ void netfinger(const char *name) {
if ((s = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) {
eprintf("finger: socket: %s\n", strerror(errno));
- return;
+ return 1;
}
/* print hostname before connecting, in case it takes a while */
@@ -104,7 +104,7 @@ void netfinger(const char *name) {
if (connect(s, (struct sockaddr *)&sn, sizeof(sn)) < 0) {
eprintf("finger: connect: %s\n", strerror(errno));
close(s);
- return;
+ return 1;
}
/* -l flag for remote fingerd */
@@ -128,7 +128,7 @@ void netfinger(const char *name) {
if (!fp) {
eprintf("finger: fdopen: %s\n", strerror(errno));
close(s);
- return;
+ return 1;
}
sawret = 0;
@@ -152,4 +152,6 @@ void netfinger(const char *name) {
}
if (!ateol) xputc('\n');
fclose(fp);
+
+ return 0;
}
--- a/finger/sprint.c 1999-12-13 05:59:33.000000000 +1100
+++ b/finger/sprint.c 2009-06-10 20:08:45.000000000 +1000
@@ -40,7 +40,7 @@ char sprint_rcsid[] = "$Id: sprint.c,v 1
#endif /* not lint */
#include <sys/types.h>
-#include <sys/time.h>
+#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
--- a/finger/util.c 1999-09-29 08:53:58.000000000 +1000
+++ b/finger/util.c 2009-06-10 20:08:45.000000000 +1000
@@ -64,7 +64,7 @@ static void find_idle_and_ttywrite(regis
struct stat sb;
/* No device for X console. Utmp entry by XDM login (":0"). */
- if (w->tty[0] == ':') {
+ if (strchr(w->tty, ':')) {
w->idletime = 0; /* would be nice to have it emit ??? */
w->writable = 0;
return;
@@ -109,9 +109,8 @@ static void userinfo(PERSON *pn, struct
* fields[3] -> homephone
*/
nfields = 0;
- for (p = strtok(bp, ","); p; p = strtok(NULL, ",")) {
- if (*p==0) p = NULL; // skip empties
- if (nfields < 4) fields[nfields++] = p;
+ while ((p = strsep(&bp, ","))) {
+ if (nfields < 4) fields[nfields++] = *p ? p : NULL;
}
while (nfields<4) fields[nfields++] = NULL;
@@ -150,6 +149,9 @@ static void userinfo(PERSON *pn, struct
pn->realname = rname;
}
+ else {
+ pn->realname = NULL;
+ }
pn->office = fields[1] ? strdup(fields[1]) : NULL;
pn->officephone = fields[2] ? strdup(fields[2]) : NULL;
--- a/fingerd/fingerd.8 2000-07-31 09:56:57.000000000 +1000
+++ b/fingerd/fingerd.8 2009-06-10 20:08:45.000000000 +1000
@@ -36,10 +36,10 @@
.Dt FINGERD 8
.Os "Linux NetKit (0.17)"
.Sh NAME
-.Nm fingerd
+.Nm in.fingerd
.Nd remote user information server
.Sh SYNOPSIS
-.Nm fingerd
+.Nm in.fingerd
.Op Fl wulf
.Op Fl pL Ar path
.Op Fl t Ar timeout
@@ -61,7 +61,7 @@ option is given, remote users will get a
banner
which also shows some informations (e.g. uptime, operating system name and
release) about the system the
-.Nm fingerd
+.Nm in.fingerd
is running on. Some sites may consider this a security risk as it
gives out information that may be useful to crackers.
.Pp
@@ -85,7 +85,7 @@ resource reasons.
.Pp
The
.Fl p
-option allows specification of an alternate location for fingerd to find
+option allows specification of an alternate location for in.fingerd to find
the
.Dq finger
program. The
@@ -97,7 +97,7 @@ The
option specifies the time to wait for a request before closing the
connection. A value of 0 waits forever. The default is 60 seconds.
.Pp
-Options to fingerd should be specified in
+Options to in.fingerd should be specified in
.Pa /etc/inetd.conf .
.Pp
The finger protocol consists mostly of specifying command arguments.
@@ -105,12 +105,12 @@ The
.Xr inetd 8
.Dq super-server
runs
-.Nm fingerd
+.Nm in.fingerd
for
.Tn TCP
requests received on port 79.
Once connected
-.Nm fingerd
+.Nm in.fingerd
reads a single command line
terminated by a
.Aq Tn CRLF
--- a/fingerd/fingerd.c 1999-12-13 05:46:28.000000000 +1100
+++ b/fingerd/fingerd.c 2009-06-10 20:08:45.000000000 +1000
@@ -55,6 +55,7 @@ char rcsid[] =
#include <netinet/in.h>
#include <sys/utsname.h>
#include <sys/wait.h>
+#include <sys/socket.h>
#include "pathnames.h"
#include "../version.h"
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518559
Doesn't work with a non-iterable nsswitch source
Currently, "finger tabbott" works by iterating through the list of users
on the system using getpwent and checking if any of them match "tabbott".
Some nsswitch backends (including Hesiod and LDAP[1]) do not support
iterating through the complete list of users. These nsswitch backends
instead only fully support looking up a user's information by username or
uid.
So, if tabbott is a user whose nsswitch information comes from LDAP, then
"finger tabbott" will incorrectly report "finger: tabbott: no such user."
"finger -m tabbott" does work correctly, however, because it looks up the
matching username using getpwnam.
A fix for this is to always look up an argument to finger for a username
match, and having -m only control whether finger searches the entire user
database for real name matches. Patch attached.
This patch has the advantageous side effect that if there are some real
name matches and a username match, finger will always display the username
match first (rather than in some random place in the list).
-Tim Abbott
[1] with LDAP, it is typically the case that one can iterate through only
the first 100 results from a query.
Tim Abbott <tabbott@MIT.EDU>
commit ab0b4e09b1281a11587fd0f9797e612cfb08ef57
Author: Timothy G Abbott <tabbott@mit.edu>
Date: Fri Mar 6 22:30:00 2009 -0500
Add support for non-iterable nsswitch sources.
Signed-off-by: Timothy G Abbott <tabbott@mit.edu>
diff --git a/finger/finger.c b/finger/finger.c
index 7b96d3c..5737782 100644
--- a/finger/finger.c
+++ b/finger/finger.c
@@ -241,28 +241,35 @@ static void do_local(int argc, char *argv[], int *used) {
int i;
struct passwd *pw;
+ for (i = 0; i < argc; i++) {
+ if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
+ if (!check_nofinger(pw)) {
+ enter_person(pw);
+ used[i] = 1;
+ }
+ }
+ }
/*
- * traverse the list of possible login names and check the login name
- * and real name against the name specified by the user.
+ * Traverse the list of users and check the real name against
+ * the name specified by the user.
+ *
+ * Since we've already entered users whose usernames match,
+ * ignore them when doing real name matching.
*/
- if (mflag) {
- for (i = 0; i < argc; i++)
- if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
- if (!check_nofinger(pw)) {
- enter_person(pw);
- used[i] = 1;
- }
- }
- } else for (pw = getpwent(); pw; pw = getpwent())
- for (i = 0; i < argc; i++)
- if (used[i] >= 0 &&
- (!strcasecmp(pw->pw_name, argv[i]) ||
- match(pw, argv[i]))) {
- if (!check_nofinger(pw)) {
- enter_person(pw);
- used[i] = 1;
+ if (!mflag) {
+ for (pw = getpwent(); pw; pw = getpwent()) {
+ for (i = 0; i < argc; i++) {
+ if (used[i] >= 0 &&
+ strcasecmp(pw->pw_name, argv[i]) &&
+ match(pw, argv[i])) {
+ if (!check_nofinger(pw)) {
+ enter_person(pw);
+ used[i] = 1;
+ }
}
}
+ }