View | Details | Raw Unified | Return to bug 16705 | Differences between
and this patch

Collapse All | Expand All

(-)ftpd.c (-2 / +13 lines)
Lines 142-147 Link Here
142
int	mode;
142
int	mode;
143
int	usedefault = 1;		/* for data transfers */
143
int	usedefault = 1;		/* for data transfers */
144
int	pdata = -1;		/* for passive mode */
144
int	pdata = -1;		/* for passive mode */
145
int	hostinfo = 1;		/* do we print login banner? */
145
sig_atomic_t transflag;
146
sig_atomic_t transflag;
146
off_t	file_size;
147
off_t	file_size;
147
off_t	byte_count;
148
off_t	byte_count;
Lines 287-293 Link Here
287
288
288
289
289
	bind_address.s_addr = htonl(INADDR_ANY);
290
	bind_address.s_addr = htonl(INADDR_ANY);
290
	while ((ch = getopt(argc, argv, "AdlDSURt:T:u:va:p:")) != -1) {
291
	while ((ch = getopt(argc, argv, "AdlhDSURt:T:u:va:p:")) != -1) {
291
		switch (ch) {
292
		switch (ch) {
292
		case 'D':
293
		case 'D':
293
			daemon_mode++;
294
			daemon_mode++;
Lines 353-358 Link Here
353
			debug = 1;
354
			debug = 1;
354
			break;
355
			break;
355
356
357
		case 'h':
358
			hostinfo = 0;
359
			break;
360
356
		default:
361
		default:
357
			warnx("unknown flag -%c ignored", optopt);
362
			warnx("unknown flag -%c ignored", optopt);
358
			break;
363
			break;
Lines 546-552 Link Here
546
	(void) gethostname(hostname, MAXHOSTNAMELEN - 1);
551
	(void) gethostname(hostname, MAXHOSTNAMELEN - 1);
547
	hostname[MAXHOSTNAMELEN - 1] = '\0';
552
	hostname[MAXHOSTNAMELEN - 1] = '\0';
548
#endif
553
#endif
549
	reply(220, "%s FTP server (%s) ready.", hostname, version);
554
	if (hostinfo)
555
	    reply(220, "%s FTP server (%s) ready.", hostname, version);
556
	else
557
	    reply(220, "Service ready.");
550
	(void) setjmp(errcatch);
558
	(void) setjmp(errcatch);
551
	for (;;)
559
	for (;;)
552
		(void) yyparse();
560
		(void) yyparse();
Lines 1103-1108 Link Here
1103
			syslog(LOG_INFO, "ANONYMOUS FTP LOGIN FROM %s, %s",
1111
			syslog(LOG_INFO, "ANONYMOUS FTP LOGIN FROM %s, %s",
1104
			    remotehost, passwd);
1112
			    remotehost, passwd);
1105
	} else {
1113
	} else {
1114
	    if (!hostinfo)
1115
		lreply(230, "%s FTP server (%s) ready.", hostname, version);
1116
1106
	    if (dochroot)
1117
	    if (dochroot)
1107
		reply(230, "User %s logged in, access restrictions apply.", 
1118
		reply(230, "User %s logged in, access restrictions apply.", 
1108
			pw->pw_name);
1119
			pw->pw_name);
(-)ftpd.8 (+4 lines)
Lines 43-48 Link Here
43
.Nm ftpd
43
.Nm ftpd
44
.Op Fl d
44
.Op Fl d
45
.Op Fl l Op Fl l
45
.Op Fl l Op Fl l
46
.Op Fl h
46
.Op Fl A
47
.Op Fl A
47
.Op Fl D
48
.Op Fl D
48
.Op Fl R
49
.Op Fl R
Lines 80-85 Link Here
80
by default, and may have to be enabled in
81
by default, and may have to be enabled in
81
.Xr syslogd 8 Ns 's
82
.Xr syslogd 8 Ns 's
82
configuration file.
83
configuration file.
84
.It Fl h
85
Disable the printing of host-specific information before login
86
has been completed.
83
.It Fl D
87
.It Fl D
84
With this option set,
88
With this option set,
85
.Nm
89
.Nm

Return to bug 16705