• Home
  • Raw
  • Download

Lines Matching refs:ut

188 void set_utmp_time(struct logininfo *li, struct utmp *ut);
189 void construct_utmp(struct logininfo *li, struct utmp *ut);
193 void set_utmpx_time(struct logininfo *li, struct utmpx *ut);
194 void construct_utmpx(struct logininfo *li, struct utmpx *ut);
632 set_utmp_time(struct logininfo *li, struct utmp *ut) in set_utmp_time() argument
635 ut->ut_tv.tv_sec = li->tv_sec; in set_utmp_time()
636 ut->ut_tv.tv_usec = li->tv_usec; in set_utmp_time()
638 ut->ut_time = li->tv_sec; in set_utmp_time()
644 struct utmp *ut) in construct_utmp() argument
650 memset(ut, '\0', sizeof(*ut)); in construct_utmp()
655 line_abbrevname(ut->ut_id, li->line, sizeof(ut->ut_id)); in construct_utmp()
662 ut->ut_type = USER_PROCESS; in construct_utmp()
664 cray_set_tmpdir(ut); in construct_utmp()
668 ut->ut_type = DEAD_PROCESS; in construct_utmp()
670 cray_retain_utmp(ut, li->pid); in construct_utmp()
675 set_utmp_time(li, ut); in construct_utmp()
677 line_stripname(ut->ut_line, li->line, sizeof(ut->ut_line)); in construct_utmp()
680 ut->ut_pid = li->pid; in construct_utmp()
693 strncpy(ut->ut_name, li->username, in construct_utmp()
694 MIN_SIZEOF(ut->ut_name, li->username)); in construct_utmp()
696 strncpy(ut->ut_host, li->hostname, in construct_utmp()
697 MIN_SIZEOF(ut->ut_host, li->hostname)); in construct_utmp()
702 ut->ut_addr = li->hostaddr.sa_in.sin_addr.s_addr; in construct_utmp()
708 memcpy(ut->ut_addr_v6, sa6->sin6_addr.s6_addr, 16); in construct_utmp()
710 ut->ut_addr_v6[0] = ut->ut_addr_v6[3]; in construct_utmp()
711 ut->ut_addr_v6[1] = 0; in construct_utmp()
712 ut->ut_addr_v6[2] = 0; in construct_utmp()
713 ut->ut_addr_v6[3] = 0; in construct_utmp()
823 utmp_write_library(struct logininfo *li, struct utmp *ut) in utmp_write_library() argument
826 pututline(ut); in utmp_write_library()
839 utmp_write_direct(struct logininfo *li, struct utmp *ut) in utmp_write_direct() argument
854 if (!strncmp(ty->ty_name, ut->ut_line, sizeof(ut->ut_line))) in utmp_write_direct()
890 (ut->ut_host[0] == '\0') && (old_ut.ut_host[0] != '\0') && in utmp_write_direct()
891 (strncmp(old_ut.ut_line, ut->ut_line, sizeof(ut->ut_line)) == 0) && in utmp_write_direct()
892 (strncmp(old_ut.ut_name, ut->ut_name, sizeof(ut->ut_name)) == 0)) in utmp_write_direct()
893 memcpy(ut->ut_host, old_ut.ut_host, sizeof(ut->ut_host)); in utmp_write_direct()
906 if (atomicio(vwrite, fd, ut, sizeof(*ut)) != sizeof(*ut)) { in utmp_write_direct()
924 struct utmp ut; in utmp_perform_login() local
926 construct_utmp(li, &ut); in utmp_perform_login()
928 if (!utmp_write_library(li, &ut)) { in utmp_perform_login()
933 if (!utmp_write_direct(li, &ut)) { in utmp_perform_login()
945 struct utmp ut; in utmp_perform_logout() local
947 construct_utmp(li, &ut); in utmp_perform_logout()
949 if (!utmp_write_library(li, &ut)) { in utmp_perform_logout()
954 if (!utmp_write_direct(li, &ut)) { in utmp_perform_logout()
1032 if (!utmpx_write_direct(li, &ut)) { in utmpx_perform_login()
1089 wtmp_write(struct logininfo *li, struct utmp *ut) in wtmp_write() argument
1100 if (atomicio(vwrite, fd, ut, sizeof(*ut)) != sizeof(*ut)) { in wtmp_write()
1113 struct utmp ut; in wtmp_perform_login() local
1115 construct_utmp(li, &ut); in wtmp_perform_login()
1116 return (wtmp_write(li, &ut)); in wtmp_perform_login()
1123 struct utmp ut; in wtmp_perform_logout() local
1125 construct_utmp(li, &ut); in wtmp_perform_logout()
1126 return (wtmp_write(li, &ut)); in wtmp_perform_logout()
1164 wtmp_islogin(struct logininfo *li, struct utmp *ut) in wtmp_islogin() argument
1166 if (strncmp(li->username, ut->ut_name, in wtmp_islogin()
1167 MIN_SIZEOF(li->username, ut->ut_name)) == 0) { in wtmp_islogin()
1169 if (ut->ut_type & USER_PROCESS) in wtmp_islogin()
1182 struct utmp ut; in wtmp_get_entry() local
1208 if (atomicio(read, fd, &ut, sizeof(ut)) != sizeof(ut)) { in wtmp_get_entry()
1214 if (wtmp_islogin(li, &ut) ) { in wtmp_get_entry()
1221 li->tv_sec = ut.ut_time; in wtmp_get_entry()
1224 li->tv_sec = ut.ut_tv.tv_sec; in wtmp_get_entry()
1227 line_fullname(li->line, ut.ut_line, in wtmp_get_entry()
1228 MIN_SIZEOF(li->line, ut.ut_line)); in wtmp_get_entry()
1230 strlcpy(li->hostname, ut.ut_host, in wtmp_get_entry()
1231 MIN_SIZEOF(li->hostname, ut.ut_host)); in wtmp_get_entry()
1416 struct utmp *ut; in syslogin_perform_login() local
1418 ut = xmalloc(sizeof(*ut)); in syslogin_perform_login()
1419 construct_utmp(li, ut); in syslogin_perform_login()
1420 login(ut); in syslogin_perform_login()
1421 free(ut); in syslogin_perform_login()
1662 struct utmp ut; in record_failed_login() local
1688 memset(&ut, 0, sizeof(ut)); in record_failed_login()
1690 strncpy(ut.ut_user, username, sizeof(ut.ut_user)); in record_failed_login()
1691 strlcpy(ut.ut_line, "ssh:notty", sizeof(ut.ut_line)); in record_failed_login()
1694 ut.ut_time = t; /* ut_time is not always a time_t */ in record_failed_login()
1695 ut.ut_type = LOGIN_PROCESS; in record_failed_login()
1696 ut.ut_pid = getpid(); in record_failed_login()
1699 strncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); in record_failed_login()
1707 memcpy(&ut.ut_addr, &(a4->sin_addr), in record_failed_login()
1708 MIN_SIZEOF(ut.ut_addr, a4->sin_addr)); in record_failed_login()
1713 memcpy(&ut.ut_addr_v6, &(a6->sin6_addr), in record_failed_login()
1714 MIN_SIZEOF(ut.ut_addr_v6, a6->sin6_addr)); in record_failed_login()
1719 if (atomicio(vwrite, fd, &ut, sizeof(ut)) != sizeof(ut)) in record_failed_login()