search for: ut_line

Displaying 20 results from an estimated 31 matches for "ut_line".

2005 Mar 30
1
utmp update for bsd systems
...+ return; + + if (!setttyent()) + return; + + for (topslot = 0; getttyent() != (struct ttyent *)NULL; ) + topslot++; + + if (!endttyent()) + return; + + (void) lseek(fd, (off_t)(topslot * sizeof(struct utmp)), SEEK_SET); + + DEBUG(1,("pututline(%s, %s, %d); topslot=%d\n", + u->ut_line, u->ut_name, claim, topslot)); + + while (1) { + if (read(fd, &ubuf, sizeof(ubuf)) == sizeof(ubuf)) { + if ((claim && !ubuf.ut_name[0]) || + (!claim && ubuf.ut_name[0] && + !strncmp(ubuf.ut_line, u->ut_line, UT_LINESIZE))) { + (void) lseek(fd, -(...
2005 Apr 14
1
utmp update for bsd systems (try 2)
...+ return; + + if (!setttyent()) + return; + + for (topslot = 0; getttyent() != (struct ttyent *)NULL; ) + topslot++; + + if (!endttyent()) + return; + + (void) lseek(fd, (off_t)(topslot * sizeof(struct utmp)), SEEK_SET); + + DEBUG(1,("pututline(%s, %s, %d); topslot=%d\n", + u->ut_line, u->ut_name, claim, topslot)); + + while (1) { + if (read(fd, &ubuf, sizeof(ubuf)) == sizeof(ubuf)) { + if ((claim && !ubuf.ut_name[0]) || + (!claim && ubuf.ut_name[0] && + !strncmp(ubuf.ut_line, u->ut_line, UT_LINESIZE))) { + (void) lseek(fd, -(...
2001 Nov 30
1
Problems with utmp
Hi there, I'm using samba-2.2.2 under Solaris 8 and I've got the following problem! I have configured samba with "--with-utmp" and with "--with-quota" and everything works fine. But when look for the last users logged in, in the utmp-database there are only the first seven letters of the username, not eight that we use for usernames. Can you help me with this problem
2001 Nov 20
0
PATCH: Fixing last/utmpx for Solaris
...anged to only apply to Solaris hosts? Thoughts? Bill Knox Senior Operating Systems Programmer/Analyst The MITRE Corporation -------------- next part -------------- --- loginrec.c~ Mon Oct 29 21:50:40 2001 +++ loginrec.c Mon Nov 19 12:08:34 2001 @@ -701,6 +701,7 @@ line_stripname(utx->ut_line, li->line, sizeof(utx->ut_line)); set_utmpx_time(li, utx); utx->ut_pid = li->pid; + strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx->ut_name, li->username)); if (li->type == LTYPE_LOGOUT) return; @@ -711,7 +712,6 @@ */ /* strncpy(): Don't necessar...
2002 Jan 29
0
[Bug 84] New: last command provides incorrect information on Solaris 8
...tmpx entry for both a login and a logout. This bugzilla entry duplicates an e-mail I sent in in late November, in case this comes up as a duplicate of a known issue. --- loginrec.c~ Mon Oct 29 21:50:40 2001 +++ loginrec.c Tue Jan 29 10:56:59 2002 @@ -701,6 +701,7 @@ line_stripname(utx->ut_line, li->line, sizeof(utx->ut_line)); set_utmpx_time(li, utx); utx->ut_pid = li->pid; + strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx->ut_name, li->username)); if (li->type == LTYPE_LOGOUT) return; @@ -711,7 +712,6 @@...
2001 Nov 15
1
Patch for "last" providing incorrect information on Solaris 8
...s? The diffs are against 3.0p1, by the way. Bill Knox Senior Operating Systems Programmer/Analyst The MITRE Corporation -------------- next part -------------- --- loginrec.c.orig Thu Nov 15 09:35:02 2001 +++ loginrec.c Thu Nov 15 09:38:01 2001 @@ -701,6 +701,7 @@ line_stripname(utx->ut_line, li->line, sizeof(utx->ut_line)); set_utmpx_time(li, utx); utx->ut_pid = li->pid; + strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx->ut_name, li->username)); if (li->type == LTYPE_LOGOUT) return; @@ -711,7 +712,6 @@ */ /* strncpy(): Don't necessar...
2000 Jun 13
2
Openssh-2.1.1p1 and solaris 7/8
Hello, I just installed the above openssh onto a Sun Solaris 7 and Solaris 8 system. No problem with that. However, I now seem to get some rubbish processed when I login with slogin. An example: Last login: Tue Jun 13 12:31:27 2000 from jhorne.csd.plymo:tJ` ^[[?1;2c Telnet logs in okay, but just shows 'Last login...jhorne.csd.plymo'. This seems to get passed to the shell, which it of
1999 Dec 28
1
ANNOUNCE: openssh-1.2.1pre22
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have just uploaded 1.2.1pre22 to: http://violet.ibs.com.au/openssh/files/ This release consists of portability fixes and cleanups. It also resolves two issues which may have caused security problems - If you OS header files did not define PATH_STDPATH, then an unsafe path was used by default (it contained an implicit '.'). Thanks
1999 Dec 28
1
ANNOUNCE: openssh-1.2.1pre22
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have just uploaded 1.2.1pre22 to: http://violet.ibs.com.au/openssh/files/ This release consists of portability fixes and cleanups. It also resolves two issues which may have caused security problems - If you OS header files did not define PATH_STDPATH, then an unsafe path was used by default (it contained an implicit '.'). Thanks
2023 Apr 03
2
sftp and utmp
...ve a TTY/PTY assigned. There is AFAIK no real standard for recording "service logins" (e.g. sftp or SSH command execution w/o TTY) in utmp and many OS utmp implementation lack fields by which this could be communicated. IIRC we toyed with recording something fake like "sftp" in ut_line but that caused problems as none of the other tools were set up to accept it. -d
2001 Jun 29
1
wtmpx problem on Solaris 8 sparcv9 (64bit) environment
...67,6 +1183,24 @@ return ret; } +#ifdef __sparcv9 +void +utmpx_to_futmpx(struct utmpx *utx, struct futmpx *futx) +{ + strncpy(futx->ut_user, utx->ut_user, sizeof(futx->ut_user)); + strncpy(futx->ut_id, utx->ut_id, sizeof(futx->ut_id)); + strncpy(futx->ut_line, utx->ut_line, sizeof(futx->ut_line)); + futx->ut_pid = (pid32_t)utx->ut_pid; + futx->ut_type = (int16_t)utx->ut_type; + futx->ut_exit.e_termination = (int16_t)utx->ut_exit.e_termination; + futx->ut_exit.e_exit =...
2023 Apr 04
1
sftp and utmp
...ndard for recording > > "service logins" (e.g. sftp or SSH command execution w/o TTY) in utmp > > and many OS utmp implementation lack fields by which this could be > > communicated. > > > > IIRC we toyed with recording something fake like "sftp" in ut_line > > but that caused problems as none of the other tools were set up to > > accept it. > > sftp has some awkward limitations, as does scp. It's why I prefer were > possible to use rsync-over-SSH, and we can restrict the rsync options > quite heavily. It's even possib...
1999 Nov 19
0
[patch2, 1.2pre13] solaris 7 patch for bsd-login.c
...WR|O_CREAT, 0644)) >= 0) { + #ifdef HAVE_HOST_IN_UTMP (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); /* * Prevent luser from zero'ing out ut_host. *************** *** 70,75 **** --- 74,80 ---- strncmp(old_ut.ut_line, utp->ut_line, UT_LINESIZE) == 0 && strncmp(old_ut.ut_name, utp->ut_name, UT_NAMESIZE) == 0) (void)memcpy(utp->ut_host, old_ut.ut_host, UT_HOSTSIZE); + #endif (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);...
2023 Apr 04
1
sftp and utmp
...here is AFAIK no real standard for recording > "service logins" (e.g. sftp or SSH command execution w/o TTY) in utmp > and many OS utmp implementation lack fields by which this could be > communicated. > > IIRC we toyed with recording something fake like "sftp" in ut_line > but that caused problems as none of the other tools were set up to > accept it. sftp has some awkward limitations, as does scp. It's why I prefer were possible to use rsync-over-SSH, and we can restrict the rsync options quite heavily. It's even possible to chroot wrap, though that...
2023 Apr 03
1
sftp and utmp
...ere is AFAIK no real standard for recording > "service logins" (e.g. sftp or SSH command execution w/o TTY) in utmp > and many OS utmp implementation lack fields by which this could be > communicated. > > IIRC we toyed with recording something fake like "sftp" in ut_line > but that caused problems as none of the other tools were set up to > accept it. Is there an archive of the discussion of the problems it brings to the other tools? I'd like to understand the issues. What other tools are impacted? If I don't need them, would it be possible to th...
1999 Dec 24
5
ANNOUNCE: openssh-1.2.1pre20
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 openssh-1.2.1pre20 has been released at: http://violet.ibs.com.au/openssh/files/ This release integrates more of Andre Lucas' portability patch, Ben Taylor's utmpx patch and some cleanups and bugfixes of my own. The auth-passwd failures should be fixed, as should lastlog support on NetBSD. Since Andre Lucas' patch included platform
1999 Dec 24
5
ANNOUNCE: openssh-1.2.1pre20
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 openssh-1.2.1pre20 has been released at: http://violet.ibs.com.au/openssh/files/ This release integrates more of Andre Lucas' portability patch, Ben Taylor's utmpx patch and some cleanups and bugfixes of my own. The auth-passwd failures should be fixed, as should lastlog support on NetBSD. Since Andre Lucas' patch included platform
1999 Dec 27
1
More patches to fix NetBSD compiling
...utmp.h has a ut_type field */ +#undef HAVE_TYPE_IN_UTMP + /* Define if you want to use utmpx */ #undef USE_UTMPX --- login.c.orig Mon Dec 27 09:22:55 1999 +++ login.c Mon Dec 27 09:23:00 1999 @@ -141,10 +141,14 @@ /* Construct an utmp/wtmp entry. */ memset(&u, 0, sizeof(u)); strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line)); +#if defined(HAVE_PID_IN_UTMP) u.ut_pid = (pid_t)pid; +#endif /* HAVE_PID_IN_UTMP */ u.ut_time = time(NULL); strncpy(u.ut_name, user, sizeof(u.ut_name)); +#if defined(HAVE_TYPE_IN_UTMP) u.ut_type = (uid == -1)?DEAD_PROCESS:USER_PROCESS; +#endif /* HAVE_TYP...
2000 Aug 01
2
[2.1.1p4] utmp patch for SunOS 4.1.x
...ds local implementation */ + + #if defined(SUNOS4) && defined(HAVE_GETTTYENT) + + register struct ttyent *ty; + tty=0; + setttyent(); + while ((struct ttyent *)0 != (ty = getttyent())) { + tty++; + if(0 == strncmp(ty->ty_name,ut->ut_line,sizeof(ut->ut_line))) + break; + } + endttyent(); + if((struct ttyent *)0 == ty) { + log("utmp_write_entry: tty not found"); + return(1); + } + + #else /* FIXME */ + tty = ttyslot(); /* seems only to work for /dev...
2004 Apr 08
3
patch for "gone - no logout" output from last(1)
...ne of my systems to the linux 2.6.4 kernel, it started having problems recording the logout entries in the wtmp file. I traced this to a bug in loginrec.c, where a variable (line) is declared as an array of 8 characters. This length is substantially shorter than the 16 character array size of ut_line, so openssh effectively truncates the pseudo-tty name when the pseudo-tty number exceeds 999. With the new linux kernels, the pseudo-ttys are not reused as in the past, so a busy system can reach the magic number of 1000 pretty quickly... Here's an example of what I see on my system via th...