sepol_genusers(3) SE Linux binary policy API documentation sepol_genusers(3)NAME
sepol_genusers - Generate a new binary policy image with a customized user configuration
SYNOPSIS
#include <sepol/sepol.h>
int sepol_genusers(void *data, size_t len, const char *usersdir, void *newdata, size_t *newlen);
void sepol_set_delusers(int on);
DESCRIPTION
sepol_genusers generates a new binary policy image from an existing binary policy image stored in the memory region described by the start-
ing address data and the length len and a pair of user configuration files named system.users and local.users from the directory specified
by usersdir. The resulting binary policy is placed into dynamically allocated memory and the variables newdata and newlen are set to refer
to the new binary image's starting address and length. The original binary policy image is not modified.
By default, sepol_genusers will preserve user entries that are defined in the original binary policy image but not defined in the user con-
figuration files. If such user entries should instead by omitted entirely from the new binary policy image, then the sepol_set_delusers
function may be called with on set to 1 prior to calling sepol_genusers in order to enable deletion of such users.
RETURN VALUE
Returns 0 on success or -1 otherwise, with errno set appropriately. An errno of ENOENT indicates that one or both of the user configura-
tion files did not exist. An errno of EINVAL indicates that either the original binary policy image or the generated one were invalid. An
errno of ENOMEM indicates that insufficient memory was available to process the original binary policy image or to generate the new policy
image. Invalid entries in the user configuration files are skipped with a warning.
sds@tycho.nsa.gov 15 March 2005 sepol_genusers(3)
Check Out this Related Man Page
CHECKPOLICY(8) System Manager's Manual CHECKPOLICY(8)NAME
checkpolicy - SELinux policy compiler
SYNOPSIS
checkpolicy [-b] [-d] [-M] [-c policyvers] [-o output_file] [input_file]
DESCRIPTION
This manual page describes the checkpolicy command.
checkpolicy is a program that checks and compiles a SELinux security policy configuration into a binary representation that can be loaded
into the kernel. If no input file name is specified, checkpolicy will attempt to read from policy.conf or policy, depending on whether the
-b flag is specified.
OPTIONS -b,--binary
Read an existing binary policy file rather than a source policy.conf file.
-d,--debug
Enter debug mode after loading the policy.
-M,--mls
Enable the MLS policy when checking and compiling the policy.
-o,--output filename
Write a binary policy file to the specified filename.
-c policyvers
Specify the policy version, defaults to the latest.
-t,--target
Specify the target platform (selinux or xen).
-U,--handle-unknown <action>
Specify how the kernel should handle unknown classes or permissions (deny, allow or reject).
-V,--version
Show version information.
-h,--help
Show usage information.
SEE ALSO
SELinux documentation at http://www.nsa.gov/selinux, especially "Configuring the SELinux Policy".
AUTHOR
This manual page was written by Arpad Magosanyi <mag@bunuel.tii.matav.hu>, and edited by Stephen Smalley <sds@epoch.ncsc.mil>. The program
was written by Stephen Smalley <sds@epoch.ncsc.mil>.
CHECKPOLICY(8)
please let me know
how can i mail the binary files
is it can be done thru pine?
is there any other way to do it?
wat are the changes in system i have to make
and one more thing
i am sending data to a message queue and then retriving the data from the queue
but when i do the ipcs... (1 Reply)
Is there a way to join two or more binary files together without corrupting the data?
I've searched the forums, and googled etc. but the only commands that get mentioned are 'cat', which only works for text files and 'join'. According to the man pages join is a 'relational database operator',... (5 Replies)
I am working in C and need a solution for below problem:
I have a binary file, which needs to be edited in such a way no data is loss.
For example i have to insert 3 bytes of data at some position without changing the contents of the file.
if file has data as:... (2 Replies)
We have a binary that generates coredump. So I ran the gdb command to analyze the issue. Pleae note the binary and code are in two different locations and we cannot build the whole binary using debugging symbols. Hence how and what details can I find from below backtarce:
gdb binary corefile
... (5 Replies)
I was trying to figure out how to write a shell script to be able to print the name of the file and size to a text file I wanted to know if I was on the right track and am understanding this better.
In my script a for loop be able to print files over 4mb (we charge differently for larger images)... (18 Replies)
I am trying to parse a file but the filehas binary data inline mixed with text fields.
I tried the binutils strings function , it get the binary data out but put the char following the binary data in a new line .
input file
app_id:1936 pgm_num:0 branch:TBNY ord_num:0500012(–QMK) deal_num:0... (12 Replies)
I need to convert a binary file which in encoded using base32 encoding technique and convert that into readible ASCII so that i can load the same in DB.
is there any command to do the same.
sample from the binary file lools like :
... (18 Replies)
Hi,
On AIX 7
How give a user the privilege to run a single binary or a Shell script with sudo?
Once done, what would be the syntax to run the binary please?
Thanks (1 Reply)