[plug] telnet server question

Ryan ryan at is.as.geeky.as
Wed Jul 23 22:35:23 WST 2003


On Wed, 2003-07-23 at 19:37, James Devenish wrote:
> In message <3F1E6517.2070703 at postnewspapers.com.au>
> on Wed, Jul 23, 2003 at 06:36:07PM +0800, Craig Ringer wrote:
> > Typically '/bin/false' on linux.
> 
> It does look like that, doesn't it? I find /bin/false fairly annoying
> for use with real users because it doesn't give you any diagnositic
> messages (basically, it looks like you've logged in briefly but had
> you hand lying on CNTL-D).

I was bored and wanted to see what the source of the typical /bin/false
was.

coreutils-5.0/src/false.c:

<snip>

int
main (int argc, char **argv)
{
  program_name = argv[0];
  setlocale (LC_ALL, "");
  bindtextdomain (PACKAGE, LOCALEDIR);
  textdomain (PACKAGE);

  atexit (close_stdout);

  /* Recognize --help or --version only if it's the only command-line
     argument and if POSIXLY_CORRECT is not set.  */
  if (argc == 2 && getenv ("POSIXLY_CORRECT") == NULL)
    {
      if (STREQ (argv[1], "--help"))
        usage (EXIT_FAILURE);

      if (STREQ (argv[1], "--version"))
        version_etc (stdout, PROGRAM_NAME, GNU_PACKAGE, VERSION,
AUTHORS);
    }

  exit (EXIT_FAILURE);
}

Ain't exactly rocket science modifying that :)

Ryan



More information about the plug mailing list