summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen
Commit message (Collapse)AuthorAgeFilesLines
* The upper end of the range of arc4random(3) is 2**32-1, not 2**31-1.das2003-07-311-2/+4
|
* Make raise and _raise as weak symbols, so they can be overriden bydavidxu2003-07-191-1/+4
| | | | | | thread library. Reviewed by: deischen
* Rewrite to reflect slight change in semantics for C99, and note a bugwollman2003-07-191-22/+39
| | | | in the standard. Defer to gettimeofday(2) for error indications.
* C99 compliance: time() always sets its return value in both placeswollman2003-07-191-4/+7
| | | | | | (if present), even on error. Pointed out by: Wojtek Lerch, on the Austin Group mailing-list
* Revert to using yp_order() to probe for master.paswd.by* maps andwpaul2003-07-181-7/+14
| | | | | | | | | | | | | | | don't probe the server at all for passwd.by* maps. This fixes interoperability with the Services For UNIX NIS server (which is really a front end to Captive^WActiveDirectory). This server incorrectly returns success for all YPPROC_MASTER requests, even for maps that don't exist, which makes it impossible to (ab)use it to probe for the existence of the master.passwd.by* maps. This is a little kludgey, but basically restores the original behavior of getpwent.c as it is in -stable, and works around both the lack of YPPROC_ORDER on NIS+ servers as well as the broken YPPROC_MASTER on Services For UNIX servers.
* Whitespace after keywords per style(9).wollman2003-07-181-2/+2
|
* With the latest mdoc(7), we can now fix the synopsis like this.ru2003-07-031-3/+9
| | | | Desired by: bde
* Fixed some style bugs.bde2003-07-011-6/+7
|
* Don't segfault if setproctitle(3) is called with NULL initially.alfred2003-07-011-0/+1
| | | | | | | | The old buffer was not being initialized and a later str*() op on it would cause a crash if it wasn't initialized by a previous call to setproctitle(3) with an actual string. Noticed by: Ashley Penney <ashp@unloved.org>
* Add a libc function execvP that takes the search path as an arguement.gordon2003-06-292-15/+40
| | | | | | | | Change execvp to be a wrapper around execvP. This is necessary for some of the /rescue pieces. It may also be more generally applicable as well. Submitted by: Tim Kientzle <kientzle@acm.org> Approved by: Silence on arch@
* Teach fmtcheck(3) about the flags a, A, F, G, t, and z.das2003-06-291-8/+28
|
* fix NIS+ YP compat modejwd2003-06-271-3/+4
| | | | | PR: bin/52792 Submitted by: TOMITA Yoshinori <yoshint@flab.fujitsu.co.jp>
* Don't statically initialize buf to _PATH_DEV, _PATH_DEV always copied toache2003-06-241-1/+1
| | | | it in any case.
* Supplement the cross-references section with those to sigpending(2)yar2003-06-241-0/+2
| | | | | and sigprocmask(2). These two syscalls are likely to be accompanied by a few sigsetops(3) in a typical piece of code.
* ttyname(3) must return absolute pathnames.phk2003-06-211-2/+8
| | | | Noticed by: kris
* Use devname(3) to do the task.phk2003-06-201-66/+2
| | | | Reviewed by: imp
* Add devname_r(3) which takes a buffer as argument.phk2003-06-202-56/+21
|
* Make the execle() synopsis look (again) like a normal C prototype.ru2003-06-181-3/+3
| | | | | | | | | Also fixed the rest of ell (list) functions prototypes to include a (commented out) terminating null pointer. Pointed out by: bde Obtained from: POSIX.1-2001 Glanced at by: imp
* Fix the execle(3) synopsis to include the environment pointer.phk2003-06-171-1/+1
| | | | Confused: anordby
* The .Fn functioncharnier2003-06-081-3/+6
|
* Add or correct section number in .Xr. Use .Vt or .Fncharnier2003-06-084-9/+9
| | | | instead of .Xr when needed
* Recognize the magic NODEV value.phk2003-06-051-3/+3
| | | | Format other unknown devices consistently in hex.
* Match style of source and headers.jmallett2003-06-011-1/+1
| | | | Submitted by: bde
* Assorted mdoc(7) fixes.ru2003-06-014-147/+157
|
* Make prototype match code with regard to constness of args to thejmallett2003-06-011-1/+1
| | | | function pointer passed in.
* Add an stub for _rtld_thread_init. This is a part I missed inkan2003-05-301-0/+7
| | | | | | my last commit. Approved by: re (scottl)
* Assorted mdoc(7) fixes.ru2003-05-223-15/+17
| | | | Approved by: re (blanket)
* Fixed troff(1) and mdoc(7) warnings.ru2003-05-182-3/+3
| | | | Approved by: re (blanket)
* Catch up with the renaming of the "union" filesystem to "unionfs".tjr2003-05-161-1/+1
| | | | | | | Fixes a problem where directory entries could show up twice: once on the top layer of the union stack, and once on the bottom layer. Approved by: re (rwatson)
* Use the .Dl macro.trhodes2003-05-011-1/+1
| | | | Discussed with: mdoc(7) officer ru
* State the fact that the range is twice the traditional RAND_MAX.trhodes2003-05-011-1/+16
| | | | | | | Add an EXAMPLES section. PR: 48493 Submitted by: Paul Herman <pherman@frenchfries.net> (original version)
* Back out the `hiding' of strlcpy and strlcat. Several peoplenectar2003-05-015-25/+25
| | | | vocally objected to this safety belt.
* `Hide' strlcpy and strlcat (using the namespace.h / __weak_referencenectar2003-04-295-25/+25
| | | | | | | technique) so that we don't wind up calling into an application's version if the application defines them. Inspired by: qpopper's interfering and buggy version of strlcpy
* Replace the return value of rfork_thread(3) in its manual pagerobert2003-04-271-1/+1
| | | | | function prototype with `pid_t' to match the declaration in <unistd.h>.
* When using `compat' mode, be sure to re-dispatch setpwent, endpwent,nectar2003-04-252-0/+58
| | | | | | | | | | setgrent, and endgrent also. (The previous NSS implementation used to simply twiddle the internal data of the various modules directly.) A symptom (group list set incorrectly in sshd) was Reported by: Glenn Johnson <gjohnson@srrc.ars.usda.gov> Sponsored by: DARPA, Network Associates Laboratories
* In compat mode, we `redispatch' the lookup. It is probably a goodnectar2003-04-241-0/+1
| | | | | | | | idea to re-initialize `struct passwd', because e.g. pw_class might get set by one module, but not by another. Add another call to the internal pwd_init function to accomplish this. Sponsored by: DARPA, Network Associates Laboratories
* Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' bynectar2003-04-241-1/+3
| | | | | | namespace.h. Sponsored by: DARPA, Network Associates Laboratories
* ``Strong typing is a crutch for people with weak memories.''nectar2003-04-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | Correct a bug that should have wreaked havoc everywhere, but for some reason only bit unlucky people who use `-march' optimizations. The compiler cannot assist one in distinguishing between the two function calls below. int nsdispatch(void *, ...); void *discard; nsdispatch(&discard, ...); /* correct .. no, really! */ nsdispatch(discard, ...); /* Boom */ Robin provided me with a debugging environment in which I could see what was going on. Badness when using CPUTYPE was Reported by: "Robin P. Blanchard" <Robin.Blanchard@gactr.uga.edu> Reported by: nork Sponsored by: DARPA, Network Associates Laboratories
* Don't try to access the NIS `master' maps unless we have superusernectar2003-04-211-7/+9
| | | | | | | | privileges. To do so may cause the NIS server to log spurious and annoying `access denied' messages. Reported by: Philip Paeps <philip@paeps.cx> Sponsored by: DARPA, Network Associates Laboratories
* Repair a bug in which a faulty group entry (one with only 2 colons)nectar2003-04-201-8/+6
| | | | | | | | would result in an incorrectly terminated grouplist. login(1) crashes Reported by: Morten Rodal <morten@rodal.no>, Matthias Schuendehuette <msch@snafu.de>
* Follow-up to revision 1.74: Using the result buffer to store our emptynectar2003-04-181-22/+16
| | | | | | | string was an incredibly dumb idea (of course it will be changed by an NSS module on success!). Use a static empty string instead. Sponsored by: DARPA, Network Associates Laboratories
* Follow-up to revision 1.73: set _PWF_FILES when `compat' source is usednectar2003-04-181-4/+13
| | | | | | | but user is found in local file. Reported by: Shizuka Kudo <shizukakudo_99@yahoo.com> Sponsored by: DARPA, Network Associates Laboratories
* Don't use `memset' to initialize a struct passwd. A modulenectar2003-04-181-6/+31
| | | | | | | | | | | | | | | | may not fill in all fields, and in the case of string fields, this could cause trouble for applications. (The only likely example is `pw_class', because this field is not used by all modules in all cases.) Move initialization of struct passwd from module-specific code to the dispatch code. The problem of a NULL pw_class was Noticed by: Philip Paeps <philip@paeps.cx> and the c^Htrusty ssh(1) command. Déjà vu by: getpwent.c revision 1.56 Sponsored by: DARPA, Network Associates Laboratories
* Correctly set _PWF_FILES in pw_fields when appropriate.nectar2003-04-181-2/+6
| | | | | | | (_PWF_NIS and _PWF_HESIOD were already being set.) Reported by: Shizuka Kudo <shizukakudo_99@yahoo.com> Sponsored by: DARPA, Network Associates Laboratories
* Revert the definitions of _PW_KEY* to their previous values. There isnectar2003-04-181-2/+2
| | | | | | | | | | at least one consumer outside of libc and pwd_mkdb. Adjust the versioning in libc and pwd_mkdb accordingly. named was the application affected, and that fact was first Reported by: Zherdev Anatoly <tolyar@mx.ru> Sponsored by: DARPA, Network Associates Laboratories
* The default if nsswitch.conf(5) is not present is supposed to be thenectar2003-04-182-2/+2
| | | | | | | hated `compat' source, not `files'. Reported by: Philip Paeps <philip@paeps.cx> Sponsored by: DARPA, Network Associates Laboratories
* = Implement thread-safe versions of the getpwent(3) and getgrent(3)nectar2003-04-174-1542/+2604
| | | | | | | | | | | | | | | | | | | | | | family of functions using the new nsdispatch(3) core. Remove arbitrary size limits when using the thread-safe versions. = Re-implement the traditional getpwent(3)/getgrent(3) functions on top of the thread-safe versions. = Update the on-disk format of the hashed version of the passwd(5) databases to allow for versioned entries. The legacy version is `3'. (Don't ask.) = Add support for version `4' entries in the passwd(5) database. Entries in this format are identical to version 3 entries except that all integers are stored as 32-bit integers in network byte order (big endian). = pwd_mkdb is updated to generate both version 3 and version 4 entries. Sponsored by: DARPA, Network Associates Laboratories
* = Implement name service switch modules (NSS modules). NSS modulesnectar2003-04-171-1/+3
| | | | | | | | | | | | | | | | | | | | | may be built into libc (`static NSS modules') or dynamically loaded via dlopen (`dynamic NSS modules'). Modules are loaded/initialized at configuration time (i.e. when nsdispatch is called and nsswitch.conf is read or re-read). = Make the nsdispatch(3) core thread-safe. = New status code for nsdispatch(3) `NS_RETURN', currently used to signal ERANGE-type issues. = syslog(3) problems, don't warn/err/abort. = Try harder to avoid namespace pollution. = Implement some shims to assist in porting NSS modules written for the GNU C Library nsswitch interface. Sponsored by: DARPA, Network Associates Laboratories
* Return "/boot/kernel/kernel" instead of "/kernel" if the sysctl() calltjr2003-04-111-1/+1
| | | | fails. The documentation was incorrectly updated in getbootfile.3 rev. 1.10.
* Bump the date.mdodd2003-04-071-1/+1
|
OpenPOWER on IntegriCloud