Re: [PATCH] fetch-pack: make the ssh connection quiet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 Oct 2010 15:35:41 -0700
Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Jan StÄpieÅ  <jstepien@xxxxxxxxxxxxxxxxxxxxx> writes:
> > The --quiet option passed to fetch-pack did not affect the ssh child
> > process. When an ssh server sent a motd it was displayed because the ssh
> > client wasn't launched with the -q option.
> 
> This is curious for a couple of reasons:
> 
> 1. "-q" option to "ssh" is not meant to supress "motd"; it is about
>    warning and diagnostics.  From man ssh(1):
> 
>      -q Quiet mode.  Causes most warning and diagnostic messages to be
>         suppressed.  Only fatal errors are displayed.  If a second -q is
>         given then even fatal errors are suppressed, except for those
>         produced due solely to bad arguâ ments.
> 
> 2. "PrintMotd" defaults to "yes" but it is to specify whether the daemon
>    should print /etc/motd when a user logs in interactively.  I didn't
>    think fetch-pack logged in interactively, so why should this matter?
> 

You're right, fetch-pack doesn't log in interactively so the actual motd
is not displayed. I made some research and it turned out that what I
described in the commit message as the "motd" was in fact the Banner.
Quoting man sshd_config(5):

  Banner  The contents of the specified file are sent to the remote
          user before authentication is allowed.  If the argument is
          ânoneâ then no banner is displayed.  This option is only
          available for protocol version 2.  By default, no banner
          is displayed.

>From what I've read it seems that the Banner is generally used to
display some legal information, such as "this system can be used by
authorised personnel only, others will be prosecuted".

I'd say that suppressing such information along with diagnostic
messages might be expected after adding the "-q" flag to fetch-pack
and other similar commands. Fatal errors will be printed anyway. The
question is whether "--quiet" should suppress warnings as well. From my
point of view it is reasonable or at least acceptable. An alternative
solution might be to add another level of verbosity, namely "--silent".

Thanks,
-- 
Jan StÄpieÅ <jan@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]