head	1.2;
access;
symbols
	ypserv_1_0:1.1.1.1
	WPAUL:1.1.1;
locks; strict;
comment	@# @;


1.2
date	96.06.25.20.28.07;	author wpaul;	state dead;
branches;
next	1.1;

1.1
date	95.12.16.20.54.17;	author wpaul;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	95.12.16.20.54.17;	author wpaul;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Toss old mknetid script into the attic.

Adjust things slightly to support the new mknetid program.
@
text
@#!/bin/sh
#
# Produce netid.byname map file
#
# Written by O.Kirch, 1994.
#
PASSWD=$1
GROUP=$2
DOMAIN=$3

tempsed=/tmp/pass.$$

    # First, get all login/uid info from passwd file
    grep -v '^+:' $PASSWD |
    awk -F: '{ printf "s/^%s:/%s/\n", $1, $3; }' >$tempsed
    # next one is a giant pipe:
    grep -v '^+:' $GROUP |
    grep -v ':[ 	]*$' |
    sed 's/^[^:]*:[^:]*:\([0-9]*\):\(.*\)/\1,\2/' |
    	awk -F, '{ for (n=2; n<=NF; n++) 
    			if ($n != "") print $n":\t"$1;
    		 }' | 
    	sed -f $tempsed | sort | grep -v ':' | 
    	awk  'BEGIN { uid=-1; }
		    { if (uid == $1) {
		    	groups=groups","$2;
		      } else {
		        if (uid != -1)
		          print uid":"groups;
		        uid=$1; groups=$2;
		      }
		    }
	      END   { if (uid != -1) printf("%s:%s\n", uid, groups); }' |
	sed "s/\(.*\):/unix.\1@@$DOMAIN	&/"
    	rm -f $tempsed
    	exit 0
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import the new, non-GPL ypserv, written by yours truly. Functionally
equivalent to the old ypserv, except that it doesn't support the
-p [port] option to force the server to use a particular port.

The server stubs and yp.h header file are auto-generated from the yp.x
protocol definition file. The auto-generated XDR routines in libc/yp
are also used. The database access code has been broken out into a
seperate module so that other NIS utilities (ypxfr in particular)
can use it.

Note that the old mknetid script is being temporarily moved here; it
will be replaced by an mknetid program which will eventually have
a home under /usr/src/libexec. (The existing script is actually
somewhat broken -- it doesn't handle hosts -- but this isn't a big
deal at this point since the netid.byname map is really only useful
fopr Secure RPC, which we don't have yet.)
@
text
@@
