The NetBSD Project

CVS log for src/lib/libc/gen/utmpx.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libc / gen

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.32 / (download) - annotate - [select for diffs], Thu Sep 18 13:58:20 2014 UTC (6 weeks, 1 day ago) by christos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.31: +8 -8 lines
Diff to previous 1.31 (colored)

make more descriptors that we open as close-on-exec

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:14 2014 UTC (2 months, 1 week ago) by tls
Branch: tls-maxphys
Changes since 1.30: +8 -7 lines
Diff to previous 1.30 (colored) next main 1.31 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.28.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:36:52 2014 UTC (5 months, 1 week ago) by yamt
Branch: yamt-pagecache
Changes since 1.28.2.2: +8 -7 lines
Diff to previous 1.28.2.2 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.31 / (download) - annotate - [select for diffs], Thu Sep 5 17:35:11 2013 UTC (13 months, 3 weeks ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-base, netbsd-7
Changes since 1.30: +8 -7 lines
Diff to previous 1.30 (colored)

Avoid strict-alias problem flagged by certain compilers (e.g. Centos one):
libc/gen/utmpx.c:89: error: dereferencing pointer 'otv' does break strict-aliasing rules

reviewed by Christos (thanks!)

Revision 1.28.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 18:58:49 2012 UTC (2 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.28.2.1: +5 -5 lines
Diff to previous 1.28.2.1 (colored) to branchpoint 1.28 (colored)

sync with head

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jun 24 15:26:03 2012 UTC (2 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.29: +5 -5 lines
Diff to previous 1.29 (colored)

fix old style definitions; XXX: gcc should have picked them up but it did not.

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:19 2012 UTC (2 years, 6 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

sync with head

Revision 1.29 / (download) - annotate - [select for diffs], Tue Mar 13 21:13:37 2012 UTC (2 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
  would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
  builds)

approved by core@

Revision 1.28 / (download) - annotate - [select for diffs], Sat Oct 15 23:00:02 2011 UTC (3 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
  fopen(db, "re")

Revision 1.27 / (download) - annotate - [select for diffs], Sat Sep 17 01:52:29 2011 UTC (3 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.26: +11 -5 lines
Diff to previous 1.26 (colored)

Never invoke utmp_update() recursively if we are root. Instead close the
read-only file so it can be opened later. It can happen when a setuid
program utmp_update, seteuid(ruid) -> getutxent() -> seteuid(0) -> pututxent()

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jan 11 02:46:27 2009 UTC (5 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: matt-premerge-20091211, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.25: +35 -4 lines
Diff to previous 1.25 (colored)

merge christos-time_t

Revision 1.25.8.4 / (download) - annotate - [select for diffs], Sun Nov 23 22:54:47 2008 UTC (5 years, 11 months ago) by christos
Branch: christos-time_t
Changes since 1.25.8.3: +2 -3 lines
Diff to previous 1.25.8.3 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

remove debugging printf.

Revision 1.25.8.3 / (download) - annotate - [select for diffs], Sun Nov 23 21:46:05 2008 UTC (5 years, 11 months ago) by christos
Branch: christos-time_t
Changes since 1.25.8.2: +35 -3 lines
Diff to previous 1.25.8.2 (colored) to branchpoint 1.25 (colored)

fix utmp{,x} issues:
- add old utmp format support. Ugly and difficult to get right. For now
  try to deal by detecting the size of the file and seeing if it is a
  multiple of sizeof(struct utmp50).
- fix NULL pointer in cvt.
- version the UTMPX database, and detect if we have an old or new one
  and act accordingly.

Revision 1.25.8.2 / (download) - annotate - [select for diffs], Sat Nov 8 21:45:38 2008 UTC (5 years, 11 months ago) by christos
Branch: christos-time_t
Changes since 1.25.8.1: +450 -0 lines
Diff to previous 1.25.8.1 (colored) to branchpoint 1.25 (colored)

time_t changes

Revision 1.24.16.1 / (download) - annotate - [select for diffs], Sun May 18 12:30:16 2008 UTC (6 years, 5 months ago) by yamt
Branch: yamt-pf42
Changes since 1.24: +2 -9 lines
Diff to previous 1.24 (colored) next main 1.25 (colored)

sync with head.

Revision 1.25.8.1, Mon Apr 28 20:22:59 2008 UTC (6 years, 6 months ago) by christos
Branch: christos-time_t
Changes since 1.25: +0 -450 lines
FILE REMOVED

file utmpx.c was added on branch christos-time_t on 2008-11-08 21:45:38 +0000

Revision 1.25 / (download) - annotate - [select for diffs], Mon Apr 28 20:22:59 2008 UTC (6 years, 6 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase, christos-time_t-nbase, christos-time_t-base
Branch point for: christos-time_t
Changes since 1.24: +2 -9 lines
Diff to previous 1.24 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.24 / (download) - annotate - [select for diffs], Sun Nov 26 17:33:23 2006 UTC (7 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: yamt-pf42
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

PR/35129: David A. Holland: exit in utmpx code should be _exit

Revision 1.23 / (download) - annotate - [select for diffs], Tue Sep 13 01:44:09 2005 UTC (9 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.22: +3 -38 lines
Diff to previous 1.22 (colored)

compat core reorg.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Nov 11 22:14:20 2004 UTC (9 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

Don't create the lastlogx file with 0 mode.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Sep 6 16:42:10 2003 UTC (11 years, 1 month ago) by wiz
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.20: +4 -2 lines
Diff to previous 1.20 (colored)

Add __warn_references for deprecated lastlogxname. Okayed by christos.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Aug 26 16:48:33 2003 UTC (11 years, 2 months ago) by wiz
Branch: MAIN
Changes since 1.19: +23 -10 lines
Diff to previous 1.19 (colored)

Make getlastlogx have the pathname to the lastlogx database as first
argument, to be consistent with updlastlogx.

Approved by christos, reviewed by kleink.

[The lastlogxname function should not be used any longer.]

Revision 1.19 / (download) - annotate - [select for diffs], Mon Aug 25 23:09:37 2003 UTC (11 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.18: +12 -5 lines
Diff to previous 1.18 (colored)

When updating wtmpx, if the write fails make sure to close the file (to
release the lock held on it).  Use O_SHLOCK when adding just one record
since O_APPEND will enforce the atomicity that is required.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Aug 24 15:14:18 2003 UTC (11 years, 2 months ago) by kleink
Branch: MAIN
Changes since 1.17: +3 -2 lines
Diff to previous 1.17 (colored)

Need namespace.h to generate references to internal names.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 26 19:23:25 2003 UTC (11 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.16: +15 -7 lines
Diff to previous 1.16 (colored)

keep track if we have the file opened as readonly or readwrite, so that
we don't need to call update_utmp, if our euid has changed, but we still
have a write reference to the file. Solves problem with chrooting processes.

Revision 1.3.2.8 / (download) - annotate - [select for diffs], Tue Dec 10 06:25:49 2002 UTC (11 years, 10 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.3.2.7: +5 -5 lines
Diff to previous 1.3.2.7 (colored) next main 1.4 (colored)

Sync with HEAD.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Nov 26 16:52:07 2002 UTC (11 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

lib/19176: Onno van der Linden: execl is called with too few arguments.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Nov 17 20:49:33 2002 UTC (11 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)

make sure to bound string operation by strlcpy
(there are bunch of "strcpy is safe" comments, i think we should change them
to strlcpy as much as possible)

Revision 1.3.2.7 / (download) - annotate - [select for diffs], Mon Nov 11 22:22:16 2002 UTC (11 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.3.2.6: +44 -7 lines
Diff to previous 1.3.2.6 (colored)

Catch up to -current

Revision 1.14 / (download) - annotate - [select for diffs], Fri Oct 25 20:42:02 2002 UTC (12 years ago) by wiz
Branch: MAIN
Changes since 1.13: +44 -7 lines
Diff to previous 1.13 (colored)

Add some _DIAGASSERTS(). Ok'd by christos.

Revision 1.3.2.6 / (download) - annotate - [select for diffs], Fri Oct 18 02:16:11 2002 UTC (12 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.3.2.5: +11 -8 lines
Diff to previous 1.3.2.5 (colored)

Catch up to -current.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Sep 28 01:43:24 2002 UTC (12 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

fix typo

Revision 1.12 / (download) - annotate - [select for diffs], Sat Sep 28 01:34:36 2002 UTC (12 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.11: +8 -5 lines
Diff to previous 1.11 (colored)

check for write and close errors, from wiz

Revision 1.11 / (download) - annotate - [select for diffs], Thu Sep 26 17:08:42 2002 UTC (12 years, 1 month ago) by wiz
Branch: MAIN
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (colored)

Move comment that says 'the following are extensions' to the right place.
Approved by christos.

Revision 1.3.2.5 / (download) - annotate - [select for diffs], Fri Aug 2 23:30:35 2002 UTC (12 years, 3 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.3.2.4: +3 -2 lines
Diff to previous 1.3.2.4 (colored)

Add missing <stdlib.h> -- must have been a merge botch.

Revision 1.3.2.4 / (download) - annotate - [select for diffs], Thu Aug 1 03:28:12 2002 UTC (12 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.3.2.3: +93 -11 lines
Diff to previous 1.3.2.3 (colored)

Catch up to -current.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jul 28 00:45:11 2002 UTC (12 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

use the fname we passed in.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Jul 27 19:38:29 2002 UTC (12 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.8: +80 -6 lines
Diff to previous 1.8 (colored)

add lastlogx implementation.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jul 27 15:44:45 2002 UTC (12 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.7: +5 -3 lines
Diff to previous 1.7 (colored)

reset fp when we are done with it.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 23 00:03:36 2002 UTC (12 years, 3 months ago) by simonb
Branch: MAIN
Changes since 1.6: +12 -6 lines
Diff to previous 1.6 (colored)

Sprinkle some KNF.

Revision 1.3.2.3 / (download) - annotate - [select for diffs], Thu Apr 25 04:01:42 2002 UTC (12 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.3.2.2: +35 -7 lines
Diff to previous 1.3.2.2 (colored)

Catch up to -current.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Apr 15 16:47:03 2002 UTC (12 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.5: +8 -7 lines
Diff to previous 1.5 (colored)

- open for r+, then w+, then r.
- fix fread and fwrite error checking.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Apr 4 19:42:14 2002 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.4: +29 -2 lines
Diff to previous 1.4 (colored)

add two more gnu-like functions.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Mar 11 03:29:49 2002 UTC (12 years, 7 months ago) by simonb
Branch: MAIN
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored)

Include <stdlib.h> for exit() prototype.

Revision 1.3.2.2 / (download) - annotate - [select for diffs], Fri Mar 8 21:35:20 2002 UTC (12 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.3.2.1: +310 -0 lines
Diff to previous 1.3.2.1 (colored)

Catch up to -current.

Revision 1.3.2.1, Tue Mar 5 16:16:02 2002 UTC (12 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.3: +0 -310 lines
FILE REMOVED

file utmpx.c was added on branch nathanw_sa on 2002-03-08 21:35:20 +0000

Revision 1.3 / (download) - annotate - [select for diffs], Tue Mar 5 16:16:02 2002 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.2: +19 -2 lines
Diff to previous 1.2 (colored)

add updwtmpx(); requested by tron.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Feb 25 20:19:26 2002 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored)

catch up with ut_name->ut_user change

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 22 20:11:44 2002 UTC (12 years, 8 months ago) by christos
Branch: MAIN

A simple utmpx implementation. Nothing uses it yet.
TODO: write the lastlog*() stuff.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>