/freebsd/lib/libulog/ |
H A D | ulog_login.c | 48 memset(utx, 0, sizeof *utx); in ulog_fill() 52 strlcpy(utx->ut_line, line, sizeof utx->ut_line); in ulog_fill() 56 SHA1_Update(&c, utx->ut_line, sizeof utx->ut_line); in ulog_fill() 59 memcpy(utx->ut_id, id, MIN(sizeof utx->ut_id, sizeof id)); in ulog_fill() 65 struct utmpx utx; in ulog_login() local 67 ulog_fill(&utx, line); in ulog_login() 69 strlcpy(utx.ut_user, user, sizeof utx.ut_user); in ulog_login() 71 strlcpy(utx.ut_host, host, sizeof utx.ut_host); in ulog_login() 72 pututxline(&utx); in ulog_login() 78 struct utmpx utx; in ulog_logout() local [all …]
|
/freebsd/crypto/heimdal/appl/ftp/ftpd/ |
H A D | logwtmp.c | 118 struct utmpx utx; in ftpd_logwtmp_wtmp() local 144 strncpy(utx.ut_line, line, sizeof(utx.ut_line)); in ftpd_logwtmp_wtmp() 145 strncpy(utx.ut_user, name, sizeof(utx.ut_user)); in ftpd_logwtmp_wtmp() 146 strncpy(utx.ut_host, host, sizeof(utx.ut_host)); in ftpd_logwtmp_wtmp() 149 if (utx.ut_syslen > sizeof(utx.ut_host)) in ftpd_logwtmp_wtmp() 150 utx.ut_syslen = sizeof(utx.ut_host); in ftpd_logwtmp_wtmp() 156 utx.ut_tv.tv_sec = tv.tv_sec; in ftpd_logwtmp_wtmp() 157 utx.ut_tv.tv_usec = tv.tv_usec; in ftpd_logwtmp_wtmp() 161 utx.ut_type = USER_PROCESS; in ftpd_logwtmp_wtmp() 163 utx.ut_type = DEAD_PROCESS; in ftpd_logwtmp_wtmp() [all …]
|
/freebsd/crypto/openssh/ |
H A D | loginrec.c | 747 memset(utx, '\0', sizeof(*utx)); in construct_utmpx() 750 line_abbrevname(utx->ut_id, li->line, sizeof(utx->ut_id)); in construct_utmpx() 762 line_stripname(utx->ut_line, li->line, sizeof(utx->ut_line)); in construct_utmpx() 796 utx->ut_addr_v6[0] = utx->ut_addr_v6[3]; in construct_utmpx() 1005 pututxline(utx); in utmpx_write_library() 1027 struct utmpx utx; in utmpx_perform_login() local 1048 struct utmpx utx; in utmpx_perform_logout() local 1052 line_abbrevname(utx.ut_id, li->line, sizeof(utx.ut_id)); in utmpx_perform_logout() 1277 if (atomicio(vwrite, fd, utx, sizeof(*utx)) != sizeof(*utx)) { in wtmpx_write() 1296 struct utmpx utx; in wtmpx_perform_login() local [all …]
|
/freebsd/usr.sbin/utx/ |
H A D | utx.c | 54 struct utmpx utx = { .ut_type = DEAD_PROCESS }; in rm() local 58 (void)gettimeofday(&utx.ut_tv, NULL); in rm() 61 if (len <= sizeof(utx.ut_id)) { in rm() 63 strncpy(utx.ut_id, *id, sizeof(utx.ut_id)); in rm() 64 } else if (len != sizeof(utx.ut_id) * 2 || in rm() 65 b16_pton(*id, utx.ut_id, sizeof(utx.ut_id)) != 0) { in rm() 73 if (pututxline(&utx) == NULL) { in rm() 84 struct utmpx utx = { .ut_type = type }; in boot() local 86 (void)gettimeofday(&utx.ut_tv, NULL); in boot() 87 if (pututxline(&utx) == NULL) { in boot()
|
H A D | Makefile | 4 PROG= utx 5 MAN= utx.8
|
/freebsd/usr.bin/who/ |
H A D | who.c | 228 struct utmpx *utx; in process_utmp() local 230 while ((utx = getutxent()) != NULL) { in process_utmp() 232 if (ttystat(utx->ut_line) == 0) in process_utmp() 233 row(utx); in process_utmp() 235 row(utx); in process_utmp() 242 struct utmpx *utx; in quick() local 248 if (utx->ut_type != USER_PROCESS) in quick() 250 printf("%-16s", utx->ut_user); in quick() 268 struct utmpx ut, *utx; in whoami() local 279 if ((utx = getutxline(&ut)) != NULL && utx->ut_type == USER_PROCESS) { in whoami() [all …]
|
/freebsd/contrib/ntp/libntp/ |
H A D | systime.c | 409 struct utmpx utx; in update_uwtmp() local 416 ZERO(utx); in update_uwtmp() 447 strlcpy(utx.ut_line, OTIME_MSG, sizeof(utx.ut_line)); in update_uwtmp() 448 utx.ut_tv = tvlast; in update_uwtmp() 450 pututxline(&utx); in update_uwtmp() 452 strlcpy(utx.ut_line, NTIME_MSG, sizeof(utx.ut_line)); in update_uwtmp() 453 utx.ut_tv = timetv; in update_uwtmp() 455 pututxline(&utx); in update_uwtmp() 489 utx.ut_tv = tvlast; in update_uwtmp() 490 strlcpy(utx.ut_line, OTIME_MSG, sizeof(utx.ut_line)); in update_uwtmp() [all …]
|
/freebsd/lib/libpam/modules/pam_lastlog/ |
H A D | pam_lastlog.c | 70 struct utmpx *utx, utl; in pam_sm_open_session() local 107 utx = getutxuser(user); in pam_sm_open_session() 108 if (utx != NULL && utx->ut_type == USER_PROCESS) { in pam_sm_open_session() 109 t = utx->ut_tv.tv_sec; in pam_sm_open_session() 110 if (*utx->ut_host != '\0') in pam_sm_open_session() 112 24 - 5, ctime(&t), utx->ut_host); in pam_sm_open_session() 115 24 - 5, ctime(&t), utx->ut_line); in pam_sm_open_session()
|
/freebsd/libexec/rc/rc.d/ |
H A D | var | 104 if [ ! -f /var/log/utx.lastlogin ]; then 105 cp /dev/null /var/log/utx.lastlogin 106 chmod 644 /var/log/utx.lastlogin 108 if [ ! -f /var/log/utx.log ]; then 109 cp /dev/null /var/log/utx.log 110 chmod 644 /var/log/utx.log
|
H A D | Makefile | 335 _utx= utx
|
/freebsd/bin/date/ |
H A D | date.c | 251 struct utmpx utx; in setthetime() local 344 utx.ut_type = OLD_TIME; in setthetime() 345 memset(utx.ut_id, 0, sizeof(utx.ut_id)); in setthetime() 346 (void)gettimeofday(&utx.ut_tv, NULL); in setthetime() 347 pututxline(&utx); in setthetime() 350 utx.ut_type = NEW_TIME; in setthetime() 351 (void)gettimeofday(&utx.ut_tv, NULL); in setthetime() 352 pututxline(&utx); in setthetime()
|
/freebsd/share/security/ |
H A D | lomac-policy.contexts | 27 /var/run/utx.active lomac/equal 28 /var/log/utx.(lastlogin|log) lomac/equal
|
/freebsd/sbin/reboot/ |
H A D | reboot.c | 223 struct utmpx utx; in main() local 370 utx.ut_type = SHUTDOWN_TIME; in main() 371 gettimeofday(&utx.ut_tv, NULL); in main() 372 pututxline(&utx); in main()
|
/freebsd/tools/build/options/ |
H A D | WITHOUT_UTMPX | 8 .Xr utx 8 .
|
/freebsd/usr.sbin/periodic/etc/monthly/ |
H A D | 200.accounting | 17 W=/var/log/utx.log
|
/freebsd/usr.sbin/newsyslog/ |
H A D | newsyslog.conf | 31 /var/log/utx.log 644 3 * @01T05 B
|
/freebsd/usr.sbin/ |
H A D | Makefile | 211 SUBDIR.${MK_UTMPX}+= utx
|
/freebsd/targets/pseudo/userland/ |
H A D | Makefile.depend | 710 usr.sbin/utx \
|
/freebsd/tools/build/mk/ |
H A D | OptionalObsoleteFiles.inc | 9086 OLD_FILES+=etc/rc.d/utx 9092 OLD_FILES+=usr/sbin/utx 9098 OLD_FILES+=usr/share/man/man8/utx.8.gz
|
/freebsd/ |
H A D | ObsoleteFiles.inc | 14712 # 20131103: removal of utxrm(8), use 'utx rm' instead
|