From 5c53a31e9de7b14abf110d45f7b593e65098e885 Mon Sep 17 00:00:00 2001 From: mouring Date: Wed, 12 Sep 2001 16:32:14 +0000 Subject: [PATCH] - jakob@cvs.openbsd.org 2001/08/16 19:18:34 [servconf.c servconf.h session.c sshd.8] deprecate CheckMail. ok markus@ --- ChangeLog | 6 ++++++ servconf.c | 22 +++++++++++----------- servconf.h | 3 +-- session.c | 21 +-------------------- sshd.8 | 8 +------- 5 files changed, 20 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index ecc23626..47f38519 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +20010912 + - (bal) OpenBSD CVS Sync + - jakob@cvs.openbsd.org 2001/08/16 19:18:34 + [servconf.c servconf.h session.c sshd.8] + deprecate CheckMail. ok markus@ + 20010815 - (bal) Fixed stray code in readconf.c that went in by mistake. - OpenBSD CVS Sync diff --git a/servconf.c b/servconf.c index 0f16c851..6297143f 100644 --- a/servconf.c +++ b/servconf.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: servconf.c,v 1.88 2001/07/11 00:24:53 itojun Exp $"); +RCSID("$OpenBSD: servconf.c,v 1.89 2001/08/16 19:18:34 jakob Exp $"); #if defined(KRB4) || defined(KRB5) #include @@ -56,7 +56,6 @@ initialize_server_options(ServerOptions *options) options->ignore_user_known_hosts = -1; options->print_motd = -1; options->print_lastlog = -1; - options->check_mail = -1; options->x11_forwarding = -1; options->x11_display_offset = -1; options->xauth_location = NULL; @@ -138,8 +137,6 @@ fill_default_server_options(ServerOptions *options) options->ignore_rhosts = 1; if (options->ignore_user_known_hosts == -1) options->ignore_user_known_hosts = 0; - if (options->check_mail == -1) - options->check_mail = 0; if (options->print_motd == -1) options->print_motd = 1; if (options->print_lastlog == -1) @@ -241,7 +238,7 @@ typedef enum { sPasswordAuthentication, sKbdInteractiveAuthentication, sListenAddress, sPrintMotd, sPrintLastLog, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset, - sStrictModes, sEmptyPasswd, sKeepAlives, sCheckMail, + sStrictModes, sEmptyPasswd, sKeepAlives, sUseLogin, sAllowTcpForwarding, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, @@ -249,7 +246,7 @@ typedef enum { sBanner, sReverseMappingCheck, sHostbasedAuthentication, sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, - sPAMAuthenticationViaKbdInt + sDeprecated, sPAMAuthenticationViaKbdInt } ServerOpCodes; /* Textual representation of the tokens. */ @@ -289,7 +286,7 @@ static struct { { "kbdinteractiveauthentication", sKbdInteractiveAuthentication }, { "challengeresponseauthentication", sChallengeResponseAuthentication }, { "skeyauthentication", sChallengeResponseAuthentication }, /* alias */ - { "checkmail", sCheckMail }, + { "checkmail", sDeprecated }, { "listenaddress", sListenAddress }, { "printmotd", sPrintMotd }, { "printlastlog", sPrintLastLog }, @@ -625,10 +622,6 @@ parse_flag: intptr = &options->kbd_interactive_authentication; goto parse_flag; - case sCheckMail: - intptr = &options->check_mail; - goto parse_flag; - case sChallengeResponseAuthentication: intptr = &options->challenge_response_authentication; goto parse_flag; @@ -842,6 +835,13 @@ parse_flag: intptr = &options->client_alive_count_max; goto parse_int; + case sDeprecated: + log("%s line %d: Deprecated option %s", + filename, linenum, arg); + while(arg) + arg = strdelim(&cp); + break; + case sPAMAuthenticationViaKbdInt: intptr = &options->pam_authentication_via_kbd_int; goto parse_flag; diff --git a/servconf.h b/servconf.h index 55f2ee28..ec38880c 100644 --- a/servconf.h +++ b/servconf.h @@ -11,7 +11,7 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* RCSID("$OpenBSD: servconf.h,v 1.47 2001/06/26 17:27:24 markus Exp $"); */ +/* RCSID("$OpenBSD: servconf.h,v 1.48 2001/08/16 19:18:34 jakob Exp $"); */ #ifndef SERVCONF_H #define SERVCONF_H @@ -52,7 +52,6 @@ typedef struct { * for RhostsRsaAuth */ int print_motd; /* If true, print /etc/motd. */ int print_lastlog; /* If true, print lastlog */ - int check_mail; /* If true, check for new mail. */ int x11_forwarding; /* If true, permit inet (spoofing) X11 fwd. */ int x11_display_offset; /* What DISPLAY number to start * searching at */ diff --git a/session.c b/session.c index e0168042..1e9e3228 100644 --- a/session.c +++ b/session.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.99 2001/07/09 07:04:53 deraadt Exp $"); +RCSID("$OpenBSD: session.c,v 1.100 2001/08/16 19:18:34 jakob Exp $"); #include "ssh.h" #include "ssh1.h" @@ -1459,25 +1459,6 @@ do_child(Session *s, const char *command) if (!options.use_login) { char buf[256]; - /* - * Check for mail if we have a tty and it was enabled - * in server options. - */ - if (s->ttyfd != -1 && options.check_mail) { - char *mailbox; - struct stat mailstat; - - mailbox = getenv("MAIL"); - if (mailbox != NULL) { - if (stat(mailbox, &mailstat) != 0 || - mailstat.st_size == 0) - printf("No mail.\n"); - else if (mailstat.st_mtime < mailstat.st_atime) - printf("You have mail.\n"); - else - printf("You have new mail.\n"); - } - } /* Start the shell. Set initial character to '-'. */ buf[0] = '-'; strncpy(buf + 1, cp, sizeof(buf) - 1); diff --git a/sshd.8 b/sshd.8 index 7e55da51..49d81449 100644 --- a/sshd.8 +++ b/sshd.8 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd.8,v 1.139 2001/08/01 22:16:45 markus Exp $ +.\" $OpenBSD: sshd.8,v 1.140 2001/08/16 19:18:34 jakob Exp $ .Dd September 25, 1999 .Dt SSHD 8 .Os @@ -367,12 +367,6 @@ All authentication styles from are supported. The default is .Dq yes . -.It Cm CheckMail -Specifies whether -.Nm -should check for new mail for interactive logins. -The default is -.Dq no . .It Cm Ciphers Specifies the ciphers allowed for protocol version 2. Multiple ciphers must be comma-separated. -- 2.45.2