Deleted Added
full compact
ftpd.c (25986) ftpd.c (27650)
1/*
2 * Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1/*
2 * Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $Id: ftpd.c,v 1.39 1997/05/10 18:58:15 davidn Exp $
33 * $Id: ftpd.c,v 1.40 1997/05/21 23:24:41 danny Exp $
34 */
35
36#if 0
37#ifndef lint
38static char copyright[] =
39"@(#) Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994\n\
40 The Regents of the University of California. All rights reserved.\n";
41#endif /* not lint */

--- 104 unchanged lines hidden (view full) ---

146off_t file_size;
147off_t byte_count;
148#if !defined(CMASK) || CMASK == 0
149#undef CMASK
150#define CMASK 027
151#endif
152int defumask = CMASK; /* default umask value */
153char tmpline[7];
34 */
35
36#if 0
37#ifndef lint
38static char copyright[] =
39"@(#) Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994\n\
40 The Regents of the University of California. All rights reserved.\n";
41#endif /* not lint */

--- 104 unchanged lines hidden (view full) ---

146off_t file_size;
147off_t byte_count;
148#if !defined(CMASK) || CMASK == 0
149#undef CMASK
150#define CMASK 027
151#endif
152int defumask = CMASK; /* default umask value */
153char tmpline[7];
154#ifdef VIRTUAL_HOSTING
155char *hostname;
154char *hostname;
155#ifdef VIRTUAL_HOSTING
156char *ftpuser;
157
158static struct ftphost {
159 struct ftphost *next;
160 struct in_addr hostaddr;
161 char *hostname;
162 char *anonuser;
163 char *statfile;
164 char *welcome;
165 char *loginmsg;
166} *thishost, *firsthost;
167
156char *ftpuser;
157
158static struct ftphost {
159 struct ftphost *next;
160 struct in_addr hostaddr;
161 char *hostname;
162 char *anonuser;
163 char *statfile;
164 char *welcome;
165 char *loginmsg;
166} *thishost, *firsthost;
167
168#else
169char hostname[MAXHOSTNAMELEN];
170#endif
171char remotehost[MAXHOSTNAMELEN];
172char *ident = NULL;
173
174static char ttyline[20];
175char *tty = ttyline; /* for klogin */
176
177#ifdef KERBEROS

--- 352 unchanged lines hidden (view full) ---

530 *cp = '\0';
531 lreply(220, "%s", line);
532 }
533 (void) fflush(stdout);
534 (void) fclose(fd);
535 /* reply(220,) must follow */
536 }
537#ifndef VIRTUAL_HOSTING
168#endif
169char remotehost[MAXHOSTNAMELEN];
170char *ident = NULL;
171
172static char ttyline[20];
173char *tty = ttyline; /* for klogin */
174
175#ifdef KERBEROS

--- 352 unchanged lines hidden (view full) ---

528 *cp = '\0';
529 lreply(220, "%s", line);
530 }
531 (void) fflush(stdout);
532 (void) fclose(fd);
533 /* reply(220,) must follow */
534 }
535#ifndef VIRTUAL_HOSTING
538 (void) gethostname(hostname, sizeof(hostname));
536 if ((hostname = malloc(MAXHOSTNAMELEN)) == NULL)
537 fatal("Ran out of memory.");
538 (void) gethostname(hostname, MAXHOSTNAMELEN);
539#endif
540 reply(220, "%s FTP server (%s) ready.", hostname, version);
541 (void) setjmp(errcatch);
542 for (;;)
543 (void) yyparse();
544 /* NOTREACHED */
545}
546

--- 1744 unchanged lines hidden ---
539#endif
540 reply(220, "%s FTP server (%s) ready.", hostname, version);
541 (void) setjmp(errcatch);
542 for (;;)
543 (void) yyparse();
544 /* NOTREACHED */
545}
546

--- 1744 unchanged lines hidden ---