diff options
Diffstat (limited to 'usr/src/cmd/ypcmd')
| -rw-r--r-- | usr/src/cmd/ypcmd/mknetid/getname.c | 16 | ||||
| -rw-r--r-- | usr/src/cmd/ypcmd/mknetid/mknetid.c | 22 | ||||
| -rw-r--r-- | usr/src/cmd/ypcmd/revnetgroup/revnetgroup.c | 16 | ||||
| -rw-r--r-- | usr/src/cmd/ypcmd/revnetgroup/util.c | 13 | ||||
| -rw-r--r-- | usr/src/cmd/ypcmd/revnetgroup/util.h | 14 |
5 files changed, 31 insertions, 50 deletions
diff --git a/usr/src/cmd/ypcmd/mknetid/getname.c b/usr/src/cmd/ypcmd/mknetid/getname.c index 5f60fd801e..36d3198939 100644 --- a/usr/src/cmd/ypcmd/mknetid/getname.c +++ b/usr/src/cmd/ypcmd/mknetid/getname.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,11 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ - -#pragma ident "%Z%%M% %I% %E% SMI" /* SMI4.1 1.3 */ - #include <stdio.h> #include <string.h> @@ -35,12 +31,12 @@ #define isignore(c) (strchr(ignore, c) != NULL) /* - * getline() + * getaline() * Read a line from a file. * What's returned is a cookie to be passed to getname */ char ** -getline(line, maxlinelen, f, lcount, com) +getaline(line, maxlinelen, f, lcount, com) char *line; int maxlinelen; FILE *f; diff --git a/usr/src/cmd/ypcmd/mknetid/mknetid.c b/usr/src/cmd/ypcmd/mknetid/mknetid.c index 23434ccbfa..85a1661b81 100644 --- a/usr/src/cmd/ypcmd/mknetid/mknetid.c +++ b/usr/src/cmd/ypcmd/mknetid/mknetid.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,11 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ - -#pragma ident "%Z%%M% %I% %E% SMI" /* SMI4.1 1.5 */ - /* * Network name to unix credential database generator. * Uses /etc/passwd, /etc/group, /etc/hosts and /etc/netid to @@ -57,7 +53,7 @@ #define NUMGIDS (NGROUPS_MAX + 1) /* group-access-list + gid */ -extern char **getline(); +extern char **getaline(); extern char *malloc(); extern char *strcpy(); @@ -172,7 +168,7 @@ domapfile(mapfile, mf) curfile = mapfile; curline = 0; - while (lp = getline(line, sizeof (line), mf, &curline, "#")) { + while (lp = getaline(line, sizeof (line), mf, &curline, "#")) { check_getname(lp, name, WHITE, WHITE, "#"); if (wasprinted(name)) { multdef(name); @@ -219,7 +215,7 @@ dogrpfile(grpfile, gf) curfile = grpfile; curline = 0; - while (lp = getline(line, sizeof (line), gf, &curline, "")) { + while (lp = getaline(line, sizeof (line), gf, &curline, "")) { check_getname(lp, name, WHITE, COLON, ""); if (name[0] == '+') { continue; @@ -252,7 +248,7 @@ dopwdfile(pwdfile, pf) curfile = pwdfile; curline = 0; - while (lp = getline(line, sizeof (line), pf, &curline, "")) { + while (lp = getaline(line, sizeof (line), pf, &curline, "")) { check_getname(lp, user, WHITE, COLON, ""); /* username */ if (user[0] == '-' || user[0] == '+') { continue; /* NIS entry */ @@ -291,7 +287,7 @@ dohostfile(hostfile, hf) curfile = hostfile; curline = 0; - while (lp = getline(line, sizeof (line), hf, &curline, "#")) { + while (lp = getaline(line, sizeof (line), hf, &curline, "#")) { check_getname(lp, name, WHITE, WHITE, "#"); if (getname(name, MAXNAMELEN, WHITE, WHITE, lp, "#") != 1) { continue; diff --git a/usr/src/cmd/ypcmd/revnetgroup/revnetgroup.c b/usr/src/cmd/ypcmd/revnetgroup/revnetgroup.c index 41f161e913..f19a33cd4d 100644 --- a/usr/src/cmd/ypcmd/revnetgroup/revnetgroup.c +++ b/usr/src/cmd/ypcmd/revnetgroup/revnetgroup.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1994, by Sun Microsystems, Inc. - * All rights reserved. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ - + /* * For SUNWnskit - version 1.1 - * - * Based on: - * #pragma ident "%Z%%M% %I% %E% SMI" (SMI4.1 1.6) */ #include <stdlib.h> @@ -277,7 +273,7 @@ loadtable(FILE *nf) char *group; char *line; - while (getline(buf, MAXGROUPLEN, nf)) { + while (getaline(buf, MAXGROUPLEN, nf)) { for (p = buf; *p && isspace((int)*p); p++) ; /* skip leading blanks */ for (; *p && *p != '#' && *p != ' ' && *p != '\t'; p++) diff --git a/usr/src/cmd/ypcmd/revnetgroup/util.c b/usr/src/cmd/ypcmd/revnetgroup/util.c index 511bf34b5b..cde75016b5 100644 --- a/usr/src/cmd/ypcmd/revnetgroup/util.c +++ b/usr/src/cmd/ypcmd/revnetgroup/util.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,11 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1996-2001 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" /* SMI4.1 1.4 */ - #include <stdio.h> #include <string.h> #include "util.h" @@ -38,7 +35,7 @@ * of a line */ char * -getline(line, maxlen, fp) +getaline(line, maxlen, fp) char *line; int maxlen; FILE *fp; diff --git a/usr/src/cmd/ypcmd/revnetgroup/util.h b/usr/src/cmd/ypcmd/revnetgroup/util.h index e83ba1ed0f..3a6db7ffd7 100644 --- a/usr/src/cmd/ypcmd/revnetgroup/util.h +++ b/usr/src/cmd/ypcmd/revnetgroup/util.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,14 @@ * * CDDL HEADER END */ + /* - * Copyright 1995 Sun Microsystems Inc. - * All rights reserved. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ - #ifndef __UTIL_H #define __UTIL_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SMI4.1 1.5 */ - #ifdef __cplusplus extern "C" { #endif @@ -57,7 +53,7 @@ extern char *malloc(); */ extern char *alloca(); -char *getline(); +char *getaline(); void fatal(); #ifdef __cplusplus |
