# # 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. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # Copyright (c) 1989 by Sun Microsystems, Inc. # Copyright (c) 2018, Joyent, Inc. # LIBS= a.a OBJS= pnpsplit.o devtolin.o expand.o lintodev.o \ namtouid.o tmless.o tmsecs.o uidtonam.o substr.o SRCS= $(OBJS:%.o=%.c) include ../../Makefile.cmd CPPFLAGS = -D_LTYPES -I.. $(CPPFLAGS.master) CERRWARN += -Wno-implicit-function-declaration CERRWARN += -Wno-parentheses CERRWARN += -Wno-extra # not linted SMATCH=off .KEEP_STATE: .PARALLEL: $(OBJS) all: $(LIBS) $(LIBS): $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) clean: $(RM) $(OBJS) clobber: clean $(RM) $(LIBS) lint: $(LINT.c) $(SRCS) install: .PRECIOUS: $(LIBS) /* * 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. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * convert device to linename (as in /dev/linename) * return ptr to LSZ-byte string, "?" if not found * device must be character device * maintains small list in tlist structure for speed */ #include #include #include #include "acctdef.h" #include #include #include static int tsize1; static struct tlist { char tname[LSZ]; /* linename */ dev_t tdev; /* device */ } tl[TSIZE1]; char *strncpy(); dev_t lintodev(); static char dev_dir[] = "/dev"; static char *def_srch_dirs[] = { "/dev/term", "/dev/pts", "/dev/xt", NULL }; char file_name[MAX_DEV_PATH]; /* name being returned */ static int srch_dir(); char * devtolin(dev_t device) { struct tlist *tp; char **srch_dirs; /* priority directories to search first */ int found = 0; int dirno = 0; for (tp = tl; tp < &tl[tsize1]; tp++) if (device == tp->tdev) return (tp->tname); srch_dirs = def_srch_dirs; while ((!found) && (srch_dirs[dirno] != NULL)) { /* * if /dev is one of the priority directories we should only * search its top level for now (set depth = MAX_SEARCH_DEPTH) */ found = srch_dir(device, srch_dirs[dirno], ((strcmp(srch_dirs[dirno], dev_dir) == 0) ? MAX_SRCH_DEPTH : 1), NULL); dirno++; } /* * if not yet found search remaining /dev directory skipping the * priority directories */ if (!found) found = srch_dir(device, dev_dir, 0, srch_dirs); /* * if found then put it (without the "/dev/" prefix) in the tlist * structure and return the path name without the "/dev/" prefix */ if (found) { if (tsize1 < TSIZE1) { tp->tdev = device; CPYN(tp->tname, file_name+5); tsize1++; } return (file_name+5); } else { /* * if not found put "?" in the tlist structure for that device * and return "?" */ if (tsize1 < TSIZE1) { tp->tdev = device; CPYN(tp->tname, "?"); tsize1++; } } return ("?"); } /* * Arguments: * device device we are looking for * path current path * depth current depth * skip_dirs directories that don't need searched */ static int srch_dir(dev_t device, char *path, int depth, char *skip_dirs[]) { DIR *fdev; struct dirent *d; int dirno = 0; int found = 0; int path_len; char *last_comp; struct stat sb; /* do we need to search this directory? */ if ((skip_dirs != NULL) && (depth != 0)) while (skip_dirs[dirno] != NULL) if (strcmp(skip_dirs[dirno++], path) == 0) return (0); /* open the directory */ if ((fdev = opendir(path)) == NULL) return (0); /* initialize file name using path name */ path_len = strlen(path); strcpy(file_name, path); last_comp = file_name + path_len; *last_comp++ = '/'; /* start searching this directory */ while ((!found) && ((d = readdir(fdev)) != NULL)) { if (d->d_ino != 0) { /* * if name would not be too long append it to * directory name, otherwise skip this entry */ if ((int)(path_len + strlen(d->d_name) + 2) > MAX_DEV_PATH) continue; else strcpy(last_comp, d->d_name); /* * if this directory entry has the device number we * need, then the name is found. Otherwise if it's a * directory (not . or ..) and we haven't gone too * deep, recurse. */ if (lintodev(file_name+5) == device) { found = 1; break; } else if ((depth < MAX_SRCH_DEPTH) && (strcmp(d->d_name, ".") != 0) && (strcmp(d->d_name, "..") != 0) && (stat(file_name, &sb) != -1) && ((sb.st_mode & S_IFMT) == S_IFDIR)) { found = srch_dir(device, file_name, depth+1, skip_dirs); } } } closedir(fdev); return (found); } /* * 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. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ #include #include #include #ifdef uts float #else /* * For as long as ct is of type comp_t, and comp_t is defined to be of type * unsigned short, the maximum value of ct will be 2^16-1 ie 65535. Based on * this input value, the maximum value that expand() can return will therefore * be 4292870144. A return type of ulong_t ensures we don't overflow. */ ulong_t #endif expand(comp_t ct) { int e; #ifdef uts float f; #else ulong_t f; #endif e = (ct >> 13) & 07; f = ct & 017777; while (e-- > 0) #ifdef uts f *= 8.0; /* can't shift a float */ #else f <<=3; #endif return f; } /* * 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. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.9 */ /* * convert linename to device * return -1 if nonexistent or not character device */ #include #include #include #include #include "acctdef.h" static char devtty[5+LSZ+1] = "/dev/xxxxxxxx"; char *strncpy(); dev_t lintodev(linename) char linename[LSZ]; { struct stat sb; strncpy(&devtty[5], linename, LSZ); if (stat(devtty, &sb) != -1 && (sb.st_mode&S_IFMT) == S_IFCHR) return((dev_t)sb.st_rdev); return((dev_t)NODEV); } /* * 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. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * namtouid converts login names to uids * maintains ulist for speed only */ #include #include #include "acctdef.h" #include static int usize; static struct ulist { char uname[NSZ]; uid_t uuid; } ul[A_USIZE]; char ntmp[NSZ+1]; char *strncpy(); uid_t namtouid(name) char name[NSZ]; { register struct ulist *up; register uid_t tuid; struct passwd *getpwnam(), *pp; for (up = ul; up < &ul[usize]; up++) if (strncmp(name, up->uname, NSZ) == 0) return(up->uuid); strncpy(ntmp, name, NSZ); (void) setpwent(); if ((pp = getpwnam(ntmp)) == NULL) tuid = -1; else { tuid = pp->pw_uid; if (usize < A_USIZE) { CPYN(up->uname, name); up->uuid = tuid; usize++; } } return(tuid); } /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * 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. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ /* * pnpsplit splits interval into prime & nonprime portions * ONLY ROUTINE THAT KNOWS ABOUT HOLIDAYS AND DEFN OF PRIME/NONPRIME */ #include #include #include #include "acctdef.h" #include #include /* * validate that hours and minutes of prime/non-prime read in * from holidays file fall within proper boundaries. * Time is expected in the form and range of 0000-2400. */ static int thisyear = 1970; /* this is changed by holidays file */ static int holidays[NHOLIDAYS]; /* holidays file day-of-year table */ static int day_tab[2][13] = { {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} }; /* * prime(0) and nonprime(1) times during a day * for BTL, prime time is 9AM to 5PM */ static struct hours { int h_sec; /* normally always zero */ int h_min; /* initialized from holidays file (time%100) */ int h_hour; /* initialized from holidays file (time/100) */ long h_type; /* prime/nonprime of previous period */ } h[4]; /* the sec, min, hr of the day's end */ struct tm daysend = { .tm_sec = 0, .tm_min = 60, .tm_hour = 23 }; long tmsecs(struct tm *, struct tm *); /* * split interval of length etime, starting at start into prime/nonprime * values, return as result * input values in seconds */ int pnpsplit(long start, ulong_t etime, long result[2]) { struct tm cur, end, hours; time_t tcur, tend; long tmp; int sameday; struct hours *hp; /* once holidays file is read, this is zero */ if(thisyear && (checkhol() == 0)) { return(0); } tcur = start; tend = start + etime; memcpy(&end, localtime(&tend), sizeof(end)); result[PRIME] = 0; result[NONPRIME] = 0; while ( tcur < tend ) { /* one iteration per day or part thereof */ memcpy(&cur, localtime(&tcur), sizeof(cur)); sameday = cur.tm_yday == end.tm_yday; if (ssh(&cur)) { /* ssh:only NONPRIME */ if (sameday) { result[NONPRIME] += tend-tcur; break; } else { tmp = tmsecs(&cur, &daysend); result[NONPRIME] += tmp; tcur += tmp; } } else { /* working day, PRIME or NONPRIME */ for (hp = h; tmless(hp, &cur); hp++); for (; hp->h_sec >= 0; hp++) { if (sameday && tmless(&end, hp)) { /* WHCC mod, change from = to += 3/6/86 Paul */ result[hp->h_type] += tend-tcur; tcur = tend; break; /* all done */ } else { /* time to next PRIME /NONPRIME change */ hours.tm_sec = hp->h_sec; hours.tm_min = hp->h_min; hours.tm_hour = hp->h_hour; tmp = tmsecs(&cur, &hours); result[hp->h_type] += tmp; tcur += tmp; cur.tm_sec = hp->h_sec; cur.tm_min = hp->h_min; cur.tm_hour = hp->h_hour; } } } } return(1); } /* * Starting day after Christmas, complain if holidays not yet updated. * This code is only executed once per program invocation. */ int checkhol(void) { struct tm *tp; time_t t; if(inithol() == 0) { fprintf(stderr, "pnpsplit: holidays table setup failed\n"); thisyear = 0; holidays[0] = -1; return(0); } time(&t); tp = localtime(&t); tp->tm_year += 1900; if ((tp->tm_year == thisyear && tp->tm_yday > 359) || tp->tm_year > thisyear) fprintf(stderr, "***UPDATE %s WITH NEW HOLIDAYS***\n", HOLFILE); thisyear = 0; /* checkhol() will not be called again */ return(1); } /* * ssh returns 1 if Sat, Sun, or Holiday */ int ssh(struct tm *ltp) { int i; if (ltp->tm_wday == 0 || ltp->tm_wday == 6) return(1); for (i = 0; holidays[i] >= 0; i++) if (ltp->tm_yday == holidays[i]) return(1); return(0); } /* * inithol - read from an ascii file and initialize the "thisyear" * variable, the times that prime and non-prime start, and the * holidays array. */ int inithol(void) { FILE *holptr; char holbuf[128]; int line = 0, holindx = 0, errflag = 0; int pstart, npstart; int doy; /* day of the year */ int month, day; char *c; if((holptr=fopen(HOLFILE, "r")) == NULL) { perror(HOLFILE); fclose(holptr); return(0); } while(fgets(holbuf, sizeof(holbuf), holptr) != NULL) { /* skip over blank lines and comments */ if (holbuf[0] == '*') continue; for (c = holbuf; isspace(*c); c++) /* is a space */; if (*c == '\0') continue; else if(++line == 1) { /* format: year p-start np-start */ if(sscanf(holbuf, "%4d %4d %4d", &thisyear, &pstart, &npstart) != 3) { fprintf(stderr, "%s: bad {yr ptime nptime} conversion\n", HOLFILE); errflag++; break; } /* validate year */ if(thisyear < 1970 || thisyear > 2037) { fprintf(stderr, "pnpsplit: invalid year: %d\n", thisyear); errflag++; break; } /* validate prime/nonprime hours */ if((! okay(pstart)) || (! okay(npstart))) { fprintf(stderr, "pnpsplit: invalid p/np hours\n"); errflag++; break; } /* Set up start of prime time; 2400 == 0000 */ h[0].h_sec = 0; h[0].h_min = pstart%100; h[0].h_hour = (pstart/100==24) ? 0 : pstart/100; h[0].h_type = NONPRIME; /* Set up start of non-prime time; 2400 == 2360 */ if ((npstart/100) == 24) { h[1].h_sec = 0; h[1].h_min = 60; h[1].h_hour = 23; } else { h[1].h_sec = 0; h[1].h_min = npstart % 100; h[1].h_hour = npstart / 100; } h[1].h_type = PRIME; /* This is the end of the day */ h[2].h_sec = 0; h[2].h_min = 60; h[2].h_hour = 23; h[2].h_type = NONPRIME; /* The end of the array */ h[3].h_sec = -1; continue; } else if(holindx >= NHOLIDAYS) { fprintf(stderr, "pnpsplit: too many holidays, "); fprintf(stderr, "recompile with larger NHOLIDAYS\n"); errflag++; break; } /* Fill up holidays array from holidays file */ sscanf(holbuf, "%d/%d %*s %*s %*[^\n]\n", &month, &day); if (month < 0 || month > 12) { fprintf(stderr, "pnpsplit: invalid month %d\n", month); errflag++; break; } if (day < 0 || day > 31) { fprintf(stderr, "pnpsplit: invalid day %d\n", day); errflag++; break; } doy = day_of_year(thisyear, month, day); holidays[holindx++] = (doy - 1); } fclose(holptr); if(!errflag && holindx < NHOLIDAYS) { holidays[holindx] = -1; return(1); } else return(0); } /* * tmsecs returns number of seconds from t1 to t2, * times expressed in localtime format. * assumed that t1 <= t2, and are in same day. */ long tmsecs(struct tm *t1, struct tm *t2) { return((t2->tm_sec - t1->tm_sec) + 60*(t2->tm_min - t1->tm_min) + 3600L*(t2->tm_hour - t1->tm_hour)); } /* * return 1 if t1 earlier than t2 (times in localtime format) * assumed that t1 and t2 are in same day */ int tmless(struct tm *t1, struct tm *t2) { if (t1->tm_hour != t2->tm_hour) return(t1->tm_hour < t2->tm_hour); if (t1->tm_min != t2->tm_min) return(t1->tm_min < t2->tm_min); return(t1->tm_sec < t2->tm_sec); } /* set day of year from month and day */ int day_of_year(int year, int month, int day) { int i, leap; leap = year%4 == 0 && year%100 || year%400 == 0; for (i = 1; i < month; i++) day += day_tab[leap][i]; return(day); } /* * 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. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */ /* Place the `len' length substring of `as' starting at `as[origin]' in `aresult'. Return `aresult'. Note: The copying of as to aresult stops if either the specified number (len) characters have been copied, or if the end of as is found. A negative len generally guarantees that everything gets copied. */ char *substr(as, aresult, origin, len) char *as, *aresult; int origin; register unsigned len; { register char *s, *result; s = as + origin; result = aresult; ++len; while (--len && (*result++ = *s++)) ; if (len == 0) *result = 0; return(aresult); } /* * 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. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * return 1 if t1 earlier than t2 (times in localtime format) * assumed that t1 and t2 are in same day */ #include int tmless(t1, t2) register struct tm *t1, *t2; { if (t1->tm_hour != t2->tm_hour) return(t1->tm_hour < t2->tm_hour); if (t1->tm_min != t2->tm_min) return(t1->tm_min < t2->tm_min); return(t1->tm_sec < t2->tm_sec); } /* * 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. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */ /* * tmsecs returns number of seconds from t1 to t2, * times expressed in localtime format. * assumed that t1 <= t2, and are in same day. */ #include long tmsecs(t1, t2) register struct tm *t1, *t2; { return((t2->tm_sec - t1->tm_sec) + 60*(t2->tm_min - t1->tm_min) + 3600L*(t2->tm_hour - t1->tm_hour)); } /* * 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. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * convert uid to login name; interface to getpwuid that keeps up to USIZE1 * names to avoid unnecessary accesses to passwd file * returns ptr to NSZ-byte name (not necessarily null-terminated) * returns ptr to "?" if cannot convert */ #include #include #include #include "acctdef.h" #include static int usize1; static struct ulist { char uname[NSZ]; uid_t uuid; } ul[USIZE1]; char *strncpy(); char * uidtonam(uid) uid_t uid; { register struct ulist *up; struct passwd *getpwuid(); register struct passwd *pp; for (up = ul; up < &ul[usize1]; up++) if (uid == up->uuid) return(up->uname); setpwent(); if ((pp = getpwuid(uid)) == NULL) return("?"); else { if (usize1 < USIZE1) { up->uuid = uid; CPYN(up->uname, pp->pw_name); usize1++; } return(pp->pw_name); } }