🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #913

Non-intuitive behaviour of finger 1.36

#913
From: Goeran Uddeborg
Date: Wed, 14 Oct 1992 11:36
59 lines
2263 bytes
The finger program behaves a little non-intuitive when the --info flag
is given but no user is specified.  The problem gets more obvious when
compiling with INFO_IS_DEFAULT defined.

The finger server gives no reply if asked for a long listing but no
user specified (given "/W " as input).  It is thus not very useful to
call it that way.  If finger is invoked as

	finger --info

i.e. without any user specified, the info-flag is
explicitly disabled in finger.c.  If it is invoked as

	finger --info @host

it is not disabled, however.  To me, it seems a brief listing ought to
be given in both these cases.  A possible way to achieve this is
suggested in the patch below

*** /usr/local/src/gnu/finger-1.36/src/finger.c~	Thu Oct  1 20:02:07 1992
--- /usr/local/src/gnu/finger-1.36/src/finger.c	Wed Oct 14 09:48:09 1992
***************
*** 170,180 ****
  #endif
  
    if (optind >= argc)
!     {
!       options &= FACE;
! 
!       call_finger ("", options, port);
!     }
    else
      for (arg_index = optind; arg_index < argc; arg_index++)
        call_finger (argv[arg_index], options, port);
--- 170,176 ----
  #endif
  
    if (optind >= argc)
!     call_finger ("", options, port);
    else
      for (arg_index = optind; arg_index < argc; arg_index++)
        call_finger (argv[arg_index], options, port);
***************
*** 266,272 ****
      }
    else
      {
!       if (info)
  	{
  	  char *new_username = (char *)xmalloc (4 + strlen (username));
  	  strcpy (new_username, "/W ");
--- 262,268 ----
      }
    else
      {
!       if (info && *username)
  	{
  	  char *new_username = (char *)xmalloc (4 + strlen (username));
  	  strcpy (new_username, "/W ");
Technical Details
Message-ID: <199210140936.AA05185@gustaf.sisu.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!ukma!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!sisug.sisu.SE!uddeborg

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!ukma!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!sisug.sisu.SE!uddeborg
From: uddeborg@sisug.sisu.SE (Goeran Uddeborg)
Subject: Non-intuitive behaviour of finger 1.36
Message-ID: <199210140936.AA05185@gustaf.sisu.se>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 14 Oct 1992 11:36:29 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 60