Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/./man2/getppriv.2
Real path: /usr/share/man/man2/getppriv.2
Zurück
'\" te .\" Copyright (c) 2004, 2023, Oracle and/or its affiliates. .TH getppriv 2 "30 Jan 2023" "Oracle Solaris 11.4" "System Calls" .SH NAME getppriv, setppriv \- get or set a privilege set .SH SYNOPSIS .LP .nf #include <priv.h> \fBint\fR \fBgetppriv\fR(\fBpriv_ptype_t\fR \fIwhich\fR, \fBpriv_set_t *\fR\fIset\fR); .fi .LP .nf \fBint\fR \fBsetppriv\fR(\fBpriv_op_t\fR \fIop\fR, \fBpriv_ptype_t\fR \fIwhich\fR, \fBpriv_set_t *\fR\fIset\fR); .fi .SH DESCRIPTION .sp .LP The \fBgetppriv()\fR function returns the process privilege set specified by \fIwhich\fR in the set pointed to by \fIset\fR. The memory for \fIset\fR must first be allocated with \fBpriv_allocset()\fR and later freed with \fBpriv_freeset()\fR. Both functions are documented on the \fBpriv_addset\fR(3C) manual page. .sp .LP The value of \fIwhich\fR must be one of \fBPRIV_EFFECTIVE\fR, \fBPRIV_INHERITABLE\fR, \fBPRIV_PERMITTED\fR, or \fBPRIV_LIMIT\fR, corresponding to the privilege sets defined in the \fBprivileges\fR(7) manual page. .sp .LP The \fBsetppriv()\fR function sets or changes the process privilege set. The \fIop\fR argument specifies the operation and can be one of \fBPRIV_OFF\fR, \fBPRIV_ON\fR or \fBPRIV_SET\fR. The \fIwhich\fR argument specifies the name of the privilege set. The \fIset\fR argument specifies the set. .sp .LP If \fIop\fR is \fBPRIV_OFF\fR, the privileges in \fIset\fR are removed from the process privilege set specified by \fIwhich\fR. There are no restrictions on removing privileges from process privileges sets, but the following apply: .RS +4 .TP .ie t \(bu .el o Privileges removed from \fBPRIV_PERMITTED\fR are silently removed from \fBPRIV_EFFECTIVE\fR. .RE .RS +4 .TP .ie t \(bu .el o If privileges are removed from \fBPRIV_LIMIT\fR, they are not removed from the other sets until one of the \fBexec\fR(2) or \fBspawn\fR(2) functions has successfully completed. .RE .sp .LP If \fIop\fR is \fBPRIV_ON\fR, the privileges in \fIset\fR are added to the process privilege set specified by \fIwhich\fR. The following operations are permitted: .RS +4 .TP .ie t \(bu .el o Privileges in \fBPRIV_PERMITTED\fR can be added to \fBPRIV_EFFECTIVE\fR without restriction. .RE .RS +4 .TP .ie t \(bu .el o Privileges in \fBPRIV_PERMITTED\fR can be added to \fBPRIV_INHERITABLE\fR without restriction. .RE .RS +4 .TP .ie t \(bu .el o All operations that attempt to add privileges that are already present are permitted. .RE .sp .LP If \fIop\fR is \fBPRIV_SET\fR, the privileges in \fIset\fR replace completely the process privilege set specified by \fIwhich\fR. \fBPRIV_SET\fR is implemented in terms of \fBPRIV_OFF\fR and \fBPRIV_ON\fR. The same restrictions apply. .SH RETURN VALUES .sp .LP Upon successful completion, 0 is returned. Otherwise, -1 is returned and \fBerrno\fR is set to indicate the error. .SH ERRORS .sp .LP The \fBgetppriv()\fR and \fBsetppriv()\fR functions will fail if: .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt The value of \fIop\fR or \fIwhich\fR is out of range. .RE .sp .ne 2 .mk .na \fB\fBEFAULT\fR\fR .ad .RS 10n .rt The \fIset\fR argument points to an illegal address. .RE .sp .LP The \fBsetppriv()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBEPERM\fR\fR .ad .RS 9n .rt The application attempted to add privileges to \fBPRIV_LIMIT\fR or \fBPRIV_PERMITTED\fR, or the application attempted to add privileges to \fBPRIV_INHERITABLE\fR or \fBPRIV_EFFECTIVE\fR which were not in \fBPRIV_PERMITTED\fR. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ MT-Level MT-Safe .TE .sp .SH SEE ALSO .sp .LP \fBpriv_addset\fR(3C), \fBattributes\fR(7), \fBprivileges\fR(7) .SH HISTORY .sp .LP The \fBgetppriv()\fR and \fBsetppriv()\fR functions were added to Solaris in Solaris 10 3/05.