Commit Graph

1041 Commits

Author SHA1 Message Date
Jacques Vidrine
71cc8f0764 Correctly set _PWF_FILES in pw_fields when appropriate.
(_PWF_NIS and _PWF_HESIOD were already being set.)

Reported by:	Shizuka Kudo <shizukakudo_99@yahoo.com>
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-18 16:24:25 +00:00
Jacques Vidrine
b4603f3dd4 Revert the definitions of _PW_KEY* to their previous values. There is
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
2003-04-18 14:11:17 +00:00
Jacques Vidrine
1b467db206 The default if nsswitch.conf(5) is not present is supposed to be the
hated `compat' source, not `files'.

Reported by:	Philip Paeps <philip@paeps.cx>
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-18 01:00:37 +00:00
Jacques Vidrine
05f98035ee = Implement thread-safe versions of the getpwent(3) and getgrent(3)
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
2003-04-17 14:15:26 +00:00
Jacques Vidrine
46d9306383 = Implement name service switch modules (NSS modules). NSS modules
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
2003-04-17 14:14:22 +00:00
Tim J. Robbins
a40248455d Return "/boot/kernel/kernel" instead of "/kernel" if the sysctl() call
fails. The documentation was incorrectly updated in getbootfile.3 rev. 1.10.
2003-04-11 13:54:28 +00:00
Matthew N. Dodd
196f440aa2 Bump the date. 2003-04-07 22:59:12 +00:00
Matthew N. Dodd
564b641ef9 Clarify the behavior of PATH_FSTAB with regard to 'tainted' execution.
Requested by:	 ru
2003-04-07 14:21:14 +00:00
Matthew N. Dodd
134dbc4c32 - Add setfstab() and getfstab().
- Use the environment variable 'PATH_FSTAB' if set rather than the
  hardcoded '/etc/fstab' (fstab.h:_PATH_FSTAB)
2003-04-07 12:55:00 +00:00
Jeff Roberson
cc3521d660 - Define a _spinunlock() function so that threading implementations may do
more complicated things than just setting the lock to 0.
 - Implement stubs for this function in libc and the two threading libraries
   that are currently in the tree.
2003-03-26 04:02:24 +00:00
Philippe Charnier
b43dc21149 The .Fn function
The ... 2 system call
2003-03-24 16:07:19 +00:00
Philippe Charnier
9d09157a0f The .Fn function. Use .Xr where appropriate. 2003-03-24 16:05:24 +00:00
Robert Drehmel
0d74f328ae - Revamp the function _nis_initshells() to make getusershell() backed
by NIS work, like nsswitch.conf(5) promises to be able to.
   (These modifications will be fed back to NetBSD, of course)
 - In endusershell(), do not set `sl' to NULL if we know it already has
   that value.
2003-03-19 14:17:24 +00:00
Robert Drehmel
916560b152 If realloc(3) fails in copyline(), do not make matters worse by
leaving without deallocating `data' thereby creating a memory leak.
2003-03-19 14:01:35 +00:00
Tim J. Robbins
be074a2dd8 Document return type of wordfree() (void). Reduce the space between
struct member names and the corresponding comments so the lines don't
wrap on 80-column terminals.
2003-03-13 11:18:53 +00:00
Jacques Vidrine
2bbd7cf820 Eliminate 19 warnings in libc (at level WARNS=2) of the
`implicit declaration of function' variety.
2003-02-27 13:40:01 +00:00
Ruslan Ermilov
5b58c5a0d5 Fixed copyright.
Tidy up the markup.
Only describe the new, post-2.0 behavior.
Added the RETURN VALUES and ERRORS sections.
2003-02-24 22:55:33 +00:00
Ruslan Ermilov
ace5be682d mdoc(7) police: Scheduled sweep. 2003-02-24 22:53:26 +00:00
Ruslan Ermilov
522ccf3f35 mdoc(7) police: markup laundry. 2003-02-23 01:47:49 +00:00
Mike Heffner
ad4f17067f More changes from NetBSD:
* use correct error detection of realloc failure
     * strtol negative return check
     * use strtol to validate string instead of rolling our own
       validation code
     * terminate the command sequence correctly
2003-02-23 00:24:03 +00:00
Mike Heffner
215d1a9eb1 Grab some changes from NetBSD:
fix const poisoning
     add cast to silence warning
     pull in unistd.h
2003-02-23 00:06:35 +00:00
Dave Zarzycki
a23c6aee4d Apple PR-2449102: getdomainname() doesn't document that it is NIS/YP specific 2003-02-22 19:02:23 +00:00
Alexey Zelkin
e859833529 Mention that dlerror() is also applicable to retrieve error message after
dladdr() and dlinfo() functions calls.
2003-02-21 13:43:41 +00:00
Jacques Vidrine
6d7bd75a4e Whack 28 unused variables. 2003-02-18 13:39:52 +00:00
Jacques Vidrine
e0554a531f Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).
Only warnings that could be fixed without changing the generated object
code and without restructuring the source code have been handled.

Reviewed by:	/sbin/md5
2003-02-16 17:29:11 +00:00
Alexey Zelkin
02e6893b9c Add dlinfo(3) manual page to the rank of base system manpages 2003-02-15 10:52:46 +00:00
Alexey Zelkin
f734492604 Add examples of dlinfo() usage to manual page. 2003-02-15 10:51:05 +00:00
Alexey Zelkin
7ec37597d3 o Document that dlsym()'s behaviour with new special handle RTLD_SELF
o Add cross reference to dlinfo(3)
o Minor mdoc nits
2003-02-14 10:57:20 +00:00
Alexey Zelkin
6bc55edb4c Follow Solaris's manual page and describe Link_map structure here 2003-02-14 10:54:37 +00:00
Alexey Zelkin
8647a1ed45 Add manual page for dlinfo(3). It's still need some work and add
examples, but it's better than nothing already.
2003-02-14 10:07:43 +00:00
Alexander Kabaev
42d206e975 Implement dlinfo() function.
Introdice RTLD_SELF special handle and properly process it within
dlsym() and dlinfo() functions.

The intention is to improve our compatibility with Solaris and
to make a Java port easier.

Partially submitted by:	phantom
2003-02-13 17:47:44 +00:00
Mike Barcroft
5d62092f94 o Implement C99 classification macros isfinite(), isinf(), isnan(),
isnormal().  The current isinf() and isnan() are perserved for
  binary compatibility with 5.0, but new programs will use the macros.
o Implement C99 comparison macros isgreater(), isgreaterequal(),
  isless(), islessequal(), islessgreater(), isunordered().

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
2003-02-12 20:03:41 +00:00
Mike Barcroft
1006f448b7 This manual is called SIGNBIT(3) not FPCLASSIFY(3). 2003-02-12 03:29:39 +00:00
Mike Barcroft
8e9b28311e Implement C99's signbit() macro. 2003-02-11 21:56:21 +00:00
Alfred Perlstein
e6cfb1ccd3 Handle %%m properly in syslog format string. Previously it would expand
the %m into the errno and then vfprintf would expand the % and the first
character of the strerror(3) return causing possible data corruption.
2003-02-10 08:31:28 +00:00
Mike Barcroft
8cf5ed5125 Implement fpclassify():
o Add a MD header private to libc called _fpmath.h; this header
  contains bitfield layouts of MD floating-point types.
o Add a MI header private to libc called fpmath.h; this header
  contains bitfield layouts of MI floating-point types.
o Add private libc variables to lib/libc/$arch/gen/infinity.c for
  storing NaN values.
o Add __double_t and __float_t to <machine/_types.h>, and provide
  double_t and float_t typedefs in <math.h>.
o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF,
  HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to
  <math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via
  <machine/float.h>.
o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based
  on the size of its argument.  __fpclassifyl() is never called on
  alpha because (sizeof(long double) == sizeof(double)), which is good
  since __fpclassifyl() can't deal with such a small `long double'.

