Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 2010 20:57:14 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r213250 - in head: crypto/openssh usr.bin/login
Message-ID:  <201009282057.o8SKvEVt085330@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Sep 28 20:57:14 2010
New Revision: 213250
URL: http://svn.freebsd.org/changeset/base/213250

Log:
  Remove copyright strings printed at login time via login(1) or sshd(8).
  It is not clear to what this copyright should apply, and this is in line
  with what other operating systems do.
  
  For ssh specifically, printing of the copyright string is not in the
  upstream version so this reduces our FreeBSD-local diffs.
  
  Approved by:	core, des (ssh)

Modified:
  head/crypto/openssh/session.c
  head/usr.bin/login/login.c

Modified: head/crypto/openssh/session.c
==============================================================================
--- head/crypto/openssh/session.c	Tue Sep 28 19:17:39 2010	(r213249)
+++ head/crypto/openssh/session.c	Tue Sep 28 20:57:14 2010	(r213250)
@@ -893,24 +893,6 @@ do_motd(void)
 {
 	FILE *f;
 	char buf[256];
-#ifdef HAVE_LOGIN_CAP
-	const char *fname;
-#endif
-
-#ifdef HAVE_LOGIN_CAP
-	fname = login_getcapstr(lc, "copyright", NULL, NULL);
-	if (fname != NULL && (f = fopen(fname, "r")) != NULL) {
-		while (fgets(buf, sizeof(buf), f) != NULL)
-			fputs(buf, stdout);
-			fclose(f);
-	} else
-#endif /* HAVE_LOGIN_CAP */
-		(void)printf("%s\n\t%s %s\n",
-	"Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994",
-	"The Regents of the University of California. ",
-	"All rights reserved.");
-
-	(void)printf("\n");
 
 	if (options.print_motd) {
 #ifdef HAVE_LOGIN_CAP

Modified: head/usr.bin/login/login.c
==============================================================================
--- head/usr.bin/login/login.c	Tue Sep 28 19:17:39 2010	(r213249)
+++ head/usr.bin/login/login.c	Tue Sep 28 20:57:14 2010	(r213250)
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
  * login -f name	(for pre-authenticated login: datakit, xterm, etc.)
  */
 
-#include <sys/copyright.h>
 #include <sys/param.h>
 #include <sys/file.h>
 #include <sys/stat.h>
@@ -590,12 +589,6 @@ main(int argc, char *argv[])
 	if (!quietlog) {
 		const char *cw;
 
-		cw = login_getcapstr(lc, "copyright", NULL, NULL);
-		if (cw == NULL || motd(cw) == -1)
-			(void)printf("%s", copyright);
-
-		(void)printf("\n");
-
 		cw = login_getcapstr(lc, "welcome", NULL, NULL);
 		if (cw != NULL && access(cw, F_OK) == 0)
 			motd(cw);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009282057.o8SKvEVt085330>