ftpcmd.y (27650) | ftpcmd.y (29574) |
---|---|
1/* 2 * Copyright (c) 1985, 1988, 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 --- 17 unchanged lines hidden (view full) --- 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 * @(#)ftpcmd.y 8.3 (Berkeley) 4/6/94 | 1/* 2 * Copyright (c) 1985, 1988, 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 --- 17 unchanged lines hidden (view full) --- 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 * @(#)ftpcmd.y 8.3 (Berkeley) 4/6/94 |
34 * $Id: ftpcmd.y,v 1.10 1997/02/22 14:21:27 peter Exp $ | 34 * $Id: ftpcmd.y,v 1.11 1997/07/24 09:26:10 davidn Exp $ |
35 */ 36 37/* 38 * Grammar for FTP commands. 39 * See RFC 959. 40 */ 41 42%{ --- 909 unchanged lines hidden (view full) --- 952 (void) signal(SIGALRM, toolong); 953 (void) alarm((unsigned) timeout); 954 if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { 955 reply(221, "You could at least say goodbye."); 956 dologout(0); 957 } 958 (void) alarm(0); 959#ifdef SETPROCTITLE | 35 */ 36 37/* 38 * Grammar for FTP commands. 39 * See RFC 959. 40 */ 41 42%{ --- 909 unchanged lines hidden (view full) --- 952 (void) signal(SIGALRM, toolong); 953 (void) alarm((unsigned) timeout); 954 if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { 955 reply(221, "You could at least say goodbye."); 956 dologout(0); 957 } 958 (void) alarm(0); 959#ifdef SETPROCTITLE |
960 if (strncasecmp(cbuf, "PASS", 4) != NULL) | 960 if (strncasecmp(cbuf, "PASS", 4) != 0) |
961 setproctitle("%s: %s", proctitle, cbuf); 962#endif /* SETPROCTITLE */ 963 if ((cp = strchr(cbuf, '\r'))) { 964 *cp++ = '\n'; 965 *cp = '\0'; 966 } 967 if ((cp = strpbrk(cbuf, " \n"))) 968 cpos = cp - cbuf; --- 320 unchanged lines hidden --- | 961 setproctitle("%s: %s", proctitle, cbuf); 962#endif /* SETPROCTITLE */ 963 if ((cp = strchr(cbuf, '\r'))) { 964 *cp++ = '\n'; 965 *cp = '\0'; 966 } 967 if ((cp = strpbrk(cbuf, " \n"))) 968 cpos = cp - cbuf; --- 320 unchanged lines hidden --- |