This was developed by David Schultz and myself with input from bde and
fenner.

PR:		23103
Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
		(significant portions)
Reviewed by:	bde, fenner (earlier versions)
2003-02-08 20:37:55 +00:00
Mike Heffner
5a63c107db Grammer fix. 2003-02-04 16:28:04 +00:00
Tom Rhodes
61827fde23 Add getosreldate.3 to the Makefile. 2003-01-30 21:38:39 +00:00
Tom Rhodes
a117d47242 Add a manual page for getosreldate.c.
PR:		46365
Submitted by:	gioria (original version)
OK'ed by:	alfred (older version)
2003-01-30 21:37:06 +00:00
Alfred Perlstein
b17c9cfa5e Add const qualifier to data argument for msgsnd.
PR: standards/45274
Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-01-26 20:09:34 +00:00
David E. O'Brien
0f38d8d9aa Sync with NetBSD -- sl_add() now returns an int. 2003-01-19 01:16:01 +00:00
Tim J. Robbins
5b8dbaa1f9 Add a missing word. 2003-01-15 09:48:15 +00:00
Tim J. Robbins
bae7e9ec5e Document the named semaphore functions. This could still use a bit
of polishing.
2003-01-15 03:07:40 +00:00
Tim J. Robbins
74e03642ee Back out previous; sharing semaphores between processes only works
in certain special cases.
2003-01-14 07:14:06 +00:00
Tim J. Robbins
ab099bd309 Sharing semaphores between processes works now, so remove the stale comments
about it always returning EPERM. Document that ENFILE occurs when the
limit on kernel semaphores is reached.
2003-01-14 04:12:33 +00:00
Tim J. Robbins
51f2ddd7af Cross reference sem(4) so users know which kernel options are required
to use these semaphore functions.
2003-01-14 03:39:09 +00:00
Tim J. Robbins
a91b25dc1c Add the newly created semaphore to the named semaphore list in sem_open()
so that multiple opens of the same semaphore without an intervening
sem_close() return the same object, and so that sem_close() does not
segfault while trying to remove the item from the list.
2003-01-14 03:36:45 +00:00
Tim J. Robbins
098b8611cb Avoid a memory leak by using reallocf() instead of realloc(). 2003-01-10 02:58:25 +00:00
Tim J. Robbins
73e8989de8 Prototype __getcwd() to avoid a warning. 2003-01-10 02:54:37 +00:00
Tim J. Robbins
826f01cb9e #include <ctype.h> for prototypes (or macro versions) of
tolower() and isdigit().
2003-01-10 02:46:32 +00:00