亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? services.c

?? xen 3.2.2 源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
                 1 + strlen(policydb.p_type_val_to_name[context->type - 1]);    mls_sid_to_context(context, &scontextp);    *scontextp = 0;    return 0;}#include "initial_sid_to_string.h"/** * security_sid_to_context - Obtain a context for a given SID. * @sid: security identifier, SID * @scontext: security context * @scontext_len: length in bytes * * Write the string representation of the context associated with @sid * into a dynamically allocated string of the correct size.  Set @scontext * to point to this string and set @scontext_len to the length of the string. */int security_sid_to_context(u32 sid, char **scontext, u32 *scontext_len){    struct context *context;    int rc = 0;    if ( !ss_initialized )    {        if ( sid <= SECINITSID_NUM )        {            char *scontextp;            *scontext_len = strlen(initial_sid_to_string[sid]) + 1;            scontextp = xmalloc_array(char, *scontext_len);            strlcpy(scontextp, initial_sid_to_string[sid], *scontext_len);            *scontext = scontextp;            goto out;        }        printk(KERN_ERR "security_sid_to_context:  called before initial "               "load_policy on unknown SID %d\n", sid);        rc = -EINVAL;        goto out;    }    POLICY_RDLOCK;    context = sidtab_search(&sidtab, sid);    if ( !context )    {        printk(KERN_ERR "security_sid_to_context:  unrecognized SID "               "%d\n", sid);        rc = -EINVAL;        goto out_unlock;    }    rc = context_struct_to_string(context, scontext, scontext_len);out_unlock:    POLICY_RDUNLOCK;out:    return rc;}static int security_context_to_sid_core(char *scontext, u32 scontext_len, u32 *sid, u32 def_sid){    char *scontext2;    struct context context;    struct role_datum *role;    struct type_datum *typdatum;    struct user_datum *usrdatum;    char *scontextp, *p, oldc;    int rc = 0;    if ( !ss_initialized )    {        int i;        for ( i = 1; i < SECINITSID_NUM; i++ )        {            if ( !strcmp(initial_sid_to_string[i], scontext) )            {                *sid = i;                goto out;            }        }        *sid = SECINITSID_XEN;        goto out;    }    *sid = SECSID_NULL;    /* Copy the string so that we can modify the copy as we parse it.       The string should already by null terminated, but we append a       null suffix to the copy to avoid problems with the existing       attr package, which doesn't view the null terminator as part       of the attribute value. */    scontext2 = xmalloc_array(char, scontext_len+1);    if ( !scontext2 )    {        rc = -ENOMEM;        goto out;    }    memcpy(scontext2, scontext, scontext_len);    scontext2[scontext_len] = 0;    context_init(&context);    *sid = SECSID_NULL;    POLICY_RDLOCK;    /* Parse the security context. */    rc = -EINVAL;    scontextp = (char *) scontext2;    /* Extract the user. */    p = scontextp;    while ( *p && *p != ':' )        p++;    if (*p == 0)        goto out_unlock;    *p++ = 0;    usrdatum = hashtab_search(policydb.p_users.table, scontextp);    if ( !usrdatum )        goto out_unlock;    context.user = usrdatum->value;    /* Extract role. */    scontextp = p;    while ( *p && *p != ':' )        p++;    if ( *p == 0 )        goto out_unlock;    *p++ = 0;    role = hashtab_search(policydb.p_roles.table, scontextp);    if ( !role )        goto out_unlock;    context.role = role->value;    /* Extract type. */    scontextp = p;    while ( *p && *p != ':' )        p++;    oldc = *p;    *p++ = 0;    typdatum = hashtab_search(policydb.p_types.table, scontextp);    if ( !typdatum )        goto out_unlock;    context.type = typdatum->value;    rc = mls_context_to_sid(oldc, &p, &context, &sidtab, def_sid);    if ( rc )        goto out_unlock;    if ( (p - scontext2) < scontext_len )    {        rc = -EINVAL;        goto out_unlock;    }    /* Check the validity of the new context. */    if ( !policydb_context_isvalid(&policydb, &context) )    {        rc = -EINVAL;        goto out_unlock;    }    /* Obtain the new sid. */    rc = sidtab_context_to_sid(&sidtab, &context, sid);out_unlock:    POLICY_RDUNLOCK;    context_destroy(&context);    xfree(scontext2);out:    return rc;}/** * security_context_to_sid - Obtain a SID for a given security context. * @scontext: security context * @scontext_len: length in bytes * @sid: security identifier, SID * * Obtains a SID associated with the security context that * has the string representation specified by @scontext. * Returns -%EINVAL if the context is invalid, -%ENOMEM if insufficient * memory is available, or 0 on success. */int security_context_to_sid(char *scontext, u32 scontext_len, u32 *sid){    return security_context_to_sid_core(scontext, scontext_len,                                                            sid, SECSID_NULL);}/** * security_context_to_sid_default - Obtain a SID for a given security context, * falling back to specified default if needed. * * @scontext: security context * @scontext_len: length in bytes * @sid: security identifier, SID * @def_sid: default SID to assign on errror * * Obtains a SID associated with the security context that * has the string representation specified by @scontext. * The default SID is passed to the MLS layer to be used to allow * kernel labeling of the MLS field if the MLS field is not present * (for upgrading to MLS without full relabel). * Returns -%EINVAL if the context is invalid, -%ENOMEM if insufficient * memory is available, or 0 on success. */int security_context_to_sid_default(char *scontext, u32 scontext_len, u32 *sid, u32 def_sid){    return security_context_to_sid_core(scontext, scontext_len, sid, def_sid);}static int compute_sid_handle_invalid_context(                struct context *scontext, struct context *tcontext, u16 tclass,                                                    struct context *newcontext){    char *s = NULL, *t = NULL, *n = NULL;    u32 slen, tlen, nlen;    if ( context_struct_to_string(scontext, &s, &slen) < 0 )        goto out;    if ( context_struct_to_string(tcontext, &t, &tlen) < 0 )        goto out;    if ( context_struct_to_string(newcontext, &n, &nlen) < 0 )        goto out;    printk("security_compute_sid:  invalid context %s"          " for scontext=%s"          " tcontext=%s"          " tclass=%s",          n, s, t, policydb.p_class_val_to_name[tclass-1]);out:    xfree(s);    xfree(t);    xfree(n);    if ( !flask_enforcing )        return 0;    return -EACCES;}static int security_compute_sid(u32 ssid,                u32 tsid,                u16 tclass,                u32 specified,                u32 *out_sid){    struct context *scontext = NULL, *tcontext = NULL, newcontext;    struct role_trans *roletr = NULL;    struct avtab_key avkey;    struct avtab_datum *avdatum;    struct avtab_node *node;    int rc = 0;    if ( !ss_initialized )    {        switch ( tclass )        {            case SECCLASS_DOMAIN:                *out_sid = ssid;            break;            default:                *out_sid = tsid;            break;        }        goto out;    }    POLICY_RDLOCK;    scontext = sidtab_search(&sidtab, ssid);    if ( !scontext )    {        printk(KERN_ERR "security_compute_sid:  unrecognized SID %d\n", ssid);        rc = -EINVAL;        goto out_unlock;    }    tcontext = sidtab_search(&sidtab, tsid);    if ( !tcontext )    {        printk(KERN_ERR "security_compute_sid:  unrecognized SID %d\n", tsid);        rc = -EINVAL;        goto out_unlock;    }    context_init(&newcontext);    /* Set the user identity. */    switch ( specified )    {        case AVTAB_TRANSITION:        case AVTAB_CHANGE:            /* Use the process user identity. */            newcontext.user = scontext->user;        break;        case AVTAB_MEMBER:            /* Use the related object owner. */            newcontext.user = tcontext->user;        break;    }    /* Set the role and type to default values. */    switch ( tclass )    {        case SECCLASS_DOMAIN:            /* Use the current role and type of process. */            newcontext.role = scontext->role;            newcontext.type = scontext->type;        break;        default:            /* Use the well-defined object role. */            newcontext.role = OBJECT_R_VAL;            /* Use the type of the related object. */            newcontext.type = tcontext->type;    }    /* Look for a type transition/member/change rule. */    avkey.source_type = scontext->type;    avkey.target_type = tcontext->type;    avkey.target_class = tclass;    avkey.specified = specified;    avdatum = avtab_search(&policydb.te_avtab, &avkey);    /* If no permanent rule, also check for enabled conditional rules */    if ( !avdatum )    {        node = avtab_search_node(&policydb.te_cond_avtab, &avkey);        for ( ; node != NULL; node = avtab_search_node_next(node, specified) )        {            if ( node->key.specified & AVTAB_ENABLED )            {                avdatum = &node->datum;                break;            }        }    }    if ( avdatum )    {        /* Use the type from the type transition/member/change rule. */        newcontext.type = avdatum->data;    }    /* Check for class-specific changes. */    switch ( tclass )    {        case SECCLASS_DOMAIN:            if ( specified & AVTAB_TRANSITION )            {                /* Look for a role transition rule. */                for ( roletr = policydb.role_tr; roletr; roletr = roletr->next )                {                    if ( roletr->role == scontext->role &&                                             roletr->type == tcontext->type )                    {                        /* Use the role transition rule. */                        newcontext.role = roletr->new_role;                        break;                    }                }            }        break;        default:        break;    }    /* Set the MLS attributes.       This is done last because it may allocate memory. */    rc = mls_compute_sid(scontext, tcontext, tclass, specified, &newcontext);    if ( rc )        goto out_unlock;    /* Check the validity of the context. */    if ( !policydb_context_isvalid(&policydb, &newcontext) )    {        rc = compute_sid_handle_invalid_context(scontext, tcontext, tclass,                                                                &newcontext);        if ( rc )            goto out_unlock;    }    /* Obtain the sid for the context. */    rc = sidtab_context_to_sid(&sidtab, &newcontext, out_sid);out_unlock:    POLICY_RDUNLOCK;    context_destroy(&newcontext);out:    return rc;}/** * security_transition_sid - Compute the SID for a new subject/object. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @out_sid: security identifier for new subject/object * * Compute a SID to use for labeling a new subject or object in the * class @tclass based on a SID pair (@ssid, @tsid). * Return -%EINVAL if any of the parameters are invalid, -%ENOMEM * if insufficient memory is available, or %0 if the new SID was * computed successfully. */int security_transition_sid(u32 ssid, u32 tsid, u16 tclass, u32 *out_sid){    return security_compute_sid(ssid, tsid, tclass, AVTAB_TRANSITION, out_sid);}/** * security_member_sid - Compute the SID for member selection. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @out_sid: security identifier for selected member * * Compute a SID to use when selecting a member of a polyinstantiated * object of class @tclass based on a SID pair (@ssid, @tsid). * Return -%EINVAL if any of the parameters are invalid, -%ENOMEM * if insufficient memory is available, or %0 if the SID was * computed successfully. */int security_member_sid(u32 ssid, u32 tsid, u16 tclass, u32 *out_sid){    return security_compute_sid(ssid, tsid, tclass, AVTAB_MEMBER, out_sid);}/** * security_change_sid - Compute the SID for object relabeling. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @out_sid: security identifier for selected member * * Compute a SID to use for relabeling an object of class @tclass * based on a SID pair (@ssid, @tsid). * Return -%EINVAL if any of the parameters are invalid, -%ENOMEM * if insufficient memory is available, or %0 if the SID was * computed successfully. */int security_change_sid(u32 ssid, u32 tsid, u16 tclass, u32 *out_sid){    return security_compute_sid(ssid, tsid, tclass, AVTAB_CHANGE, out_sid);}/* * Verify that each permission that is defined under the * existing policy is still defined with the same value * in the new policy. */static int validate_perm(void *key, void *datum, void *p){    struct hashtab *h;    struct perm_datum *perdatum, *perdatum2;    int rc = 0;    h = p;    perdatum = datum;    perdatum2 = hashtab_search(h, key);    if ( !perdatum2 )    {        printk(KERN_ERR "security:  permission %s disappeared", (char *)key);        rc = -ENOENT;        goto out;    }    if ( perdatum->value != perdatum2->value )    {        printk(KERN_ERR "security:  the value of permission %s changed",                                                                (char *)key);        rc = -EINVAL;    }out:    return rc;}/* * Verify that each class that is defined under the * existing policy is still defined with the same * attributes in the new policy. */static int validate_class(void *key, void *datum, void *p){    struct policydb *newp;    struct class_datum *cladatum, *cladatum2;    int rc;    newp = p;    cladatum = datum;    cladatum2 = hashtab_search(newp->p_classes.table, key);    if ( !cladatum2 )    {        printk(KERN_ERR "security:  class %s disappeared\n", (char *)key);        rc = -ENOENT;        goto out;    }    if (cladatum->value != cladatum2->value) {        printk(KERN_ERR "security:  the value of class %s changed\n",                                                                (char *)key);        rc = -EINVAL;        goto out;    }    if ( (cladatum->comdatum && !cladatum2->comdatum) ||                                (!cladatum->comdatum && cladatum2->comdatum) )    {        printk(KERN_ERR "security:  the inherits clause for the access "               "vector definition for class %s changed\n", (char *)key);        rc = -EINVAL;        goto out;    }    if ( cladatum->comdatum )    {        rc = hashtab_map(cladatum->comdatum->permissions.table, validate_perm,                                     cladatum2->comdatum->permissions.table);        if ( rc )        {            printk(" in the access vector definition for class %s\n",                                                                 (char *)key);            goto out;        }    }    rc = hashtab_map(cladatum->permissions.table, validate_perm,                                                cladatum2->permissions.table);    if ( rc )        printk(" in access vector definition for class %s\n", (char *)key);out:    return rc;}/* Clone the SID into the new SID table. */static int clone_sid(u32 sid, struct context *context, void *arg){    struct sidtab *s = arg;    return sidtab_insert(s, sid, context);}static inline int convert_context_handle_invalid_context(struct context *context){    int rc = 0;    if ( flask_enforcing )        rc = -EINVAL;    else    {        char *s;        u32 len;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲天堂久久久久久久| 免费成人av资源网| 欧美久久婷婷综合色| 国产99一区视频免费| 日韩高清电影一区| 亚洲人精品午夜| 久久久激情视频| 91精品视频网| 日本高清不卡aⅴ免费网站| 精品一二三四在线| 成人18视频日本| 亚洲综合一区二区三区| 国产精品全国免费观看高清| 国产日产欧美一区二区三区| 日本道色综合久久| 欧美经典一区二区| 99久久夜色精品国产网站| 中文字幕成人网| 一本到一区二区三区| 一区二区三区在线视频播放| 91美女在线看| 亚洲成人免费在线观看| 日韩免费一区二区| 风流少妇一区二区| 舔着乳尖日韩一区| 久久综合999| 成人动漫一区二区三区| 亚洲成年人网站在线观看| 色天使色偷偷av一区二区| 国产成人免费视频网站| 亚洲男同性视频| 中文字幕日韩欧美一区二区三区| 欧美一级精品大片| 国产一区不卡精品| 久久理论电影网| 亚洲小说春色综合另类电影| 国产盗摄精品一区二区三区在线 | 国产午夜精品久久久久久免费视| 蜜桃av噜噜一区二区三区小说| 欧美剧在线免费观看网站| 色菇凉天天综合网| 在线亚洲人成电影网站色www| 91日韩在线专区| 一本色道亚洲精品aⅴ| 99re在线视频这里只有精品| 92精品国产成人观看免费| 一本久久a久久免费精品不卡| 国产福利电影一区二区三区| 麻豆国产精品官网| 天堂久久久久va久久久久| 亚洲欧洲综合另类| 婷婷开心久久网| 亚洲欧美日韩国产中文在线| 久久先锋影音av鲁色资源网| 欧美亚洲高清一区| 一本大道久久a久久精二百| 日本丶国产丶欧美色综合| 国产欧美一区二区精品仙草咪| 亚洲成a人片综合在线| 欧美一区二区黄| 国产不卡视频一区二区三区| 日韩精品久久理论片| 久久国内精品自在自线400部| 国产成人精品免费一区二区| 免费观看成人av| 久久不见久久见中文字幕免费| 欧美一级理论片| 精品少妇一区二区三区| 欧美激情综合在线| 亚洲精品久久久蜜桃| 天使萌一区二区三区免费观看| 久久精品国产色蜜蜜麻豆| 国产99久久久精品| 欧美色图在线观看| 欧美精品一区二区蜜臀亚洲| 中文字幕一区在线观看| 婷婷夜色潮精品综合在线| 国产乱子轮精品视频| 91福利精品视频| 久久综合久久综合久久综合| 亚洲精品欧美激情| 国产一区二区0| 欧美午夜精品久久久久久孕妇| 日韩一区二区三区电影在线观看 | 成人免费视频网站在线观看| 欧美日韩国产一区| 国产女主播一区| 亚洲第一成年网| 粉嫩一区二区三区性色av| 欧美日韩一级大片网址| 久久久亚洲精品一区二区三区| 亚洲激情一二三区| 国产成人精品免费看| 欧美一区二区三区日韩| 亚洲欧洲精品天堂一级| 激情综合五月婷婷| 精品视频色一区| 国产精品久久久久久久第一福利| 日韩av二区在线播放| 日本伦理一区二区| 国产精品热久久久久夜色精品三区| 日本视频中文字幕一区二区三区| 成人av动漫在线| 久久精品国产亚洲aⅴ| 色综合一区二区三区| 精品不卡在线视频| 五月激情六月综合| 91久久线看在观草草青青| 亚洲欧洲日韩一区二区三区| 国产精品18久久久久| 日韩视频一区二区| 久久99国产精品免费网站| 欧美久久一区二区| 丝瓜av网站精品一区二区 | 国产精品每日更新在线播放网址| 日韩国产一区二| 欧美日韩国产在线播放网站| 一区二区三区美女视频| jizz一区二区| 亚洲国产视频网站| 欧美午夜免费电影| 日韩av电影一区| 欧美日韩国产综合久久| 中文字幕乱码一区二区免费| 国产一区二区影院| 国产丝袜在线精品| 成人中文字幕合集| 波多野结衣中文字幕一区 | 日本大香伊一区二区三区| 亚洲国产激情av| 国产东北露脸精品视频| 欧美电影免费观看高清完整版在线 | 91免费在线视频观看| 综合色天天鬼久久鬼色| 91丝袜国产在线播放| 天天综合色天天| 国产婷婷色一区二区三区四区| 99久久精品免费观看| 亚洲6080在线| 久久九九久久九九| 欧美午夜片在线看| 韩国av一区二区| 亚洲国产精品一区二区www | 精品一区二区久久| 国产色综合一区| 91精品国产综合久久久久久久| 国产一区二区看久久| 亚洲国产日产av| 国产欧美精品在线观看| 欧美一区二区三区系列电影| 99视频国产精品| 国产一区美女在线| 久久er99精品| 亚洲成av人片一区二区三区| 麻豆国产91在线播放| 色婷婷av一区二区三区之一色屋| 亚洲成人自拍网| 精品99一区二区三区| 色94色欧美sute亚洲线路二| eeuss影院一区二区三区| 国产精品一二三| 日韩一二三四区| 午夜精品在线视频一区| 欧美日韩国产高清一区二区 | 日韩免费电影一区| 日韩亚洲欧美在线观看| 国产欧美日韩在线| 一区二区三区四区高清精品免费观看 | 日韩福利视频导航| 一区二区三区欧美日| 亚洲欧洲国产日本综合| 国产精品视频第一区| 久久综合久色欧美综合狠狠| 7777精品伊人久久久大香线蕉超级流畅| 99久久精品国产麻豆演员表| 99国产欧美另类久久久精品| 播五月开心婷婷综合| 色婷婷香蕉在线一区二区| 91福利区一区二区三区| 色久综合一二码| 制服视频三区第一页精品| 91精品久久久久久久99蜜桃| 日韩欧美综合在线| 中文字幕免费不卡在线| 一区二区三区欧美日韩| 亚洲电影第三页| 久久99精品一区二区三区| 精品一区二区av| 色中色一区二区| 精品久久久久久无| 国产精品国产三级国产有无不卡| 亚洲欧美一区二区不卡| 午夜精品久久久久久久99樱桃 | 色综合久久久久久久| 欧美视频在线播放| 久久久精品国产免大香伊| 国产在线不卡一区| 最新国产精品久久精品| 精品在线观看视频| 国产一区二区三区电影在线观看|