Lines Matching defs:utx
76 struct utmpx *utx;
101 if (len > sizeof(*utx) * 4 + 1 || len < sizeof(*utx))
104 if ((utx = malloc(len+1)) == NULL)
107 res = strunvis((char *)utx, argv[1]);
108 if (res != (int)sizeof(*utx))
110 sizeof(*utx));
112 switch (utx->ut_type) {
117 logerr(0, "Invalid utmpx type %d", (int)utx->ut_type);
120 p = utx->ut_host;
121 ep = p + sizeof(utx->ut_host);
131 if (strcmp(pwd->pw_name, utx->ut_name) != 0)
133 "`%s' in utmpx entry", pwd->pw_name, utx->ut_name);
136 (void)snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, utx->ut_line);
156 if (utx->ut_type != DEAD_PROCESS)
159 (void)memcpy(utold.ut_line, utx->ut_line, sizeof(utx->ut_line));
162 utx->ut_line);
171 if (pututxline(utx) == NULL)