Commit Graph

78 Commits

Author SHA1 Message Date
christos
80a7733395 Add kinfo_getvmmap from FreeBSD 2015-09-24 14:39:20 +00:00
kamil
2cf5f6af2b Add ereallocarr(3) to libutil
ereallocarr(3) wraps reallocarr(3) and embeds return status validation.

Older version reviewed by <riastradh> and <christos>
2015-07-26 02:20:30 +00:00
christos
57b77f77cd add estro{i,u} (Kamil Rytarowski) 2015-01-18 18:09:36 +00:00
christos
d93337995d document login_getpwclass(3) 2013-06-20 20:42:30 +00:00
matt
b1fc4bee02 Add getbyteorder() call. 2013-05-02 07:17:09 +00:00
christos
1e9ca58635 - add getdiskrawname.
- exit on error for lint.
2012-04-07 16:44:39 +00:00
christos
29484ab26f add getfsspecname 2012-04-07 04:04:21 +00:00
matt
fa835e8c8b These directories default to WARNS?=5 2012-03-21 05:37:42 +00:00
christos
89cf253562 - add strspct
- be explicit about string not being NUL terminated if bufsiz == 0
2012-01-07 18:40:55 +00:00
christos
da80e3ab34 add manual page 2011-11-13 22:03:34 +00:00
christos
b51eeccc62 Add proc_compare 2011-10-21 02:05:36 +00:00
christos
c9db7e91c5 Don't use = to assing SRCS, but += so that we can remove snprintb.c,
which was added elsewhere.
2011-10-21 01:37:59 +00:00
bouyer
a47e2eb758 Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
2011-08-30 12:39:49 +00:00
jruoho
1d9550a5a1 Build libutil(3) as a link to util(3). 2011-08-29 12:37:52 +00:00
christos
e7295d23ac add strpct, requested by joerg 2011-08-28 07:45:13 +00:00
drochner
7033707525 retire pw_policy(3) -- it is not found useful, there are other
(more common) ways to enforce a password strength policy
approved by elad
2010-01-27 19:10:30 +00:00
christos
87fe4621ba add a link to pw_copyx; from anon ymous 2009-06-20 14:28:29 +00:00
pgoyette
28469fc250 Implement snprintb_m(3) to provide multi-line bit/bit-field decode.
Discussed on tech-kern.
2009-05-13 02:50:31 +00:00
lukem
53ff085f8b WARNS=4 2009-01-18 12:13:32 +00:00
christos
50728e7823 merge christos-time_t 2009-01-11 02:57:17 +00:00
christos
16338b1c19 document pw_getpwconf. 2008-12-26 00:49:28 +00:00
christos
c057bf8352 move snprintb to common 2008-12-16 22:34:40 +00:00
lukem
e9aa053c09 Add raise_default_signal(3) -- raise the default signal handler.
Can be used by applications that have their own SIGINT (et al)
handlers and want to exit in a manner that correctly
signals to the parent that the process was terminated by a signal.
See http://www.cons.org/cracauer/sigint.html for more info.
Discussed on tech-userlevel@.
2007-09-25 01:13:54 +00:00
pooka
060d8639e3 add estrndup() 2007-07-01 21:41:16 +00:00
christos
33d6b113f2 moved string_to_flags and flags_to_string from ls to libutil. 2006-12-14 19:18:01 +00:00
christos
61261c8531 rename getdate to parsedate to avoid conflict with posix function 2006-11-20 20:33:02 +00:00
christos
ba26b607a4 add getdate. 2006-11-17 22:10:23 +00:00
christos
8c97c569de include ecalloc() from our anonymous user. 2006-10-20 17:40:39 +00:00
christos
e72710e561 Add efun(3) 2006-08-26 18:11:12 +00:00
elad
44b5bc7c94 Add pw_policy.3.
From Hisashi T Fujinaka, thanks!
2005-09-14 18:45:40 +00:00
elad
8d6270e665 Introduce pw_policy(3), an easily extendable way of defining password
policies and enforcing them in programs.

Man-page written with much help and tips from David Maxwell, Hubert
Feyrer, and Thomas Klausner.

This bumps libutil minor to 7.

XXX: Need default policy to go in /etc/passwd.conf, and integration
     into local/yp/PAM password changing code.

