Deleted Added
full compact
mountd.c (126572) mountd.c (126643)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Herb Hasler and Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

42
43#if 0
44#ifndef lint
45static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95";
46#endif /*not lint*/
47#endif
48
49#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Herb Hasler and Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

42
43#if 0
44#ifndef lint
45static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95";
46#endif /*not lint*/
47#endif
48
49#include <sys/cdefs.h>
50__FBSDID("$FreeBSD: head/usr.sbin/mountd/mountd.c 126572 2004-03-04 04:42:52Z bms $");
50__FBSDID("$FreeBSD: head/usr.sbin/mountd/mountd.c 126643 2004-03-05 08:10:19Z markm $");
51
52#include <sys/param.h>
53#include <sys/mount.h>
54#include <sys/fcntl.h>
55#include <sys/stat.h>
56#include <sys/syslog.h>
57#include <sys/sysctl.h>
58#include <sys/linker.h>

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

278 int udpsock, tcpsock, udp6sock, tcp6sock;
279 int xcreated = 0, s;
280 int maxrec = RPC_MAXDATASIZE;
281 int one = 1;
282 int c, r;
283 in_port_t svcport = 0;
284
285 udp6conf = tcp6conf = NULL;
51
52#include <sys/param.h>
53#include <sys/mount.h>
54#include <sys/fcntl.h>
55#include <sys/stat.h>
56#include <sys/syslog.h>
57#include <sys/sysctl.h>
58#include <sys/linker.h>

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

278 int udpsock, tcpsock, udp6sock, tcp6sock;
279 int xcreated = 0, s;
280 int maxrec = RPC_MAXDATASIZE;
281 int one = 1;
282 int c, r;
283 in_port_t svcport = 0;
284
285 udp6conf = tcp6conf = NULL;
286 udp6sock = tcp6sock = NULL;
286 udp6sock = tcp6sock = 0;
287
288 /* Check that another mountd isn't already running. */
289 if ((mountdlockfd = (open(MOUNTDLOCK, O_RDONLY|O_CREAT, 0444))) == -1)
290 err(1, "%s", MOUNTDLOCK);
291
292 if(flock(mountdlockfd, LOCK_EX|LOCK_NB) == -1 && errno == EWOULDBLOCK)
293 errx(1, "another mountd is already running. Aborting");
294 s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);

--- 2254 unchanged lines hidden ---
287
288 /* Check that another mountd isn't already running. */
289 if ((mountdlockfd = (open(MOUNTDLOCK, O_RDONLY|O_CREAT, 0444))) == -1)
290 err(1, "%s", MOUNTDLOCK);
291
292 if(flock(mountdlockfd, LOCK_EX|LOCK_NB) == -1 && errno == EWOULDBLOCK)
293 errx(1, "another mountd is already running. Aborting");
294 s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);

--- 2254 unchanged lines hidden ---