diff --git a/libexec/mknetid/hash.c b/libexec/mknetid/hash.c index f875ba158a4d..989fdb3775dc 100644 --- a/libexec/mknetid/hash.c +++ b/libexec/mknetid/hash.c @@ -28,8 +28,6 @@ * 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$ */ #include @@ -39,9 +37,9 @@ #include "hash.h" #ifndef lint -static const char rcsid[] = "$Id$"; -#endif - +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ /* * This hash function is stolen directly from the diff --git a/libexec/mknetid/mknetid.8 b/libexec/mknetid/mknetid.8 index 5b7ff6dbaddf..f1261b9f8e60 100644 --- a/libexec/mknetid/mknetid.8 +++ b/libexec/mknetid/mknetid.8 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id$ +.\" $Id: mknetid.8,v 1.3 1997/02/22 14:21:53 peter Exp $ .\" .Dd June 23, 1996 .Dt MKNETID 8 @@ -49,68 +49,67 @@ processes the contents of the .Xr group 5 , .Xr passwd 5 , -.Xr hosts 5 and +.Xr hosts 5 +and .Xr netid 5 files into the format used to generate the .Pa netid.byname -NIS map. This map is used to hold credential information for both users +.Tn NIS +map. This map is used to hold credential information for both users and hosts in a operating system independent format. .Pp The -.Nm mknetid +.Nm command checks for duplicate occurances of netids and filters them out. .Pp The -.Nm mknetid +.Nm command prints its results on the standard output. It is usually called only by -.Nm /var/yp/Makefile -when rebuilding the NIS maps. +.Pa /var/yp/Makefile +when rebuilding the +.Tn NIS +maps. .Pp .Sh OPTIONS The -.Nm mknetid +.Nm command supports the following options: -.Bl -tag -width flag +.Bl -tag -width indent .It Fl q Normally, -.Nm mknetid +.Nm prints a warning message when it encounters a duplicate netid. This flag turns on 'quiet' mode, allowing the warnings to be surpressed. Other error messages may still be generated. -.It Fl g Ar group-file -The -.Fl g -flag can be used to specify the location of the group information +.It Fl g Ar group_file +Specify the location of the group information file. The compiled-in default is .Pa /etc/group . -.It Fl p Ar passwd-file -The -.Fl p -flag can be used to specify the location of the passwd information +.It Fl p Ar passwd_file +Specify the location of the passwd information file. The compiled-in default is .Pa /etc/passwd . -.It Fl h Ar group-file -The -.Fl h -flag can be used to specify the location of the hosts database +.It Fl h Ar group_file +Specify the location of the hosts database file. The compiled-in default is .Pa /etc/hosts . -.It Fl n Ar netid-file -The -.Fl n -flag can be used to specify the location of the netid information +.It Fl n Ar netid_file +Specify the location of the netid information file. The compiled-in default is .Pa /etc/netid . Note that no error is generated if the netid database can't be found. The netid database is not likely to be present on most systems -until Secure RPC support is added to FreeBSD. +until +.Tn Secure RPC +support is added to +.Bx Free . .It Fl d Ar domain By default, the -.Nm mknetid +.Nm command uses the system domainname when generating netid records. If -the system domainnameis not set, the domain must be specified on the +the system domainname is not set, the domain must be specified on the command line with the .Fl d flag. If the domainname is set, the @@ -118,24 +117,26 @@ flag. If the domainname is set, the flag may be used to override it. .El .Sh FILES -.Bl -tag -width Pa -compact +.Bl -tag -width /var/yp/Makefile -compact .It Pa /var/yp/Makefile -The Makefile that calls +the Makefile that calls .Nm yp_mkdb and .Nm mknetid -to build the NIS databases. +to build the +.Tn NIS +databases .It Pa /etc/group -The default group database file. +the default group database file .It Pa /etc/passwd -The default passwd database file. +the default passwd database file .It Pa /etc/hosts -The default hosts database file. +the default hosts database file .It Pa /etc/netid -The default netid database file. +the default netid database file .El .Sh SEE ALSO .Xr yp 4 , .Xr yp_mkdb 8 .Sh AUTHOR -Bill Paul +.An Bill Paul Aq wpaul@ctr.columbia.edu diff --git a/libexec/mknetid/mknetid.c b/libexec/mknetid/mknetid.c index 36bbfc4bfcf9..0104bebe8017 100644 --- a/libexec/mknetid/mknetid.c +++ b/libexec/mknetid/mknetid.c @@ -34,8 +34,6 @@ * Written by Bill Paul * Center for Telecommunications Research * Columbia University, New York City - * - * $Id: mknetid.c,v 1.6 1997/02/22 14:21:54 peter Exp $ */ #include @@ -46,17 +44,19 @@ #include #include -#include #include +#include #include #include #include +#include #include "hash.h" #ifndef lint -static const char rcsid[] = "$Id: mknetid.c,v 1.6 1997/02/22 14:21:54 peter Exp $"; -#endif +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ #define LINSIZ 1024 #define OPSYS "unix" @@ -85,17 +85,19 @@ struct member_entry *dtable[TABLESIZE]; extern struct group *_getgrent __P(( void )); extern int _setgrent __P(( void )); extern void _endgrent __P(( void )); -void usage(prog) -char *prog; + +static void +usage() { - fprintf (stderr,"usage: %s [-q] [-g group file] [-p passwd file] \ -[-h hosts file]\n\t\t\t[-d netid file] [-d domain]\n",prog); + fprintf (stderr, "%s\n%s\n", + "usage: mknetid [-q] [-g group_file] [-p passwd_file] [-h hosts_file]", + " [-d netid_file] [-d domain]"); exit(1); } -extern char *optarg; extern FILE *_gr_fp; +int main(argc, argv) int argc; char *argv[]; @@ -132,7 +134,7 @@ main(argc, argv) quiet++; break; default: - usage(argv[0]); + usage(); break; } } diff --git a/libexec/mknetid/parse_group.c b/libexec/mknetid/parse_group.c index e5fd7185fb04..5d2917dd1278 100644 --- a/libexec/mknetid/parse_group.c +++ b/libexec/mknetid/parse_group.c @@ -31,13 +31,13 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94"; -#endif /* LIBC_SCCS and not lint */ - #ifndef lint -static const char rcsid[] = "$Id: parse_group.c,v 1.3 1997/02/22 14:21:54 peter Exp $"; +#if 0 +static const char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94"; #endif +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ /* * This is a slightly modified chunk of getgrent(3). All the YP support @@ -45,10 +45,10 @@ static const char rcsid[] = "$Id: parse_group.c,v 1.3 1997/02/22 14:21:54 peter */ #include +#include #include #include #include -#include FILE *_gr_fp; static struct group _gr_group;