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)
This commit is contained in:
parent
1115f627db
commit
905571c031
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213250
@ -893,24 +893,6 @@ do_motd(void)
|
|||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char buf[256];
|
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) {
|
if (options.print_motd) {
|
||||||
#ifdef HAVE_LOGIN_CAP
|
#ifdef HAVE_LOGIN_CAP
|
||||||
|
@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
|
|||||||
* login -f name (for pre-authenticated login: datakit, xterm, etc.)
|
* login -f name (for pre-authenticated login: datakit, xterm, etc.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/copyright.h>
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -590,12 +589,6 @@ main(int argc, char *argv[])
|
|||||||
if (!quietlog) {
|
if (!quietlog) {
|
||||||
const char *cw;
|
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);
|
cw = login_getcapstr(lc, "welcome", NULL, NULL);
|
||||||
if (cw != NULL && access(cw, F_OK) == 0)
|
if (cw != NULL && access(cw, F_OK) == 0)
|
||||||
motd(cw);
|
motd(cw);
|
||||||
|
Loading…
Reference in New Issue
Block a user