search for: ut_name

Displaying 20 results from an estimated 48 matches for "ut_name".

Did you mean: uc_name
2000 Jul 02
0
patch for NetBSD utmp (ut_name instead of ut_host)
...1.1p2 on netbsd, and some other platforms I suppose. itojun -------------- next part -------------- $NetBSD: patch-aa,v 1.8 2000/07/02 22:07:56 itojun Exp $ --- configure.in.orig Sat Jul 1 15:52:55 2000 +++ configure.in Mon Jul 3 06:49:00 2000 @@ -647,2 +647,6 @@ +OSSH_CHECK_HEADER_FOR_FIELD(ut_name, utmp.h, HAVE_NAME_IN_UTMP) +OSSH_CHECK_HEADER_FOR_FIELD(ut_name, utmpx.h, HAVE_NAME_IN_UTMPX) +OSSH_CHECK_HEADER_FOR_FIELD(ut_user, utmp.h, HAVE_USER_IN_UTMP) +OSSH_CHECK_HEADER_FOR_FIELD(ut_user, utmpx.h, HAVE_USER_IN_UTMPX) OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP) -------...
2009 Dec 25
2
[openssh-portable] utmpx and ut_name
...andardisation. I noticed POSIX says the following [1]: | The <utmpx.h> header shall define the utmpx structure that shall | include at least the following members: | | char ut_user[] User login name. | ... Now ut_user deviates a bit from <utmp.h>, where this field is normally called ut_name. I've noticed most (all?) implementations just #define ut_name to ut_user to keep things happy, but I'd rather not put this obfuscation in any new implementation. I've noticed OpenSSH also uses ut_name, even when using utmpx. I've come up with the following patch: %%% --- loginrec...
2005 Mar 30
1
utmp update for bsd systems
...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, -(off_t)sizeof(st...
2005 Apr 14
1
utmp update for bsd systems (try 2)
...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, -(off_t)sizeof(st...
2001 Nov 20
0
PATCH: Fixing last/utmpx for Solaris
...ssh-3.0.1p1 that corrects the problem with last reporting on Solaris that I sent to the list a week or so ago against 3.0p1. There was no conversation about this aside from Rip Loomis' comment about including it to support BSM auditing - does this present a problem for other OSes to include the ut_name field in the utmpx entry? Should this patch be changed 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...
2000 Jul 04
0
AW: FreeBSD 3.5-STABLE
...Tue Jul 4 10:30:18 2000 +++ loginrec.c Tue Jul 4 10:31:18 2000 @@ -616,7 +616,7 @@ */ /* Use strncpy because we don't necessarily want null termination */ - strncpy(ut->ut_user, li->username, MIN_SIZEOF(ut->ut_user, li->username)); + strncpy(ut->ut_name, li->username, MIN_SIZEOF(ut->ut_name, li->username)); # ifdef HAVE_HOST_IN_UTMP strncpy(ut->ut_host, li->hostname, MIN_SIZEOF(ut->ut_host, li->hostname)); # endif @@ -1006,8 +1006,8 @@ static int wtmp_islogin(struct logininfo *li, struct utmp *ut) { - if (st...
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
2002 Jan 29
0
[Bug 84] New: last command provides incorrect information on Solaris 8
...icate 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 @@ */ /* strncpy(): Don't necessarily want null termination */ - strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx...
2001 Nov 15
1
Patch for "last" providing incorrect information on Solaris 8
...ation -------------- 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 necessarily want null termination */ - strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx->ut_name, li->username)); # i...
2001 Jan 29
1
Solaris wtmpx patch
...sh-2.3.0p1/loginrec.c --- openssh-2.3.0p1.orig/loginrec.c Sat Sep 30 03:34:44 2000 +++ openssh-2.3.0p1/loginrec.c Tue Jan 23 18:24:25 2001 @@ -674,6 +674,9 @@ set_utmpx_time(li, utx); utx->ut_pid = li->pid; + /* strncpy(): Don't necessarily want null termination */ + strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx->ut_name, li->username)); + if (li->type == LTYPE_LOGOUT) return; @@ -682,8 +685,6 @@ * for logouts. */ - /* strncpy(): Don't necessarily want null termination */ - strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx->ut_name, li...
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
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
2000 Jan 27
1
Long awaited round 1 of NeXT patches.
...#ifndef HAVE_NEXT/#endif to get it to compile. Daimen, feel free to let me know what you applied and what your rejecting and why.. so I can work on cleaning things up. Andre, Only thing of note you may want to look into is NeXT does not use "ut_user" in it's lastlog. It uses "ut_name" and it does not have a "ut_type" (It's part of the above patch in the login.c part). BTW, this patch is against 1.2.2 (since it was released before I was able to relase my patch. =) Known issues with my port (and my internal tree): 1) lack of utmp entries. I think I know...
2000 Sep 12
0
OpenSSH 2.2.0p1 port to QNX 4
...44)) >= 0) { (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); + #ifdef HAVE_HOST_IN_UTMP /* * Prevent luser from zero'ing out ut_host. * If the new ut_line is empty but the old one is not *************** *** 761,766 **** --- 766,772 ---- (strncmp(old_ut.ut_name, ut->ut_name, sizeof(ut->ut_name)) == 0)) { (void)memcpy(ut->ut_host, old_ut.ut_host, sizeof(ut->ut_host)); } + #endif /* HAVE_HOST_IN_UTMP */ (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); if (atomicio(write, fd, ut, sizeof(*ut)) != sizeof(*ut))...
1999 Nov 19
0
[patch2, 1.2pre13] solaris 7 patch for bsd-login.c
...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); (void)write(fd, utp, sizeof(struct utmp)); (void)close(fd)...
2006 Jan 03
2
How to see loging of the user
Hi, i just want to know if it's possible (i guess it is) to see in a log file the logging (date and hour) of a user. I looked in /var/log/smbd.log, nmbd.log, machine.log but there is no record when the user pat (for example) loged in the network. Does someone knows ? Thanks.
1999 Dec 27
1
More patches to fix NetBSD compiling
...n.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_TYPE_IN_UTMP */ #if defined(HAVE_HOST_IN_UTMP) strncpy(u.ut_host, host, sizeof(u.ut_host)); #endif
2001 Jun 29
1
wtmpx problem on Solaris 8 sparcv9 (64bit) environment
...ndif + } @@ -1207,7 +1258,11 @@ /* Return true if this wtmpx entry indicates a login */ static int +#ifdef __sparcv9 +wtmpx_islogin(struct logininfo *li, struct futmpx *utx) +#else wtmpx_islogin(struct logininfo *li, struct utmpx *utx) +#endif { if ( strncmp(li->username, utx->ut_name, MIN_SIZEOF(li->username, utx->ut_name)) == 0 ) { @@ -1226,7 +1281,11 @@ wtmpx_get_entry(struct logininfo *li) { struct stat st; +#ifdef __sparcv9 + struct futmpx utx; +#else struct utmpx utx; +#endif int fd, found=0; /* Clear the time...