summaryrefslogtreecommitdiff
path: root/usr/src/man/man3secdb/getexecattr.3secdb
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man3secdb/getexecattr.3secdb')
-rw-r--r--usr/src/man/man3secdb/getexecattr.3secdb49
1 files changed, 24 insertions, 25 deletions
diff --git a/usr/src/man/man3secdb/getexecattr.3secdb b/usr/src/man/man3secdb/getexecattr.3secdb
index 57cbf8cc14..6f68f50403 100644
--- a/usr/src/man/man3secdb/getexecattr.3secdb
+++ b/usr/src/man/man3secdb/getexecattr.3secdb
@@ -1,9 +1,10 @@
'\" te
+.\" Copyright 2018 Peter Tribble
.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH GETEXECATTR 3SECDB "May 27, 2014"
+.TH GETEXECATTR 3SECDB "Aug 13, 2018"
.SH NAME
getexecattr, free_execattr, setexecattr, endexecattr, getexecuser, getexecprof,
match_execattr \- get execution profile entry
@@ -51,7 +52,6 @@ cc [ \fIflag\fR... ] \fIfile\fR... -lsecdb -lsocket -lnsl [ \fIlibrary\fR...
.fi
.SH DESCRIPTION
-.sp
.LP
The \fBgetexecattr()\fR function returns a single \fBexec_attr\fR(4) entry.
Entries can come from any of the sources specified in the
@@ -60,19 +60,19 @@ Entries can come from any of the sources specified in the
.LP
Successive calls to \fBgetexecattr()\fR return either successive
\fBexec_attr\fR entries or \fINULL\fR. Because \fBgetexecattr()\fR always
-returns a single entry, the \fBnext\fR pointer in the \fBexecattr_t\fR data
+returns a single entry, the \fBnext\fR pointer in the \fBexecattr_t\fR data
structure points to \fINULL\fR.
.sp
.LP
The internal representation of an \fBexec_attr\fR entry is an \fBexecattr_t\fR
-structure defined in <\fBexec_attr.h\fR> with the following members:
+structure defined in <\fBexec_attr.h\fR> with the following members:
.sp
.in +2
.nf
char *name; /* name of the profile */
-char *type; /* type of profile */
char *policy; /* policy under which the attributes are */
/* relevant*/
+char *type; /* type of profile */
char *res1; /* reserved for future use */
char *res2; /* reserved for future use */
char *id; /* unique identifier */
@@ -116,7 +116,7 @@ corresponding profile entry is found in the \fBprof_attr\fR database are
returned.
.sp
.LP
-Using \fBgetexecuser()\fR and \fBgetexecprof()\fR, programmers can search for
+Using \fBgetexecuser()\fR and \fBgetexecprof()\fR, programmers can search for
any \fItype\fR argument, such as the manifest constant \fBKV_COMMAND\fR. The
arguments are logically AND-ed together so that only entries exactly matching
all of the arguments are returned. Wildcard matching applies if there is no
@@ -125,7 +125,7 @@ to indicate that it is not used as part of the matching criteria. The \fB\fR
search_flag controls whether the function returns the first match
(\fBGET_ONE\fR), setting the \fBnext\fR pointer to \fINULL\fR or all matching
entries (\fBGET_ALL\fR), using the \fBnext\fR pointer to create a linked list
-of all entries that meet the search criteria. See \fBEXAMPLES\fR.
+of all entries that meet the search criteria. See \fBEXAMPLES\fR.
.sp
.LP
Once a list of entries is returned by \fBgetexecuser()\fR or
@@ -138,14 +138,12 @@ criteria, only a pointer to the first entry is returned. The
\fBkva_match\fR(3SECDB) function can be used to look up a key in a key-value
array.
.SH RETURN VALUES
-.sp
.LP
Those functions returning data only return data related to the active policy.
-The \fBgetexecattr()\fR function returns a pointer to a \fBexecattr_t\fR if it
+The \fBgetexecattr()\fR function returns a pointer to a \fBexecattr_t\fR if it
successfully enumerates an entry; otherwise it returns \fINULL\fR, indicating
the end of the enumeration.
.SH USAGE
-.sp
.LP
The \fBgetexecattr()\fR, \fBgetexecuser()\fR, and \fBgetexecprof()\fR functions
all allocate memory for the pointers they return. This memory should be
@@ -158,7 +156,7 @@ Individual attributes may be referenced in the \fBattr\fR structure by calling
the \fBkva_match\fR(3SECDB) function.
.SH EXAMPLES
.LP
-\fBExample 1 \fRFind all profiles that have the \fBping\fR command.
+\fBExample 1 \fRFind all profiles that have the \fBping\fR command.
.sp
.in +2
.nf
@@ -188,7 +186,7 @@ profile.
.sp
.in +2
.nf
-if ((execprof=getexecprof("Filesystem Security", KV_NULL, NULL,
+if ((execprof=getexecprof("Filesystem Security", NULL, NULL,
GET_ALL))==NULL)) {
/* do error */
}
@@ -200,12 +198,6 @@ if ((execprof=getexecprof("Filesystem Security", KV_NULL, NULL,
wetmore. If there is no exact profile entry, the wildcard (*), if defined, is
returned.
.sp
-.LP
-The following tells if the \fBtar\fR utility is in a profile assigned to user
-wetmore. If there is no exact profile entry, the wildcard (*), if defined, is
-returned.
-
-.sp
.in +2
.nf
if ((execprof=getexecuser("wetmore", KV_COMMAND, "/usr/bin/tar",
@@ -216,13 +208,12 @@ if ((execprof=getexecuser("wetmore", KV_COMMAND, "/usr/bin/tar",
.in -2
.SH FILES
-.sp
.ne 2
.na
\fB\fB/etc/nsswitch.conf\fR\fR
.ad
.RS 29n
-configuration file lookup information for the name server switch
+configuration file lookup information for the name service switch
.RE
.sp
@@ -252,8 +243,16 @@ execution profiles
policy definitions
.RE
-.SH ATTRIBUTES
.sp
+.ne 2
+.na
+\fB\fB/etc/security/prof_attr\fR\fR
+.ad
+.RS 29n
+profile information
+.RE
+
+.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -269,8 +268,8 @@ MT-Level MT-Safe
.TE
.SH SEE ALSO
-.sp
.LP
-\fBgetauthattr\fR(3SECDB), \fBgetuserattr\fR(3SECDB), \fBkva_match\fR(3SECDB),
-\fBexec_attr\fR(4), \fBpasswd\fR(4), \fBpolicy.conf\fR(4), \fBprof_attr\fR(4),
-\fBuser_attr\fR(4), \fBattributes\fR(5)
+\fBgetauthattr\fR(3SECDB), \fBgetprofattr\fR(3SECDB), \fBgetuserattr\fR(3SECDB),
+\fBkva_match\fR(3SECDB), \fBexec_attr\fR(4), \fBpasswd\fR(4),
+\fBpolicy.conf\fR(4), \fBprof_attr\fR(4), \fBuser_attr\fR(4),
+\fBattributes\fR(5)