avc_compute_create(3) SELinux API documentation avc_compute_create(3)NAME
avc_compute_create, avc_compute_member - obtain SELinux label for new object
SYNOPSIS
#include <selinux/selinux.h>
#include <selinux/avc.h>
int avc_compute_create(security_id_t ssid, security_id_t tsid,
security_class_t tclass, security_id_t *newsid);
int avc_compute_member(security_id_t ssid, security_id_t tsid,
security_class_t tclass, security_id_t *newsid);
DESCRIPTION
avc_compute_create() is used to compute a SID to use for labeling a new object in a particular class based on a SID pair. This call is
identical to security_compute_create(), but does not require converting from userspace SID's to contexts and back again.
avc_compute_member() is used to compute a SID to use for labeling a polyinstantiated object instance of a particular class based on a SID
pair. This call is identical to security_compute_member(), but does not require converting from userspace SID's to contexts and back
again.
These functions return a SID for the computed context in the memory referenced by sid.
RETURN VALUE
On success, zero is returned. On error, -1 is returned and errno is set appropriately.
ERRORS
EINVAL The tclass and/or the security contexts referenced by ssid and tsid are not recognized by the currently loaded policy.
ENOMEM An attempt to allocate memory failed.
AUTHOR
Eamon Walsh <ewalsh@tycho.nsa.gov>
SEE ALSO avc_init(3), avc_context_to_sid(3), security_compute_create(3), selinux(8)
30 Mar 2007 avc_compute_create(3)
Check Out this Related Man Page
avc_context_to_sid(3) SELinux API documentation avc_context_to_sid(3)NAME
avc_context_to_sid, avc_sid_to_context, avc_get_initial_sid - obtain and manipulate SELinux security ID's.
SYNOPSIS
#include <selinux/selinux.h>
#include <selinux/avc.h>
int avc_context_to_sid(security_context_t ctx, security_id_t *sid);
int avc_sid_to_context(security_id_t sid, security_context_t *ctx);
int avc_get_initial_sid(const char *name, security_id_t *sid);
DESCRIPTION
Security ID's (SID's) are opaque representations of security contexts, managed by the userspace AVC.
avc_context_to_sid returns a SID for the given context in the memory referenced by sid.
avc_sid_to_context returns a copy of the context represented by sid in the memory referenced by ctx. The user must free the copy with
freecon(3).
avc_get_initial_sid returns a SID for the kernel initial security identifier specified by name.
RETURN VALUE
avc_context_to_sid and avc_sid_to_context return zero on success. On error, -1 is returned and errno is set appropriately.
ERRORS
ENOMEM An attempt to allocate memory failed.
NOTES
As of libselinux version 2.0.86, SID's are no longer reference counted. A SID will be valid from the time it is first obtained until the
next call to avc_destroy(3). The sidget and sidput functions, formerly used to adjust the reference count, are no-ops and are deprecated.
AUTHOR
Eamon Walsh <ewalsh@tycho.nsa.gov>
SEE ALSO avc_init(3), avc_has_perm(3), avc_cache_stats(3), avc_add_callback(3), getcon(3), freecon(3)selinux(8)
27 May 2004 avc_context_to_sid(3)
Hi All,
OS HPUX 11.11
I am using following script to take controlfile backup. I have used SID variable to hold "ffin1" value, which I again subsitute in "'/db/ffin1/home/oraffin1/$SID_$wdate.ctl'" command. Well, after running this, SID variable does not subsittue it's value, while wdate... (6 Replies)
#!/usr/bin/ksh
totalInstance=3
c=1
SID=SID
SID_1=BOYISH
SID_2=EAGALE
SID_3=PLUNE
while
do
BDUMP_DIR="${SID}_${c}"
echo "$BDUMP_DIR"
c=`expr $c + 1`
echo "$c"
done
having problem printing the value of my var SID_1, SID_2, SID_3 (12 Replies)