Function report |
Source Code:security\smack\smackfs.c |
Create Date:2022-07-28 19:27:15 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:smk_set_cipso - do the work for write() for cipso and cipso2*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start*@format: /smack/cipso or /smack/cipso2
Proto:static ssize_t smk_set_cipso(struct file *file, const char __user *buf, size_t count, loff_t *ppos, int format)
Type:ssize_t
Parameter:
Type | Parameter | Name |
---|---|---|
struct file * | file | |
const char __user * | buf | |
size_t | count | |
loff_t * | ppos | |
int | format |
841 | char * data = NULL |
855 | If format == Fixed 24byte label format && ( count < SMK_CIPSOMIN || count > SMK_CIPSOMAX ) Then Return -EINVAL |
859 | data = memdup_user_nul - duplicate memory region from user space and NUL-terminate*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. |
868 | mutex_lock( & List locks) |
870 | skp = smk_import_entry - import a label, return the list entry*@string: a text string that might be a Smack label*@len: the maximum size, or zero if it is NULL terminated |
876 | If format == Fixed 24byte label format Then rule += Smack labels were limited to 23 characters for a long time. |
878 | Else rule += strlen - Find the length of a string*@s: The string to be sized + 1 |
881 | ret = sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments |
882 | If ret != 1 || maplevel > CIPSO 2.2 standard Then Go to out |
885 | rule += Values for parsing cipso rules* SMK_DIGITLEN: Length of a digit field in a rule.* SMK_CIPSOMIN: Minimum possible cipso rule length.* SMK_CIPSOMAX: Maximum possible cipso rule length. |
886 | ret = sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments |
897 | rule += Values for parsing cipso rules* SMK_DIGITLEN: Length of a digit field in a rule.* SMK_CIPSOMIN: Minimum possible cipso rule length.* SMK_CIPSOMAX: Maximum possible cipso rule length. |
906 | If rc >= 0 Then |
913 | out : |
916 | Return rc |
Name | Describe |
---|---|
smk_write_cipso | smk_write_cipso - write() for /smack/cipso*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start* Accepts only one cipso rule per write call |
smk_write_cipso2 | smk_write_cipso2 - write() for /smack/cipso2*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start* Accepts only one cipso rule per write call |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |