Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 2010 17:29:55 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/include Makefile utmpx.h src/lib/libc/gen Makefile.inc Symbol.map getutxent.3 getutxent.c pututxline.c utxdb.c utxdb.h src/lib/libulog Makefile
Message-ID:  <201001131741.o0DHfbSE095922@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
ed          2010-01-13 17:29:55 UTC

  FreeBSD src repository

  Modified files:
    include              Makefile 
    lib/libc/gen         Makefile.inc Symbol.map 
    lib/libulog          Makefile 
  Added files:
    include              utmpx.h 
    lib/libc/gen         getutxent.3 getutxent.c pututxline.c 
                         utxdb.c utxdb.h 
  Log:
  SVN rev 202188 on 2010-01-13 17:29:55Z by ed
  
  Implement <utmpx.h>.
  
  The utmpx interface is the standardized interface of the user accounting
  database. The standard only defines a subset of the functions that were
  present in System V-like systems.
  
  I'd like to highlight some of the traits my implementation has:
  
  - The standard allows the on-disk format to be different than the
    in-memory representation (struct utmpx). Most operating systems don't
    do this, but we do. This allows us to keep our ABI more stable, while
    giving us the opportunity to modify the on-disk format. It also allows
    us to use a common file format across different architectures (i.e.
    byte ordering).
  
  - Our implementation of pututxline() also updates wtmp and lastlog (now
    called utx.log and utx.lastlogin). This means the databases are more
    likely to be in sync.
  
  - Care must be taken that our implementation discard any fields that are
    not applicable. For example, our DEAD_PROCESS records do not hold a
    TTY name. Just a time stamp, a record identifier and a process
    identifier. It also guarantees that strings (ut_host, ut_line and
    ut_user) are null terminated. ut_id is obviously not null terminated,
    because it's not a string.
  
  - The API and its behaviour should be conformant to POSIX, but there may
    be things that slightly deviate from the standard. This implementation
    uses separate file descriptors when writing to the log files. It also
    doesn't use getutxid() to search for a field to overwrite. It uses an
    allocation strategy similar to getutxid(), but prevents DEAD_PROCESS
    records from accumulating.
  
  Make sure libulog doesn't overwrite the manpages shipped with our C
  library. Also keep the symbol list in Symbol.map sorted.
  
  I'll bump __FreeBSD_version later this evening. I first want to convert
  everything to <utmpx.h> and get rid of <utmp.h>.
  
  Revision  Changes    Path
  1.294     +2 -2      src/include/Makefile
  1.1       +88 -0     src/include/utmpx.h (new)
  1.151     +8 -4      src/lib/libc/gen/Makefile.inc
  1.27      +10 -2     src/lib/libc/gen/Symbol.map
  1.1       +440 -0    src/lib/libc/gen/getutxent.3 (new)
  1.1       +232 -0    src/lib/libc/gen/getutxent.c (new)
  1.1       +277 -0    src/lib/libc/gen/pututxline.c (new)
  1.1       +162 -0    src/lib/libc/gen/utxdb.c (new)
  1.1       +61 -0     src/lib/libc/gen/utxdb.h (new)
  1.6       +0 -7      src/lib/libulog/Makefile



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001131741.o0DHfbSE095922>