PR/10206.
2005-09-14 11:36:52 +00:00
christos
a5c1a01ed9 WARNS=3; fix cast-qual issues. 2004-12-11 06:41:15 +00:00
christos
1fe49f768f Add a manual page. 2004-11-20 03:06:09 +00:00
christos
eb6484700a Add sockaddr_snprintf; XXX: Needs a man page. 2004-11-19 21:37:19 +00:00
dsl
ece723d1ec Add if_media.c, functions for converting media to/from strings.
(from ifconfig.c)
2004-11-11 20:36:28 +00:00
jdolecek
1edd42a9d2 move getmntopts(3) to libutil, build and install also it's manpage
bump libutil minor
adjust individual mount_*/Makefile to use libutil getmntopts(3)
2003-03-22 12:43:57 +00:00
scw
0c83fd4944 Add getlabelsector() and getlabeloffset() as wrappers around the
KERN_LABELSECTOR and KERN_LABELOFFSET sysctls.
2002-12-12 09:45:32 +00:00
lukem
b1e79510cf - Migrate fparseln(3) from libutil to libc, where it should have been in
the first place...
- Bump libutil major (to 7.0) and libc minor (to 12.91).
2002-11-30 03:04:44 +00:00
elric
448f621758 Added two functions disklabel_dkcksum() and disklabel_scan() to libutil
so that they can be shared by disklabel(8) and cgdconfig(8).
2002-10-12 20:53:15 +00:00
jdolecek
961e3a840f put utmpx/wtmpx routines to separate files, so that programs overriding the
utmp/wtmp routines could still be linked static
fixes e.g. static build of ftpd
2002-09-27 20:42:46 +00:00
wiz
4a47c952db Add documentation for utmpx and some related functions.
Thanks for some explanations to christos, and for some STANDARDS hints
to Klaus Klein.
2002-09-27 15:02:24 +00:00
christos
4ac3045a5a Add snprintb(3) inspired from bitmask_snprintf(9), but made to look like
more like snprintf(3). Discussed with thorpej.
2002-09-20 21:10:10 +00:00
abs
a086fb2909 Move humanize_number(3) from libutil to libc as per discussion on tech-misc
Revert minor number bump on libutil (with note to skip it next update), and
bump libc.
2002-08-22 17:24:08 +00:00
lukem
ec5dbc56b8 Explicitly move setting of NOxxx and USE_SHLIBDIR to the top of the
Makefile (before including <bsd.own.mk>)
2002-08-19 14:55:14 +00:00
lukem
ebb6fc9eb8 Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path (etc).
(Reduces make output by ~ 20%)
2002-08-19 09:41:27 +00:00
abs
35a808e4e8 Add humanize_number.3 from Tomas Svensson in PR lib/15508.
Bump version of libutil
2002-08-08 16:50:35 +00:00
lukem
efcc9a4c9d * Add user-controlled mk.conf variables
- SHLIBDIR	Location to install shared libraries if ${USE_SHLIBDIR}
			is "yes".  Defaults to "/usr/lib".

	- USE_SHLIBDIR	If "yes", install shared libraries in ${SHLIBDIR}
			instead of ${LIBDIR}.  Defaults to "no".
			Sets ${_LIBSODIR} to the appropriate value.
			This may be set by individual Makefiles as well.

	- SHLINKDIR	Location of shared linker.  Defaults to "/usr/libexec".
			If != "/usr/libexec", change the dynamic-linker
			encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
	libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
	libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
  to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

  1.)	If nothing is set or changed, there is no change from the
	current behaviour:
		- Static /bin, /sbin, and bits of /usr/*
		- Dynamic rest
		- Shared linker is /usr/libexec/ld*so

  2.)	If the following make variables are set:
		LDSTATIC=
		SHLINKDIR=/lib
		SHLIBDIR=/lib
	Then the behaviour becomes:
		- Dynamic tools
		- .so libraries used by /bin and /sbin are installed to /lib,
		  with symlinks from /usr/lib/lib*so to -> /lib/lib*so
		  where appropriate
		- Shared linker is /lib/ld*so

  3.)	As per 2.), but add the following variable:
		USE_SHLIBDIR=yes
	This forces all .so's to be instaleld in /lib (with compat
	symlinks), not just those tagged by their Makefiles to be.
	Again, compat symlinks are installed
2001-12-28 01:32:37 +00:00
gmcgarry
f830776687 Add a catch-all man page for libutil. 2001-11-23 06:20:37 +00:00
wiz
f19d54840a Rename secure_path(3) source file from securepath.c to secure_path.c. 2001-08-20 14:47:49 +00:00
wiz
b1593d9814 Add getbootfile(3) to libutil, and a man page.
Bump libutil version to 5.5.
2001-04-06 14:31:14 +00:00