summaryrefslogtreecommitdiffstats
path: root/libc/misc/utmp
Commit message (Collapse)AuthorAgeFilesLines
* fix a problem with hidden getutent in non-threaded buildsDenys Vlasenko2011-02-061-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libc_utmp: Fix getutmp and getutmpx for x86_64Carmelo Amoroso2010-11-281-2/+4
| | | | | | | | | | | | On x86_64, when WORDSIZE_COMPAT32 is enabled, the ut_tv field of 'struct utmp' and 'struct utmpx' are defined as two nested structs instead of being defined as 'struct timeval', so it is not possible to directly assign the two ut_tv values. This patch split the assignment by setting each fields (tv_sec, tv_usec) of the ut_tv filed separately It is als compatible with 'struct timeval' usage. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* misc: utmpx based logging supportSalvatore Cro2010-09-144-0/+115
| | | | | | | | misc: Added support for accessing user accounting database based on utmpx structure. Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-061-40/+51
|\ | | | | | | | | | | | | | | Conflicts: libc/misc/utmp/utent.c libc/sysdeps/linux/i386/bits/syscalls.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * utent: do not create extra static functions if !THREADSDenys Vlasenko2010-04-051-37/+49
| | | | | | | | | | | | | | | | text data bss dec hex filename 547 8 384 939 3ab libc/misc/utmp/utent.o 519 8 384 911 38f libc/misc/utmp/utent.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * getutid is not used internally, removing hidden_protoDenys Vlasenko2010-04-051-4/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2010-04-021-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * prettify make cleanBernhard Reutner-Fischer2010-03-251-2/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | use *_not_cancel variants to avoid accidental cancellations with nptlAustin Foxley2009-10-172-9/+11
|/ | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* clean up O_CLOEXEC handlingMike Frysinger2009-10-071-17/+4
| | | | | | | Drop the "#ifndef O_CLOEXEC" cruft, enable O_CLOEXEC in most fcntl.h headers, and import __ASSUME_O_CLOEXEC from glibc. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-181-9/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wtmp code: style fixes, no code changesDenys Vlasenko2009-09-051-18/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* CLOEXEC: use open(CLOEXEC) if exist; do not check fcntl(FD_CLOEXEC) failureDenys Vlasenko2009-09-051-13/+18
| | | | | | | | | | | | text data bss dec hex filename - 370 0 0 370 172 libc/misc/dirent/opendir.o + 366 0 0 366 16e libc/misc/dirent/opendir.o - 375 4 0 379 17b libc/pwd_grp/lckpwdf.o + 356 4 0 360 168 libc/pwd_grp/lckpwdf.o - 248 0 0 248 f8 librt/shm.o + 209 0 0 209 d1 librt/shm.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* utent.c: fix a few bugs, and shrink a bitDenys Vlasenko2009-09-051-47/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug #1: static_fd = -1; close(static_fd); DOH! bug #2: if (utmp_fd == -1) { __setutent(); } if (utmp_fd == -1) { return NULL; } if utmp_fd == -1, we call _setutent(). if __setutent() opens a fd, utmp_fd (a parameter) wouldn't change, the second check is bogus. We need to use static_fd instead in second check. Which makes clear that having utmp_fd parameter is wrong. See the patch for a complete fix. Shrink comes from simplifying fcntl(static_fd, F_SETFD, FD_CLOEXEC): text data bss dec hex filename - 661 8 384 1053 41d libc/misc/utmp/utent.o + 604 8 384 996 3e4 libc/misc/utmp/utent.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* support building out-of-treeBernhard Reutner-Fischer2009-08-171-0/+2
| | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-202-4/+4
| | | | | Appears to build fine (several .configs tried)
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-202-8/+8
|
* libc_hidden_proto removal, just a few functionsDenis Vlasenko2008-11-182-2/+2
|
* - less verbose make cleanBernhard Reutner-Fischer2008-11-071-4/+4
|
* Revert revision 19345 plus libc_hidden_proto for __uc_malloc.Bernd Schmidt2008-06-121-9/+4
|
* Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko2008-05-192-5/+5
| | | | | | | | | in string.h and strings.h. This caught unguarded string ops in libc/inet/ethers.c __ether_line_w() function. I will wait for fallout reports for a week or so, then continue converting more libc_hidden_proto's.
* add hidden_proto's for __uc_mallocDenis Vlasenko2008-02-121-0/+1
| | | | | (patch by Bernd Schmidt <bernds_cb1 at t-online.de>)
* make utent.c, getpass.c use __uc_mallocDenis Vlasenko2007-07-301-4/+8
|
* Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen2006-12-071-42/+35
| | | | | | | things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
* fixup my copyright notice, trim stale remnants of older notices whichEric Andersen2006-07-051-1/+0
| | | | I had clearly run search/replace on that were cluttering things up.
* some more fixes from rholzmann in Bug 716 ... make sure the code actually ↵Mike Frysinger2006-03-221-21/+41
| | | | functions, then we worry about shrinking it ...
* make sure we reset static_fd after it's closed in utmpname()Mike Frysinger2006-02-151-2/+2
|
* fix fcntl() call so that it actually forces file to be closed on exec()Mike Frysinger2006-02-151-1/+1
|
* libc-{a,so,multi}-y replaced by libc-y covering common objects both in ↵Peter S. Mazinger2006-02-131-11/+8
| | | | libc.a/libc.so, the diffs go into libc-static-y/libc-shared-y exclusively, add IMA to libc, don't use any MSRC anymore
* rholzmann writes in Bug 716:Mike Frysinger2006-02-111-13/+12
| | | | utent.c has a few problems with mutex locking when used in a binary that was linked with pthreads. The are a few deadlock conditions where functions may be called which lock the utmplock but never release it and where a function that hold the lock calls other functions which try to relock the same lock. For example, notice in the __getutent function the error condition does not unlock the semaphore. The problem is not visible when pthreads isn't used since the lock/unlock functions are NOOP functions.
* make gcc4 happy w/ hidden_def/proto, correct some typosPeter S. Mazinger2006-01-151-3/+4
|
* hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger2006-01-142-50/+55
| | | | missing headers, other jump relocs removed
* Convert all users of earlier hiddensPeter S. Mazinger2005-12-132-8/+8
|
* Use internal versionsPeter S. Mazinger2005-12-081-0/+2
|
* Hide morePeter S. Mazinger2005-12-071-26/+21
|
* macro out the thread funcs in libc if threading is disabledMike Frysinger2005-12-061-6/+3
|
* More hiding, including __mempcpyPeter S. Mazinger2005-12-031-1/+1
|
* Hide mostly used functionsPeter S. Mazinger2005-12-012-18/+18
|
* Correct typoPeter S. Mazinger2005-11-291-1/+1
|
* Hiding againPeter S. Mazinger2005-11-291-2/+5
|
* Remove TOPDIRPeter S. Mazinger2005-11-211-3/+1
|
* Remove last unused references to libc-a-pic-, we use only the lists in ↵Peter S. Mazinger2005-11-011-1/+0
| | | | libc-a-y for objects that go into static libs, changing their suffix to .os, of they should be PIC
* Replace all Makefiles for new build infrastucturePeter S. Mazinger2005-10-291-35/+8
|
* All Makefile.in's. Only arm/i386/mips/powerpc/x86_64 are done, the other ↵Peter S. Mazinger2005-10-251-0/+26
| | | | archs lack proper crt1. The Makefiles in extra/scripts are intended to be linked into each dir, where it is necessary to build locally.
* Rewrote almost all Makefiles: do not use strip $(x),y; run strip on all ↵Peter S. Mazinger2005-10-121-8/+7
| | | | objects at once; use :=//$</$^; use CRT_SRC/CRT_OBJ/SCRT_OBJ/CSRC/COBJ/SSRC/SOBJ/MSRC/MOBJ where no more is needed, if only CSRC is present use OBJS directly instead of COBJ; CTOR_TARGETS are created directly in lib; remove unused/unneeded parts. Hope I haven't broken too much.
* merge parallel build supportMike Frysinger2005-01-251-4/+4
|
* Revert Peter's __lib_gettimeofday patch. There's the minor issue ofManuel Novoa III2004-10-311-1/+1
| | | | | | adding cruft to include/sys/time.h. But also, there's no sense in making changes like this until we decide how we're going to approach the hidden symbol transition.
* Peter S. Mazinger writes:Eric Andersen2004-10-191-1/+1
| | | | | | | | | | | Hello! Would the attached patch be acceptable (maybe instead of __libc_gettimeofday using __gettimeofday) We have some issues, see http://bugs.gentoo.org/show_bug.cgi?id=65892
* Fix a long-standing bug with pthreads. A couple of linuxthreads filesManuel Novoa III2003-12-271-2/+2
| | | | | | | | | | | | | | | | were including libc-lock.h which had a bunch of weak pragmas. Also, uClibc supplied a number of no-op weak thread functions even though many weren't needed. This combined result was that sometimes the functional versions of thread functions in pthread would not override the weaks in libc. While fixing this, I also prepended double-underscore to all necessary weak thread funcs in uClibc, and removed all unused weaks. I did a test build, but haven't tested this since these changes are a backport from my working tree. I did test the changes there and no longer need to explicitly add -lpthread in the perl build for perl to pass its thread self tests.
* Peter Kjellerstedt writes:Eric Andersen2003-10-181-1/+1
| | | | | | | rm.patch: * Define $(RM) as rm -f in Rules.mak and test/Rules.mak (this is the same definition as gmake uses by default). * Change all occurrences of rm and rm -f into $(RM).