git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9470 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-01-11 16:16:30 +00:00
parent d94120b558
commit 130cb6b3fc
11 changed files with 53 additions and 57 deletions

View File

@@ -11,8 +11,8 @@
.Nm k_afs_cell_of_file ,
.Nm krb_afslog ,
.Nm krb_afslog_uid
\" .Nm krb5_afslog ,
\" .Nm krb5_afslog_uid
.\" .Nm krb5_afslog ,
.\" .Nm krb5_afslog_uid
.Nd AFS library
.Sh SYNOPSIS
.Fd #include <kafs.h>
@@ -30,10 +30,10 @@
.Fn krb_afslog "char *cell" "char *realm"
.Ft int
.Fn krb_afslog_uid "char *cell" "char *realm" "uid_t uid"
\" .Ft krb5_error_code
\" .Fn krb5_afslog_uid "krb5_context context" "krb5_ccache id" "const char *cell" "krb5_const_realm realm" "uid_t uid"
\" .Ft krb5_error_code
\" .Fn krb5_afslog "krb5_context context" "krb5_ccache id" "const char *cell" "krb5_const_realm realm"
.\" .Ft krb5_error_code
.\" .Fn krb5_afslog_uid "krb5_context context" "krb5_ccache id" "const char *cell" "krb5_const_realm realm" "uid_t uid"
.\" .Ft krb5_error_code
.\" .Fn krb5_afslog "krb5_context context" "krb5_ccache id" "const char *cell" "krb5_const_realm realm"
.Sh DESCRIPTION
.Fn k_hasafs
initializes some library internal structures, and tests for the
@@ -41,7 +41,7 @@ presense of AFS in the kernel, none of the other functions should be
called before
.Fn k_hasafs
is called, or if it fails.
.Pp
.Fn krb_afslog ,
and
.Fn krb_afslog_uid
@@ -66,22 +66,22 @@ field in the token,
.Fn krb_afslog_uid
will use
.Fa uid .
\" .Fn krb5_afslog ,
\" and
\" .Fn krb5_afslog_uid
\" are the Kerberos 5 equivalents of
\" .Fn krb_afslog ,
\" and
\" .Fn krb_afslog_uid .
\" The extra arguments are the ubiquitous context, and the cache id where
\" to store any obtained tickets. Since AFS servers normally can't handle
\" Kerberos 5 tickets directly, these functions will first obtain version
\" 5 tickets for the requested cells, and then convert them to version 4
\" tickets, that can be stashed in the kernel. To convert tickets the
\" .Fn krb524_convert_creds_kdc
\" function will be used.
.Pp
.\" .Fn krb5_afslog ,
.\" and
.\" .Fn krb5_afslog_uid
.\" are the Kerberos 5 equivalents of
.\" .Fn krb_afslog ,
.\" and
.\" .Fn krb_afslog_uid .
.\" The extra arguments are the ubiquitous context, and the cache id where
.\" to store any obtained tickets. Since AFS servers normally can't handle
.\" Kerberos 5 tickets directly, these functions will first obtain version
.\" 5 tickets for the requested cells, and then convert them to version 4
.\" tickets, that can be stashed in the kernel. To convert tickets the
.\" .Fn krb524_convert_creds_kdc
.\" function will be used.
.\" .Pp
.Fn k_afs_cell_of_file
will in
.Fa cell
@@ -89,23 +89,22 @@ return the cell of a specified file, no more than
.Fa len
characters is put in
.Fa cell .
.Pp
.Fn k_pioctl
does a
.Fn pioctl
syscall with the specified arguments. This function is equivalent to
.Fn lpioctl .
.Pp
.Fn k_setpag
initializes a new PAG.
.Pp
.Fn k_unlog
removes destroys all tokens in the current PAG.
.Sh ENVIRONMENT
The following environment variable affect the mode of operation of
.Nm kafs :
.Bl -tag
.Bl -tag -width AFS_SYSCALL
.It Ev AFS_SYSCALL
Normally,
.Nm kafs

View File

@@ -9,13 +9,10 @@
.Nd collect command line options
.Sh SYNOPSIS
.Fd #include <getarg.h>
.Ft int
.Fn getarg "struct getargs *args" "size_t num_args" "int argc" "char **argv" "int *optind"
.Ft void
.Fn arg_printusage "struct getargs *args" "size_t num_args" "const char *progname" "const char *extra_string"
.Sh DESCRIPTION
.Fn getarg
collects any command line options given to a program in an easily used way.
@@ -45,7 +42,8 @@ take the same
and
.Fa num_args
as getarg;
.Fa progname is the name of the program (to be used in the help text), and
.Fa progname
is the name of the program (to be used in the help text), and
.Fa extra_string
is a string to print after the actual options to indicate more
arguments. The usefulness of this function is realised only be people
@@ -55,7 +53,6 @@ the code does.
The
.Fa getargs
struct has the following elements.
.Bd -literal
struct getargs{
const char *long_name;
@@ -176,7 +173,7 @@ and
.Fa *optarg ,
but to do this correct you (more or less) have to know about the inner
workings of getarg.
.Pp
You can skip parts of arguments by increasing
.Fa *optarg
(you could
@@ -233,8 +230,6 @@ and if you're really confused you can do it multiple times
.Pf ( Fl -no-no-help= Ns Ar false ,
or even
.Fl -no-no-help= Ns Ar maybe ) .
.Pp
.Sh EXAMPLE
.Bd -literal
#include <stdio.h>
@@ -276,11 +271,11 @@ main(int argc, char **argv)
exit (0);
}
if (destination == NULL) {
fprintf(stderr, "%s: must specify destination\n", progname);
fprintf(stderr, "%s: must specify destination\en", progname);
exit(1);
}
if (strcmp(source, destination) == 0) {
fprintf(stderr, "%s: destination must be different from source\n");
fprintf(stderr, "%s: destination must be different from source\en");
exit(1);
}
/* include more stuff here ... */
@@ -298,7 +293,6 @@ Usage: ship++ [--source=city] [-s city] [--destination=city] [-d city]
-w tons, --weight=tons weight of shippment
-c, --no-catalog include product catalog
.Ed
.Sh BUGS
It should be more flexible, so it would be possible to use other more
complicated option syntaxes, such as what