Deleted Added
full compact
ftpcmd.y (59121) ftpcmd.y (92914)
1/* ftpcmd.y: yacc parser for the FTP daemon.
2
3%%% portions-copyright-cmetz-96
1/* ftpcmd.y: yacc parser for the FTP daemon.
2
3%%% portions-copyright-cmetz-96
4Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
4Portions of this software are Copyright 1996-1999 by Craig Metz, All Rights
5Reserved. The Inner Net License Version 2 applies to these portions of
6the software.
7You should have received a copy of the license with this software. If
8you didn't get a copy, you may request one from <license@inner.net>.
9
10 History:
11
5Reserved. The Inner Net License Version 2 applies to these portions of
6the software.
7You should have received a copy of the license with this software. If
8you didn't get a copy, you may request one from <license@inner.net>.
9
10 History:
11
12 Modified by cmetz for OPIE 2.4. Use DOTITLE rather than SETPROCTITLE.
12 Modified by cmetz for OPIE 2.3. Moved LS_COMMAND here.
13 Modified by cmetz for OPIE 2.2. Fixed a *lot* of warnings.
14 Use FUNCTION declaration et al. Removed useless strings.
15 Changed some char []s to char *s. Deleted comment address.
16 Changed tmpline references to be more pure-pointer
17 references. Changed tmpline declaration back to char [].
18 Modified at NRL for OPIE 2.1. Minor changes for autoconf.
19 Modified at NRL for OPIE 2.01. Added forward declaration for sitetab[]
20 -- fixes problems experienced by bison users. Merged in new
21 PORT attack fixes from Hobbit.
22 Modified at NRL for OPIE 2.0.
23 Originally from BSD.
24
13 Modified by cmetz for OPIE 2.3. Moved LS_COMMAND here.
14 Modified by cmetz for OPIE 2.2. Fixed a *lot* of warnings.
15 Use FUNCTION declaration et al. Removed useless strings.
16 Changed some char []s to char *s. Deleted comment address.
17 Changed tmpline references to be more pure-pointer
18 references. Changed tmpline declaration back to char [].
19 Modified at NRL for OPIE 2.1. Minor changes for autoconf.
20 Modified at NRL for OPIE 2.01. Added forward declaration for sitetab[]
21 -- fixes problems experienced by bison users. Merged in new
22 PORT attack fixes from Hobbit.
23 Modified at NRL for OPIE 2.0.
24 Originally from BSD.
25
25$FreeBSD: head/contrib/opie/ftpcmd.y 59121 2000-04-10 11:18:54Z kris $
26$FreeBSD: head/contrib/opie/ftpcmd.y 92914 2002-03-21 23:42:52Z markm $
26*/
27/*
28 * Copyright (c) 1985, 1988 Regents of the University of California.
29 * All rights reserved.
30 *
31 * Redistribution and use in source and binary forms, with or without
32 * modification, are permitted provided that the following conditions
33 * are met:

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

959 case CMD:
960 (void) signal(SIGALRM, toolong);
961 (void) alarm((unsigned) timeout);
962 if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
963 reply(221, "You could at least say goodbye.");
964 dologout(0);
965 }
966 (void) alarm(0);
27*/
28/*
29 * Copyright (c) 1985, 1988 Regents of the University of California.
30 * All rights reserved.
31 *
32 * Redistribution and use in source and binary forms, with or without
33 * modification, are permitted provided that the following conditions
34 * are met:

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

960 case CMD:
961 (void) signal(SIGALRM, toolong);
962 (void) alarm((unsigned) timeout);
963 if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
964 reply(221, "You could at least say goodbye.");
965 dologout(0);
966 }
967 (void) alarm(0);
967#ifdef SETPROCTITLE
968#if DOTITLE
968 if (strncasecmp(cbuf, "PASS", 4) != NULL)
969 setproctitle("%s: %s", proctitle, cbuf);
969 if (strncasecmp(cbuf, "PASS", 4) != NULL)
970 setproctitle("%s: %s", proctitle, cbuf);
970#endif /* SETPROCTITLE */
971#endif /* DOTITLE */
971 if ((cp = strchr(cbuf, '\r'))) {
972 *cp++ = '\n';
973 *cp = '\0';
974 }
975 if ((cp = strpbrk(cbuf, " \n")))
976 cpos = cp - cbuf;
977 if (cpos == 0)
978 cpos = 4;

--- 311 unchanged lines hidden ---
972 if ((cp = strchr(cbuf, '\r'))) {
973 *cp++ = '\n';
974 *cp = '\0';
975 }
976 if ((cp = strpbrk(cbuf, " \n")))
977 cpos = cp - cbuf;
978 if (cpos == 0)
979 cpos = 4;

--- 311 unchanged lines hidden ---