diff options
author | obrien <obrien@FreeBSD.org> | 1999-09-15 02:50:52 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-09-15 02:50:52 +0000 |
commit | e0215a27a74ac4806bc4d13ea6da0e9f444dbf18 (patch) | |
tree | 6449eb4f97cd02d168d1b036b9a7151c52272f4f /contrib/amd/conf | |
parent | 452637dcc0d7040351cf90be4968d48917b45f8e (diff) | |
parent | 422815db966fe7dc38dfc5df2be5e83d5ea9f48c (diff) | |
download | FreeBSD-src-e0215a27a74ac4806bc4d13ea6da0e9f444dbf18.zip FreeBSD-src-e0215a27a74ac4806bc4d13ea6da0e9f444dbf18.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r51292,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/amd/conf')
-rw-r--r-- | contrib/amd/conf/checkmount/checkmount_bsd44.c | 4 | ||||
-rw-r--r-- | contrib/amd/conf/mtab/mtab_bsd.c | 4 | ||||
-rw-r--r-- | contrib/amd/conf/transp/transp_sockets.c | 33 | ||||
-rw-r--r-- | contrib/amd/conf/umount/umount_bsd44.c | 4 |
4 files changed, 17 insertions, 28 deletions
diff --git a/contrib/amd/conf/checkmount/checkmount_bsd44.c b/contrib/amd/conf/checkmount/checkmount_bsd44.c index b3bd572..4aa61dd 100644 --- a/contrib/amd/conf/checkmount/checkmount_bsd44.c +++ b/contrib/amd/conf/checkmount/checkmount_bsd44.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: checkmount_bsd44.c,v 1.1.1.1 1998/11/05 02:04:33 ezk Exp $ + * $Id: checkmount_bsd44.c,v 1.2 1999/01/10 21:54:06 ezk Exp $ * */ diff --git a/contrib/amd/conf/mtab/mtab_bsd.c b/contrib/amd/conf/mtab/mtab_bsd.c index 0476df5..5849c6a 100644 --- a/contrib/amd/conf/mtab/mtab_bsd.c +++ b/contrib/amd/conf/mtab/mtab_bsd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: mtab_bsd.c,v 1.1.1.1 1998/11/05 02:04:37 ezk Exp $ + * $Id: mtab_bsd.c,v 1.2 1999/01/10 21:54:11 ezk Exp $ * */ diff --git a/contrib/amd/conf/transp/transp_sockets.c b/contrib/amd/conf/transp/transp_sockets.c index e30612f..3dbd9dc 100644 --- a/contrib/amd/conf/transp/transp_sockets.c +++ b/contrib/amd/conf/transp/transp_sockets.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: transp_sockets.c,v 1.2 1998/11/10 16:23:41 ezk Exp $ + * $Id: transp_sockets.c,v 1.5 1999/08/22 21:12:31 ezk Exp $ * * Socket specific utilities. * -Erez Zadok <ezk@cs.columbia.edu> @@ -179,21 +179,6 @@ amu_svc_getcaller(SVCXPRT *xprt) /* - * Bind NFS to a reserved port. - */ -static int -bindnfs_port(int so, u_short *nfs_portp) -{ - u_short port; - int error = bind_resv_port(so, &port); - - if (error == 0) - *nfs_portp = port; - return error; -} - - -/* * Create the nfs service for amd */ int @@ -202,7 +187,7 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (* *soNFSp = socket(AF_INET, SOCK_DGRAM, 0); - if (*soNFSp < 0 || bindnfs_port(*soNFSp, nfs_portp) < 0) { + if (*soNFSp < 0 || bind_resv_port(*soNFSp, NULL) < 0) { plog(XLOG_FATAL, "Can't create privileged nfs port"); return 1; } @@ -210,6 +195,10 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (* plog(XLOG_FATAL, "cannot create rpc/udp service"); return 2; } + if ((*nfs_portp = (*nfs_xprtp)->xp_port) >= IPPORT_RESERVED) { + plog(XLOG_FATAL, "Can't create privileged nfs port"); + return 1; + } if (!svc_register(*nfs_xprtp, NFS_PROGRAM, NFS_VERSION, dispatch_fxn, 0)) { plog(XLOG_FATAL, "unable to register (NFS_PROGRAM, NFS_VERSION, 0)"); return 3; @@ -340,10 +329,10 @@ try_again: if (clnt == NULL) { #ifdef HAVE_CLNT_SPCREATEERROR plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s :%s", - nfs_version, proto, host, clnt_spcreateerror("")); + (int) nfs_version, proto, host, clnt_spcreateerror("")); #else /* not HAVE_CLNT_SPCREATEERROR */ plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s", - nfs_version, proto, host); + (int) nfs_version, proto, host); #endif /* not HAVE_CLNT_SPCREATEERROR */ return 0; } @@ -371,12 +360,12 @@ try_again: #endif /* HAVE_FS_NFS3 */ } plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s", - nfs_version, proto, host); + (int) nfs_version, proto, host); return 0; } plog(XLOG_INFO, "get_nfs_version: returning (%d,%s) on host %s", - nfs_version, proto, host); + (int) nfs_version, proto, host); return nfs_version; } diff --git a/contrib/amd/conf/umount/umount_bsd44.c b/contrib/amd/conf/umount/umount_bsd44.c index c58657b..1c4380e 100644 --- a/contrib/amd/conf/umount/umount_bsd44.c +++ b/contrib/amd/conf/umount/umount_bsd44.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: umount_bsd44.c,v 1.1.1.1 1998/11/05 02:04:43 ezk Exp $ + * $Id: umount_bsd44.c,v 1.2 1999/01/10 21:54:22 ezk Exp $ * */ |