Use err(3). Remove multiply defined Id string.
This commit is contained in:
parent
fdd839012a
commit
1e96bb57a6
@ -27,9 +27,14 @@
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)update.c 1.2 91/03/11 Copyr 1986 Sun Micro";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1986, 1989, Sun Microsystems, Inc.
|
||||
@ -64,15 +69,7 @@ static char sccsid[] = "@(#)update.c 1.2 91/03/11 Copyr 1986 Sun Micro";
|
||||
#define YPOP_STORE 4 /* add, or change */
|
||||
#endif
|
||||
|
||||
#ifdef notdef
|
||||
extern char *getpass();
|
||||
extern char *malloc();
|
||||
#endif
|
||||
|
||||
#ifdef YP
|
||||
#ifdef notdef
|
||||
static char *basename();
|
||||
#endif
|
||||
static char SHELL[] = "/bin/sh";
|
||||
static char YPDBPATH[]="/var/yp"; /* This is defined but not used! */
|
||||
static char PKMAP[] = "publickey.byname";
|
||||
|
@ -28,10 +28,13 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: yp_dbdelete.c,v 1.1 1996/12/26 05:43:03 wpaul Exp wpaul $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
@ -45,10 +48,6 @@
|
||||
#include <rpcsvc/yp.h>
|
||||
#include "ypxfr_extern.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$Id: yp_dbdelete.c,v 1.1 1996/12/26 05:43:03 wpaul Exp wpaul $";
|
||||
#endif
|
||||
|
||||
int yp_del_record(dbp,key)
|
||||
DB *dbp;
|
||||
DBT *key;
|
||||
|
@ -28,10 +28,13 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: yp_dbupdate.c,v 1.1 1996/12/26 06:00:13 wpaul Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/fcntl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
@ -46,10 +49,6 @@ struct dom_binding {};
|
||||
#include "ypxfr_extern.h"
|
||||
#include "ypupdated_extern.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$Id: yp_dbupdate.c,v 1.1 1996/12/26 06:00:13 wpaul Exp $";
|
||||
#endif
|
||||
|
||||
static int yp_domake(map, domain)
|
||||
char *map;
|
||||
char *domain;
|
||||
|
@ -28,10 +28,13 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ypupdated_main.c,v 1.1 1996/12/25 19:31:28 wpaul Exp wpaul $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "ypupdate_prot.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* getenv, exit */
|
||||
@ -63,9 +66,6 @@
|
||||
#endif
|
||||
|
||||
#define _RPCSVC_CLOSEDOWN 120
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$Id: ypupdated_main.c,v 1.1 1996/12/25 19:31:28 wpaul Exp wpaul $";
|
||||
#endif /* not lint */
|
||||
int _rpcpmstart; /* Started by a port monitor ? */
|
||||
static int _rpcfdtype;
|
||||
/* Whether Stream or Datagram ? */
|
||||
@ -87,7 +87,7 @@ void _msgout(char* msg)
|
||||
if (_rpcpmstart)
|
||||
syslog(LOG_ERR, msg);
|
||||
else
|
||||
(void) fprintf(stderr, "%s\n", msg);
|
||||
warnx("%s", msg);
|
||||
#else
|
||||
syslog(LOG_ERR, msg);
|
||||
#endif
|
||||
@ -146,7 +146,7 @@ ypupdated_svc_run()
|
||||
if (errno == EINTR) {
|
||||
continue;
|
||||
}
|
||||
perror("svc_run: - select failed");
|
||||
warn("svc_run: - select failed");
|
||||
return;
|
||||
case 0:
|
||||
continue;
|
||||
@ -181,10 +181,11 @@ static void reaper(sig)
|
||||
|
||||
void usage()
|
||||
{
|
||||
fprintf(stderr, "%s [-p path]\n", progname);
|
||||
fprintf(stderr, "rpc.ypupdatedd [-p path]\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
|
@ -34,10 +34,13 @@
|
||||
* Written by Bill Paul <wpaul@ctr.columbia.edu>
|
||||
* Center for Telecommunications Research
|
||||
* Columbia University, New York City
|
||||
*
|
||||
* $Id: ypupdated_server.c,v 1.3 1996/12/26 06:06:05 wpaul Exp wpaul $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <rpc/rpc.h>
|
||||
#include <rpc/auth_des.h>
|
||||
@ -50,10 +53,6 @@
|
||||
#include "yp_extern.h"
|
||||
#include "ypxfr_extern.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$Id: ypupdated_server.c,v 1.3 1996/12/26 06:06:05 wpaul Exp wpaul $";
|
||||
#endif
|
||||
|
||||
int children = 0;
|
||||
int forked = 0;
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.\" $Id: rpc.ypxfrd.8,v 1.5 1997/02/22 16:13:01 peter Exp $
|
||||
.\"
|
||||
.Dd June 2, 1996
|
||||
.Dt RPC.YPXFRD 8
|
||||
@ -41,7 +41,7 @@
|
||||
.Op Fl p Ar path
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm rpc.ypxfrd
|
||||
.Nm
|
||||
daemon is used to speed up the distribtion of very large NIS maps
|
||||
from NIS master to NIS slave servers. The normal method for transfering
|
||||
maps involves several steps:
|
||||
@ -83,18 +83,18 @@ and
|
||||
.Pa passwd.by{name,uid} .
|
||||
.Pp
|
||||
The
|
||||
.Nm rpc.ypxfrd
|
||||
.Nm
|
||||
server speeds up the transfer process by allowing NIS slave servers to
|
||||
simply copy the master server's map files rather than building their
|
||||
own from scratch. Simply put,
|
||||
.Nm rpc.ypxfrd
|
||||
.Nm
|
||||
implements an RPC-based file transfer protocol. Transfering even
|
||||
a multi-megabyte file in this fashion takes only a few seconds compared
|
||||
to the several minutes it would take even a reasonably fast slave server
|
||||
to build a new map from scratch.
|
||||
.Pp
|
||||
The
|
||||
.Nm rpc.ypxfrd
|
||||
.Nm
|
||||
server uses the same access restriction mechanism as
|
||||
.Xr ypserv 8 .
|
||||
This means that slave servers will only be permitted to transfer
|
||||
@ -105,9 +105,8 @@ ports will be allowed to transfer the
|
||||
.Pa master.passwd
|
||||
maps.
|
||||
.Sh OPTIONS
|
||||
The following options and flags are supported by
|
||||
.Nm rpc.ypxfrd :
|
||||
.Bl -tag -width flag
|
||||
The following option is available:
|
||||
.Bl -tag -width indent
|
||||
.It Fl p Ar path
|
||||
This option can be used to override the default path to
|
||||
the location of the NIS
|
||||
@ -125,15 +124,17 @@ The NIS maps for a particular NIS domain.
|
||||
.Xr ypserv 8 ,
|
||||
.Xr ypxfr 8
|
||||
.Sh BUGS
|
||||
The FreeBSD
|
||||
The
|
||||
.Bx Free
|
||||
.Nm ypxfrd
|
||||
protocol is not compatible with that used by SunOS. This is unfortunate
|
||||
but unavoidable: Sun's protocol is not freely available, and even if it
|
||||
were it would probably not be useful since the SunOS NIS v2 implementation
|
||||
uses the original ndbm package for its map databases whereas the FreeBSD
|
||||
uses the original ndbm package for its map databases whereas the
|
||||
.Bx Free
|
||||
implementation uses Berkeley DB. These two packages use vastly different
|
||||
file formats. Furthermore, ndbm is byte-order sensitive and not very
|
||||
smart about it, meaning that am ndbm database created on a big endian
|
||||
system can't be read on a little endian system.
|
||||
.Sh AUTHOR
|
||||
Bill Paul <wpaul@ctr.columbia.edu>
|
||||
.An Bill Paul Aq wpaul@ctr.columbia.edu
|
||||
|
@ -28,11 +28,16 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ypxfrd_main.c,v 1.4 1997/03/11 15:56:48 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "ypxfrd.h"
|
||||
#include <err.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* getenv, exit */
|
||||
#include <unistd.h>
|
||||
@ -60,9 +65,6 @@
|
||||
#endif
|
||||
|
||||
#define _RPCSVC_CLOSEDOWN 120
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$Id: ypxfrd_main.c,v 1.4 1997/03/11 15:56:48 peter Exp $";
|
||||
#endif /* not lint */
|
||||
int _rpcpmstart; /* Started by a port monitor ? */
|
||||
static int _rpcfdtype;
|
||||
/* Whether Stream or Datagram ? */
|
||||
@ -84,7 +86,7 @@ void _msgout(char* msg)
|
||||
if (_rpcpmstart)
|
||||
syslog(LOG_ERR, msg);
|
||||
else
|
||||
(void) fprintf(stderr, "%s\n", msg);
|
||||
warnx("%s", msg);
|
||||
#else
|
||||
syslog(LOG_ERR, msg);
|
||||
#endif
|
||||
@ -144,7 +146,7 @@ ypxfrd_svc_run()
|
||||
if (errno == EINTR) {
|
||||
continue;
|
||||
}
|
||||
perror("svc_run: - select failed");
|
||||
warn("svc_run: - select failed");
|
||||
return;
|
||||
case 0:
|
||||
continue;
|
||||
@ -177,17 +179,18 @@ static void reaper(sig)
|
||||
|
||||
void usage()
|
||||
{
|
||||
fprintf(stderr, "%s [-p path]\n", progname);
|
||||
fprintf(stderr, "usage: rpc.ypxfrd [-p path]\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
register SVCXPRT *transp;
|
||||
register SVCXPRT *transp = NULL;
|
||||
int sock;
|
||||
int proto;
|
||||
int proto = 0;
|
||||
struct sockaddr_in saddr;
|
||||
int asize = sizeof (saddr);
|
||||
int ch;
|
||||
@ -223,10 +226,8 @@ main(argc, argv)
|
||||
int pid, i;
|
||||
|
||||
pid = fork();
|
||||
if (pid < 0) {
|
||||
perror("cannot fork");
|
||||
exit(1);
|
||||
}
|
||||
if (pid < 0)
|
||||
err(1, "fork");
|
||||
if (pid)
|
||||
exit(0);
|
||||
size = getdtablesize();
|
||||
|
@ -28,15 +28,15 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ypxfrd_server.c,v 1.5 1997/04/10 13:48:59 wpaul Exp $
|
||||
*/
|
||||
|
||||
#include "ypxfrd.h"
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$Id: ypxfrd_server.c,v 1.5 1997/04/10 13:48:59 wpaul Exp $";
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "ypxfrd.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
Loading…
Reference in New Issue
Block a user