OpenBSD CVS

CVS log for src/lib/libutil/util.h


[BACK] Up to [local] / src / lib / libutil

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.38 / (download) - annotate - [select for diffs], Wed May 11 17:23:56 2022 UTC (2 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Mark pw_error as __dead in prototype to match the function definition.
From Matthew Martin.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Apr 20 14:00:19 2022 UTC (2 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.36: +8 -6 lines
Diff to previous 1.36 (colored)

Make the termp and winp arguments for openpty, et al. const.
This matches the prototypes in glibc and musl libc.
From Matthew Martin. OK tb@

Revision 1.36 / (download) - annotate - [select for diffs], Fri Aug 30 03:57:56 2019 UTC (4 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

uucplock(3) is incorrectly named in some places, it is actually uu_lock(3)
(more unclear is if anything in ports uses this, as our base no longer does)

Revision 1.35 / (download) - annotate - [select for diffs], Thu Apr 20 17:48:30 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.34: +5 -1 lines
Diff to previous 1.34 (colored)

Add getptmfd(), fdopenpty(), fdforkpty() functions. These allow programs
to separate the open(/dev/ptm) from the ioctl(PTMGET) for privilege
separation or pledge().

Based on a diff from reyk@.

ok deraadt millert

Revision 1.34 / (download) - annotate - [select for diffs], Mon Jun 3 21:07:02 2013 UTC (11 years ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.33: +5 -3 lines
Diff to previous 1.33 (colored)

Add bcrypt_pbkdf, a password based key derivation function using bcrypt.
Technically, it's a slight variant of bcrypt better suited for use as a
pluggable hash with PKCS #5 PBKDF2.
ok djm
(also tweak pkcs5_pbkdf2() prototype to have consistent types.)

Revision 1.33 / (download) - annotate - [select for diffs], Wed Dec 5 23:20:06 2012 UTC (11 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.32: +1 -2 lines
Diff to previous 1.32 (colored)

Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis

Revision 1.32 / (download) - annotate - [select for diffs], Sun Sep 9 18:08:21 2012 UTC (11 years, 8 months ago) by matthew
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Use "unsigned int" instead of BSD "u_int" in <util.h> so that it can
be included in source files that specify POSIX source.  libutil isn't
a standard POSIX library, but no need to be gratuitously incompatible.
Fixes x11/st.

ok tedu, guenther, kettenis

Revision 1.31 / (download) - annotate - [select for diffs], Thu Sep 6 19:41:59 2012 UTC (11 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.30: +4 -1 lines
Diff to previous 1.30 (colored)

move pkcs5_pbkdf5 function to libutil so everybody can play with it
ok deraadt jsing matthew

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jul 9 14:26:40 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.29: +9 -10 lines
Diff to previous 1.29 (colored)

ANSIfy forkpty, add missing $OpenBSD$ in duid.c, style (no arg names) in
util.h.

ok guenther

Revision 1.29 / (download) - annotate - [select for diffs], Fri Dec 17 19:35:34 2010 UTC (13 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

opendev() path argument should be const.  OK deraadt@

Revision 1.28 / (download) - annotate - [select for diffs], Mon Nov 15 15:07:40 2010 UTC (13 years, 6 months ago) by jsing
Branch: MAIN
Changes since 1.27: +1 -0 lines
Diff to previous 1.27 (colored)

Factor out DUID identification code so that it can easily be reused.

ok krw@

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jun 14 02:14:25 2006 UTC (17 years, 11 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.26: +1 -2 lines
Diff to previous 1.26 (colored)

Nuke only two uses of OPENDEV_DRCT in tree. Nuke OPENDEV_DRCT. Long
marked obsolete since the opendev() behaviour it turned on is now the
default.

'it can go' deraadt@

'no API of mine has ever made it into a standard' downsj@

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jul 13 21:09:48 2004 UTC (19 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.25: +1 -2 lines
Diff to previous 1.25 (colored)

passwd.conf has been deprecated since login.conf was imported.
Today it finally dies.  Based on a diff from Gabriel Kihlman.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Apr 20 23:20:07 2004 UTC (20 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Change pw_copy(3) to take a 3rd arguement, the existing passwd entry.
This allows an application to only update a password entry if it is
in the state it expects.  Additionally, if the old passwd struct
is specified the new one may have a different pw_name field since
matching is done on the original.  Adapted from FreeBSD.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Jun 2 20:18:42 2003 UTC (21 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.23: +2 -6 lines
Diff to previous 1.23 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.23 / (download) - annotate - [select for diffs], Thu May 15 01:26:26 2003 UTC (21 years ago) by ian
Branch: MAIN
Changes since 1.22: +8 -1 lines
Diff to previous 1.22 (colored)

New: fmt_scaled() and scan_scaled() convert to and from "human readable"
or scaled numbers. fmt_scaled, and the format, based on Ken Stailey's
code for "df -h"; scan_scaled is new. Significantly commented on
and reworked by pjanzen@; other comments from millert@.  OK pjanzen@.

Revision 1.22 / (download) - annotate - [select for diffs], Fri Jun 21 16:37:11 2002 UTC (21 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.21: +3 -4 lines
Diff to previous 1.21 (colored)

login_fbtab(3) fixes:
o make first arg const since we don't modify it
o use strsep() instead of strtok() as strtok() changes internal state
o add some bounds checking and use strlcat() instead of pointer arithmetic
o ANSI function headers
Originally based on a patch from Lars J. Buitinck but much modified.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jun 9 22:18:43 2002 UTC (21 years, 11 months ago) by fgsch
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

some -Wall and spaces cleanup, scsi.c left.
some brave soul should look at it.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Feb 17 19:42:26 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.19: +5 -5 lines
Diff to previous 1.19 (colored)

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)

Revision 1.19 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:29 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.18: +30 -30 lines
Diff to previous 1.18 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Sep 29 17:45:36 2001 UTC (22 years, 8 months ago) by jakob
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.17: +1 -0 lines
Diff to previous 1.17 (colored)

re-enable pidfile(3). ok millert@

Revision 1.17 / (download) - annotate - [select for diffs], Sat Sep 29 11:07:01 2001 UTC (22 years, 8 months ago) by matthieu
Branch: MAIN
Changes since 1.16: +1 -2 lines
Diff to previous 1.16 (colored)

zap pidfile from here too, until conflict with kerberosV is fixed ok deraadt@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Sep 28 20:32:19 2001 UTC (22 years, 8 months ago) by jakob
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

add pidfile(3) prototype

Revision 1.15 / (download) - annotate - [select for diffs], Thu Aug 16 18:24:32 2001 UTC (22 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Add new 'secureonly' arg to pw_mkdb() to correspond to pwd_mkdb's new -s
flag and crank the library major due to the interface change.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Aug 12 22:00:34 2001 UTC (22 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.13: +27 -19 lines
Diff to previous 1.13 (colored)

Get rid of extraneous #includes by using stub struct declarations.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jun 10 02:44:42 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

proto; S@mSmith.net

Revision 1.12 / (download) - annotate - [select for diffs], Sun Nov 26 01:27:19 2000 UTC (23 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

login_check_expire(3), a helper function for use with BSD authentication.
This lives in libutil because it uses pw_lock(3) and friends.  Needs
a man page (soon!).

Revision 1.11 / (download) - annotate - [select for diffs], Sun Nov 26 01:25:33 2000 UTC (23 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Add a username argument to pw_mkdb to match 'pwd_mkdb -u username'.
Crank the shlib major number due to the interface change.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Apr 30 18:44:44 2000 UTC (24 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored)

Add OPENDEV_BLCK

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jul 20 16:38:57 1999 UTC (24 years, 10 months ago) by jakob
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.8: +12 -1 lines
Diff to previous 1.8 (colored)

Added fparseln from NetBSD.
ok deraadt@

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jun 8 20:28:28 1998 UTC (26 years ago) by brian
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (colored)

Add uu_lock_txfr() for donating locks to another process.
Reviewed by: Theo

Revision 1.7 / (download) - annotate - [select for diffs], Sun Nov 9 00:29:14 1997 UTC (26 years, 6 months ago) by bri
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.6: +13 -1 lines
Diff to previous 1.6 (colored)

Introduce uu_lock(), uu_unlock() and uu_lockerr()
into libutil.
Obtained from: FreeBSD
Reviewed by: Theo

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jun 17 10:10:43 1997 UTC (26 years, 11 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.5: +3 -1 lines
Diff to previous 1.5 (colored)

Add support to handle password files in directories other than /etc

Revision 1.5 / (download) - annotate - [select for diffs], Sun Feb 16 19:59:23 1997 UTC (27 years, 3 months ago) by provos
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

added password configuration access function, used to determine
password cipher type at the moment

Revision 1.4 / (download) - annotate - [select for diffs], Mon Dec 23 07:43:42 1996 UTC (27 years, 5 months ago) by downsj
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

readlabelfs() takes two arguments now, update prototype, inc major number.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Dec 3 01:05:36 1996 UTC (27 years, 6 months ago) by downsj
Branch: MAIN
Changes since 1.2: +7 -6 lines
Diff to previous 1.2 (colored)

Add readlabelfs().

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jul 31 17:44:22 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

login_fbtab() in libutil

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 17 07:46:05 1996 UTC (27 years, 11 months ago) by downsj
Branch: MAIN

util.h: new resting place
opendev.h: ok, so I merged it with util.h
opendev.h: use util.h
everything else: use "util.h"

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.