Browse Source

Document isduid(3).

Tweaks from jmc@
ok jmc@ krw@
OPENBSD_4_9
jsing 13 years ago
parent
commit
96b190e24d
2 changed files with 64 additions and 3 deletions
  1. +3
    -3
      src/lib/libutil/Makefile
  2. +61
    -0
      src/lib/libutil/isduid.3

+ 3
- 3
src/lib/libutil/Makefile View File

@ -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


+ 61
- 0
src/lib/libutil/isduid.3 View File

@ -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 .

Loading…
Cancel
Save