Deleted Added
full compact
tftpd.c (18471) tftpd.c (20052)
1/*
2 * Copyright (c) 1983, 1993
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) 1983, 1993
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$
33 * $Id: tftpd.c,v 1.4 1996/09/22 21:56:07 wosch Exp $
34 */
35
36#ifndef lint
37static char copyright[] =
38"@(#) Copyright (c) 1983, 1993\n\
39 The Regents of the University of California. All rights reserved.\n";
40#endif /* not lint */
41

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

430 }
431 err = EACCESS;
432 }
433 }
434 if (dirp->name == NULL)
435 return (err);
436 *filep = filename = pathname;
437 }
34 */
35
36#ifndef lint
37static char copyright[] =
38"@(#) Copyright (c) 1983, 1993\n\
39 The Regents of the University of California. All rights reserved.\n";
40#endif /* not lint */
41

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

430 }
431 err = EACCESS;
432 }
433 }
434 if (dirp->name == NULL)
435 return (err);
436 *filep = filename = pathname;
437 }
438 fd = open(filename, mode == RRQ ? 0 : 1);
438 fd = open(filename, mode == RRQ ? O_RDONLY : O_WRONLY|O_TRUNC);
439 if (fd < 0)
440 return (errno + 100);
441 file = fdopen(fd, (mode == RRQ)? "r":"w");
442 if (file == NULL) {
443 return errno+100;
444 }
445 return (0);
446}

--- 237 unchanged lines hidden ---
439 if (fd < 0)
440 return (errno + 100);
441 file = fdopen(fd, (mode == RRQ)? "r":"w");
442 if (file == NULL) {
443 return errno+100;
444 }
445 return (0);
446}

--- 237 unchanged lines hidden ---