Lines Matching defs:entryx

119 	struct utmpx entryx;
161 load_utmpx_struct(&entryx, argv);
162 check_utmpx(&entryx);
168 if (fstatat(devfd, entryx.ut_line, &stat_arg, 0) < 0) {
188 err = invalid_utmpx(&entryx, rutmpx);
198 if (pututxline(&entryx) == (struct utmpx *)NULL) {
226 load_utmpx_struct(struct utmpx *entryx, char *argv[])
233 (void) memset(entryx, 0, sizeof (struct utmpx));
249 (void) strncpy(entryx->ut_user, user, sizeof (entryx->ut_user));
250 (void) strncpy(entryx->ut_id, id, sizeof (entryx->ut_id));
251 (void) strncpy(entryx->ut_line, line, sizeof (entryx->ut_line));
254 entryx->ut_pid = temp;
257 entryx->ut_type = temp;
260 entryx->ut_exit.e_termination = temp;
263 entryx->ut_exit.e_exit = temp;
269 if (entryx->ut_type == USER_PROCESS)
270 setuserx(*entryx);
273 entryx->ut_tv.tv_sec = temp;
276 entryx->ut_tv.tv_usec = temp;
279 entryx->ut_session = temp;
282 cp = (unsigned char *)entryx->pad;
283 for (i = 0; i < temp && (i>>1) < sizeof (entryx->pad); i += 2)
287 entryx->ut_syslen = temp;
289 (void) strlcpy(entryx->ut_host, host, sizeof (entryx->ut_host));
308 check_utmpx(struct utmpx *entryx)
319 user = malloc(sizeof (entryx->ut_user) +1);
320 (void) strncpy(user, entryx->ut_user, sizeof (entryx->ut_user));
321 user[sizeof (entryx->ut_user)] = '\0';
325 (void) strlcat(strcpy(buf, "/dev/"), entryx->ut_line, sizeof (buf));
341 entryx->ut_user, uid, getuid());
345 } else if (entryx->ut_type != DEAD_PROCESS) {
346 dprintf("Bad user name: %s \n", entryx->ut_user);
353 if (!(entryx->ut_type == USER_PROCESS ||
354 entryx->ut_type == DEAD_PROCESS)) {
355 dprintf("Bad type type = %d\n", entryx->ut_type);
365 if (entryx->ut_type == USER_PROCESS && entryx->ut_pid != getppid()) {
366 dprintf("Bad pid = %d\n", entryx->ut_pid);
376 hostlen = strlen(entryx->ut_host) + 1;
377 if (entryx->ut_syslen != hostlen) {
379 entryx->ut_host, entryx->ut_syslen, hostlen);
380 entryx->ut_syslen = hostlen;
383 if (bad_hostname(entryx->ut_host, entryx->ut_syslen) == 1) {
384 dprintf("Bad hostname name = %s\n", entryx->ut_host);
387 check_id(entryx->ut_id, entryx->ut_line);