4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
31 #pragma ident "%Z%%M% %I% %E% SMI"
39 void rproc(), uproc();
41 static char Nnament
[MAXLENGTH
][NAMESIZE
];
42 static char *Nptr
[MAXLENGTH
];
43 static short Nnames
= 0;
51 char prev
[2 * NAMESIZE
];
53 if (eaccess(GRADES
, 04) == -1) {
54 (void) fprintf(stderr
, "No administrator defined service grades available on this machine, use single letter/number only\n");
58 while ((c
= getopt(argc
, argv
, "x:u")) != EOF
)
69 (void) fprintf(stderr
, "usage: uuglist [-u] [-xLEVEL]\n");
77 (void) setuid(UUCPUID
);
79 (void) guinfo(Uid
, User
);
85 for (i
= 0; i
< Nnames
; i
++) {
87 if (EQUALS(Nptr
[i
], prev
))
91 (void) strcpy(prev
, Nptr
[i
]);
102 DEBUG(7, "insert(%s) ", name
);
104 for (i
= Nnames
; i
> 0; i
--)
105 if (strcmp(name
, Nptr
[i
-1]) > 0)
111 if (Nnames
== MAXLENGTH
)
112 p
= strcpy(Nptr
[--Nnames
], name
);
114 p
= strcpy(Nnament
[Nnames
], name
);
116 for (j
= Nnames
; j
> i
; j
--)
119 DEBUG(7, "insert %s ", p
);
120 DEBUG(7, "at %d\n", i
);
134 cfd
= fopen(GRADES
, "r");
136 while (rdfulline(cfd
, line
, BUFSIZ
) != 0) {
138 na
= getargs(line
, carray
, C_MAX
);
154 cfd
= fopen(GRADES
, "r");
156 while (rdfulline(cfd
, line
, BUFSIZ
) != 0) {
158 na
= getargs(line
, carray
, C_MAX
);
160 if (upermit(carray
, na
) != FAIL
)
168 int Dfileused
= FALSE
;
171 int gnamef() { return (0); }
172 int gdirf() { return (0); }
173 int cklock() { return (0); }
178 assert (s1
, s2
, i1
, s3
, i2
)
181 { } /* for ASSERT in gnamef.c */
186 errent(s1
, s2
, i1
, file
, line
)
187 char *s1
, *s2
, *file
;