diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2010-11-17 10:10:32 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2010-11-17 10:10:32 +0000 |
commit | 8f3bb3ce5095279e3dbd9ba5514900dbc1c1e7a8 (patch) | |
tree | 98b90fba3cffc2a1b5d765315d795c6a7242c29b /lib | |
parent | 8b944c1f645fcb65790425bff0493ee903c32ff5 (diff) |
Document isduid(3).
Tweaks from jmc@
ok jmc@ krw@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libutil/Makefile | 6 | ||||
-rw-r--r-- | lib/libutil/isduid.3 | 61 |
2 files changed, 64 insertions, 3 deletions
diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index b2599743785..b7b5f6dd505 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.32 2010/11/15 15:07:40 jsing Exp $ +# $OpenBSD: Makefile,v 1.33 2010/11/17 10:10:31 jsing Exp $ # $NetBSD: Makefile,v 1.8 1996/05/16 07:03:28 thorpej Exp $ LIB= util @@ -10,8 +10,8 @@ SRCS= check_expire.c duid.c getmaxpartitions.c getrawpartition.c login.c \ login_fbtab.c uucplock.c fparseln.c opendisk.c pidfile.c \ fmt_scaled.c imsg.c imsg-buffer.c -MAN= check_expire.3 getmaxpartitions.3 getrawpartition.3 login.3 opendev.3 \ - openpty.3 pw_init.3 pw_lock.3 readlabelfs.3 uucplock.3 \ +MAN= check_expire.3 getmaxpartitions.3 getrawpartition.3 isduid.3 login.3 \ + opendev.3 openpty.3 pw_init.3 pw_lock.3 readlabelfs.3 uucplock.3 \ fparseln.3 opendisk.3 login_fbtab.3 pidfile.3 fmt_scaled.3 imsg_init.3 MLINKS+=imsg_init.3 imsg_read.3 diff --git a/lib/libutil/isduid.3 b/lib/libutil/isduid.3 new file mode 100644 index 00000000000..f7248a519e4 --- /dev/null +++ b/lib/libutil/isduid.3 @@ -0,0 +1,61 @@ +.\" $OpenBSD: isduid.3,v 1.1 2010/11/17 10:10:31 jsing Exp $ +.\" +.\" * Copyright (c) Joel Sing <jsing@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: November 17 2010 $ +.Dt ISDUID 3 +.Os +.Sh NAME +.Nm isduid +.Nd disklabel UID test +.Sh SYNOPSIS +.Fd #include <util.h> +.Ft int +.Fn isduid "char *duid" "int dflags" +.Sh DESCRIPTION +The +.Fn isduid +function tests the string +.Fa duid +to see if it is a valid +.Xr disklabel 8 +UID. +The +.Fa dflags +are specified using the same flags as used by +.Xr opendev 3 . +.Pp +If the OPENDEV_PART flag is included in +.Fa dflags +the disklabel UID must consist of a 16-character hexadecimal string. +Otherwise the disklabel UID must consist of a 16-character hexidecimal string +followed by a +.Sq \&. +and a partition letter. +.Sh RETURN VALUES +The +.Fn isduid +function returns non-zero if +.Fa duid +is a valid DUID, otherwise zero is returned. +.Sh SEE ALSO +.Xr opendev 3 , +.Xr disklabel 5 , +.Xr disklabel 8 +.Sh HISTORY +The +.Fn isduid +function first appeared in +.Ox 4.9 . |