Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man2/shmgetlabel.2
Real path: /usr/share/man/man2/shmgetlabel.2
Zurück
'\" te .\" Copyright (c) 2015, 2020, Oracle and/or its affiliates. .TH shmgetlabel 2 "17 Sep 2020" "Oracle Solaris 11.4" "System Calls" .SH NAME shmgetlabel, shmsetlabel \- labeling interfaces for IPC shared memory .SH SYNOPSIS .LP .nf #include <sys/shm.h> \fBint\fR \fBshmgetlabel\fR(\fBint\fR \fIshmid\fR, \fBm_label_t *\fR\fIlabel\fR); \fBint\fR \fBshmsetlabel\fR(\fBint\fR \fIshmid\fR, \fBm_label_t *\fR\fIlabel\fR); .fi .SH DESCRIPTION .sp .LP The \fBshmgetlabel()\fR and \fBshmsetlabel()\fR functions get and set the labels of shared memory segments. Labels provide another access control mechanism in addition to the permission bits that are managed via \fBshmctl\fR(2). In order to access a shared memory segment the current process clearance must dominate the label associated with \fBshmid\fR. See \fBclearance\fR(7) and \fBlabels\fR(7) for more information. .sp .LP The default label for all shared memory segments is \fBADMIN_LOW\fR, which is dominated by every process clearance. The access policy only becomes effective when a new label is assigned using the \fBshmsetlabel()\fR function. .sp .LP Labels cannot be changed while any process is attached to \fBshmid\fR. To set a label the current process clearance must dominate both the new label and the current label of \fBshmid\fR. In addition, the effective user ID must be equal to the value of \fBshm_perm.cuid\fR or \fBshm_perm.uid\fR in the data structure associated with \fBshmid\fR. .sp .LP The \fBshmgetlabel()\fR and \fBshmsetlabel()\fR functions are not supported when Trusted Extensions is enabled. .SH RETURN VALUES .sp .LP Upon successful completion, \fB0\fR is returned. Otherwise, \fB-1\fR is returned and \fBerrno\fR is set to indicate the error. .SH ERRORS .sp .LP The \fBshmgetlabel()\fR and \fBshmsetlabel()\fR functions will fail if: .sp .ne 2 .mk .na \fB\fBEACCES\fR\fR .ad .RS 11n .rt The existing \fBshmid\fR label is not dominated by the process clearance. .RE .sp .ne 2 .mk .na \fB\fBEBUSY\fR\fR .ad .RS 11n .rt A process is currently attached to the shmid. .RE .sp .ne 2 .mk .na \fB\fBEFAULT\fR\fR .ad .RS 11n .rt The label argument points to an illegal address. .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 11n .rt The \fBshmid\fR argument is not a valid shared memory identifier or the specified label is not dominated by the process clearance. .RE .sp .ne 2 .mk .na \fB\fBENOTSUP\fR\fR .ad .RS 11n .rt Trusted Extensions is enabled. .RE .sp .ne 2 .mk .na \fB\fBEPERM\fR\fR .ad .RS 11n .rt The function is \fBshmsetlabel()\fR and the effective user ID of the calling process is not equal to the value of \fBshm_perm.cuid\fR or \fBshm_perm.uid\fR in the data structure associated with \fBshmid\fR, and \fBPRIV_IPC_OWNER\fR is not asserted in the effective set of the calling process. .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 \fBipcs\fR(1), \fBshmctl\fR(2), \fBshmget\fR(2), \fBshmop\fR(2), \fBattributes\fR(7), \fBclearance\fR(7), \fBlabels\fR(7), \fBprivileges\fR(7) .SH HISTORY .sp .LP The \fBshmgetlabel()\fR and \fBshmsetlabel()\fR functions were added to Solaris in the Solaris 11.4.0 release.