(void)strncpy(loginname, name, sizeof loginname-1); loginname[sizeof loginname -1] = '\0';
strlcpy(loginname, name, sizeof loginname);
findid(name)	char *name;{	FILE *fp;	static char slopt[5][16];	static char laddr[16];	static char raddr[16];	static char mask[16];	char user[MAXLOGNAME], *p;	int i, j, n;	(void)strncpy(loginname, name, sizeof loginname-1);	loginname[sizeof loginname -1] = '\0';	if ((fp = fopen(_PATH_ACCESS, "r")) == NULL) {		syslog(LOG_ERR, "%s: %m", _PATH_ACCESS);		err(1, "%s", _PATH_ACCESS);	}	while (fgets(loginargs, sizeof(loginargs) - 1, fp)) {		if (ferror(fp))			break;		if ((p = strchr(loginargs, '#')))			*p = '\0';		if ((p = strchr(loginargs, '\n')))			*p = '\0';		n = sscanf(loginargs, "%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s\n",		    user, laddr, raddr, mask, slopt[0], slopt[1], 		    slopt[2], slopt[3], slopt[4]);		if (strcmp(user, name) != 0)			continue;		/*		 * we've found the guy we're looking for -- see if		 * there's a login file we can use.  First check for		 * one specific to this host.  If none found, try for		 * a generic one.		 */		(void)snprintf(loginfile, sizeof loginfile, "%s.%s",		    _PATH_LOGIN, name);		if (access(loginfile, R_OK|X_OK) != 0) {			(void)strcpy(loginfile, _PATH_LOGIN);			if (access(loginfile, R_OK|X_OK)) {				fputs("access denied - no login file\n",				      stderr);				syslog(LOG_ERR,				       "access denied for %s - no %s",				       name, _PATH_LOGIN);				exit(5);			}		}		(void) fclose(fp);		return;	}	syslog(LOG_ERR, "SLIP access denied for %s", name);	errx(1, "SLIP access denied for %s", name);	/* NOTREACHED */}