summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen
Commit message (Collapse)AuthorAgeFilesLines
* Fix another unprotected instance of chdir() by extending thekris2001-06-012-48/+24
| | | | | | | fts_safe_changedir() function and using that instead for both of the chdir()s. Partially submitted by: Todd Miller <millert@OpenBSD.org>, bde
* When doing the chdir("..") in the !FTS_NOCHDIR case, stat() after we getkris2001-05-302-4/+32
| | | | | | | there and compare the inode and device numbers to the values we remember, to guard against the directory having been moved around in the meantime. Reported by: Nick Cleaton <nick@cleaton.net>
* Add warnings about trusting user-supplied data.eric2001-05-252-2/+29
| | | | | | Reviewed by: ru Approved by: murray Obtained from: OpenBSD
* Fix the range of the returned value.ru2001-05-231-1/+1
| | | | | PR: docs/27446 Submitted by: Tadayuki OKADA <tadayuki@mediaone.net>
* Suppress compiler warning by adding a type cast.ru2001-05-171-4/+2
|
* Introduce getprogname(3) and setprogname(3) library calls. These getdd2001-05-154-3/+123
| | | | | | | | | and set __progname, respectively. Discussed on: -arch (Feb 2001), -audit Reviewed by: -audit Approved by: kris Obtained from: (mostly) NetBSD
* * include/elf.h has been repo copied to include/elf-hints.h, and it noobrien2001-05-021-1/+2
| | | | | | | | longer includes machine/elf.h. * consumers of elf.h now use the minimalist elf header possible. This change is motivated by Binutils 2.11.0 and too much clashing over our base elf headers and the Binutils elf headers.
* Compensate for header dethreading.markm2001-05-015-0/+12
|
* Fix directory reads of MNT_UNION mounts, where entries present in bothjoerg2001-04-231-1/+2
| | | | | | | layers would be displayed twice. PR: bin/26498 Submitted by: Olliver Fromme <olli@secnetix.de>
* mdoc(7) police: normalize .Nd.ru2001-04-181-1/+1
|
* mdoc(7) police: fix markup.ru2001-04-181-9/+15
|
* Add fmtcheck(), a function for checking consistency of format stringkris2001-04-173-2/+355
| | | | | | | | | | | | | | | | | arguments where the format string is obtained from user data, or otherwise difficult to verify statically. Example usage: printf(fmtcheck(user_format, standard_format), arg1, arg2); checks the format string user_format for consistency (same number/order/ type of format operators) with standard_format. If they differ, standard_format is used instead to avoid potential crashes or security violations. Obtained from: NetBSD Reviewed by: -arch
* To be consistent, use the __weak_reference macro from <sys/cdefs.h>deischen2001-04-103-32/+34
| | | | | | | | instead of #pragma weak to create weak definitions. This macro is improperly named, though, since a weak definition is not the same thing as a weak reference. Suggested by: bde
* mdoc(7) police: add missing .Pa call.ru2001-04-041-1/+3
|
* Mostly pick up OpenBSD's rev 1.14 by deraadt@ and millert@.peter2001-03-281-42/+39
| | | | | | I've left out a couple of unused args between internal functions. Use MAXPATHLEN, not MAXPATHLEN + 1 in a couple of places. Pass a pointer to the end of the target filename space.
* OpenBSD's g_Ctoc() returned a false error when the target buffer waspeter2001-03-281-16/+16
| | | | | | exactly the right size. Do it differently - pass a length rather than an end-of-string+1 pointer as this is more convenient anyway. Get rid of the bogus +1's.
* Fix g_Ctoc() interface, approximately based on OpenBSD's recent changes.peter2001-03-281-14/+36
| | | | | | | Also, set gl_pathv to NULL after we free it, especially when dealing with realloc failures. Obtained from: OpenBSD
* Document LOG_CONSOLE.cwt2001-03-271-0/+2
|
* MAN[1-9] -> MAN.ru2001-03-271-1/+1
|
* give the "netgrent" functions a home in netdb.halfred2001-03-271-0/+1
|
* This is kind of a hack, but it should work. Currently, world is brokenpeter2001-03-243-81/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | because libc/rpc/key_call.c references uname(), and ps/print.c also defines uname(), and ps is linked statically. This leads to a symbol clash. The userland uname(3) kinda sucked anyway as the hostname etc was too short. And since the libc rpc interface now uses the utsname.nodename which gets truncated, I was tempted into doing something about it. Create a new userland uname function, called __xuname() which takes an extra argument that allows you to change the size of the fields. uname() becomes a static inline function in sys/utsname.h that passes the extra argument in. struct utsname has its field members expanded by default now in userland. We still provide a 'uname' externally linkable function for things that either think that they ``know'' the utsname format and assume 32 character strings and bypass the include file, or objects that are linked against old libcs. ie: just about every plausible case that I can think of is covered. Should we ever change the default lengths again, a libc major bump should not be required as the size is now passed to the function. XXX the uname(2) in the kernel is for FreeBSD 1.1 binary compatability! All the uname(3) functions that are exported to userland are actually implemented in libc with sysctl. uname(1) uses sysctl directly and does not call uname(3). PR: bin/4688
* Introduce the GLOB_MAXPATH flag, which allows the user to limit thejlemon2001-03-192-39/+59
| | | | | | | number of paths which glob(3) will return. Remove the hardcoded limit from the last commit, which restores the previous unbounded behavior. Document the new flag in the manual page.
* Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) andalfred2001-03-191-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | associated changes that had to happen to make this possible as well as bugs fixed along the way. Bring in required TLI library routines to support this. Since we don't support TLI we've essentially copied what NetBSD has done, adding a thin layer to emulate direct the TLI calls into BSD socket calls. This is mostly from Sun's tirpc release that was made in 1994, however some fixes were backported from the 1999 release (supposedly only made available after this porting effort was underway). The submitter has agreed to continue on and bring us up to the 1999 release. Several key features are introduced with this update: Client calls are thread safe. (1999 code has server side thread safe) Updated, a more modern interface. Many userland updates were done to bring the code up to par with the recent RPC API. There is an update to the pthreads library, a function pthread_main_np() was added to emulate a function of Sun's threads library. While we're at it, bring in NetBSD's lockd, it's been far too long of a wait. New rpcbind(8) replaces portmap(8) (supporting communication over an authenticated Unix-domain socket, and by default only allowing set and unset requests over that channel). It's much more secure than the old portmapper. Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded to support TI-RPC and to support IPV6. Umount(8) is also fixed to unmount pathnames longer than 80 chars, which are currently truncated by the Kernel statfs structure. Submitted by: Martin Blapp <mb@imp.ch> Manpage review: ru Secure RPC implemented by: wpaul
* Bump MAX_GLOBENTRIES up to 16384, so it is a power of two. Addjlemon2001-03-161-1/+7
| | | | | | some comments explaining that this is an arbitrary limit. Requested by: jkh
* Limit the number of paths that glob can return to MAX_GLOBENTRIES, whichjlemon2001-03-151-0/+7
| | | | | | | is currently set to 10000. This is intended to prevent glob from running amok when a highly recursive path is provided (such as "../*/../*/../*/...") Reviewed by: Diane Bruce <db@db.net>, jhb
* Mention that MAXHOSTNAMELEN includes space for the NUL.brian2001-03-151-0/+2
|
* Use the right format string for printing ULONG_MAX.dwmalone2001-03-051-2/+2
|
* Fix style breakage in rev 1.3obrien2001-03-051-0/+1
|
* Fix style bug that was introduced.obrien2001-03-051-0/+1
|
* Use ``.St -p1003.[12]''.ru2001-02-262-6/+18
|
* Use ``.St -p1003.1-96''.ru2001-02-266-18/+12
|
* ``.St -p1003.1b'' -> ``.St -p1003.1b-93''.ru2001-02-261-1/+1
|
* .St -ansiC -> .St -isoCru2001-02-267-7/+7
|
* mdoc(7) police: use .Vt macro.ru2001-02-261-6/+2
|
* Prepare for mdocNG.ru2001-02-261-1/+1
|
* Preceed/preceeding are not english words. Use precede or preceding.asmodai2001-02-181-1/+1
|
* libc MT-safety, part 2.deischen2001-02-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a lock to FILE. flockfile and friends are now implemented (for the most part) in libc. flockfile_debug is implemented in libc_r; I suppose it's about time to kill it but will do it in a future commit. Fix a potential deadlock in _fwalk in a threaded environment. A file flag (__SIGN) was added to stdio.h that, when set, tells _fwalk to ignore it in its walk. This seemed to be needed in refill.c because each file needs to be locked when flushing. Add a stub for pthread_self in libc. This is needed by flockfile which is allowed by POSIX to be recursive. Make fgetpos() error return value (-1) match man page. Remove recursive calls to locked functions (stdio); I think I've got them all, but I may have missed a couple. A few K&R -> ANSI conversions along with removal of a few instances of "register". $Id$ -> $FreeBSD$ in libc/stdio/rget.c Not objected to: -arch, a few months ago
* mdoc(7) police: Change -filled displays (which just happenru2001-02-071-2/+2
| | | | | | to be the same as -ragged in the current implementation) to -ragged. With mdocNG, -filled displays produce the correct output, formatted and justified to both margins.
* Don't install links for crypt.3 here. There is no crypt.3 here...bde2001-02-051-2/+0
| | | | | Forgotten in: rev.1.58, which was not Submitted by: bde (I requested untangling parts of the crypto mess).
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-0114-49/+53
|
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-2446-217/+454
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch
* I made a last-minute change before the last commit which brokewollman2001-01-231-3/+1
| | | | the errno semantics. Get it (closer to) right this time.
* mdoc(7) police: replaced empty line with .Pp, updated document date.ru2001-01-231-2/+2
|
* Add a couple of new library interfaces (will be activated when thewollman2001-01-232-0/+88
| | | | relavant header file changes are committed) for POSIX support.
* Add the function sysctlnametomib to libc. Details on the semanticsmckusick2001-01-233-3/+111
| | | | and use of this function have been added to the sysctl.3 manual page.
* SIGABRT is *not* the same as calling abort(), so don't claim that it is.ben2001-01-161-2/+2
| | | | | | | (abort() flushes all open stdio streams for one thing.) PR: 24249 Submitted by: Edwin Groothuis <mavetju@chello.nl>
* Prepare for mdoc(7)NG.ru2001-01-162-3/+3
|
* mdoc(7) police: Ft/Vt now accept punctuation-type arguments.ru2001-01-122-3/+3
|
* Change the interface of getlogin_r to return an int. The formerdeischen2001-01-011-17/+50
| | | | | | | | | | interface was based on a draft version of POSIX whereas the final (1996) version of POSIX specified that the error is returned. While I'm here, fix getlogin_r so that it works for more than just the first time it's called. Reviewed by: wes, wollman (man page)
* Prepare for mdoc(7)NG.ru2000-12-2919-148/+158
|
OpenPOWER on IntegriCloud