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

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

?? services.c

?? xen虛擬機源代碼安裝包
?? 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一区二区三区免费野_久草精品视频
久久99精品久久久久| 成人激情校园春色| 日本一区中文字幕| 亚洲6080在线| 免费高清不卡av| 黄色小说综合网站| 国产美女av一区二区三区| 国产在线精品一区在线观看麻豆| 捆绑变态av一区二区三区| 蜜臀91精品一区二区三区| 久久超碰97人人做人人爱| 麻豆精品精品国产自在97香蕉| 美国精品在线观看| 国产一区二区不卡| 国产.欧美.日韩| 91蜜桃免费观看视频| 欧美色倩网站大全免费| 欧美精品高清视频| 精品美女被调教视频大全网站| 精品美女在线观看| 国产日韩精品一区二区三区在线| 中文成人综合网| 亚洲精品视频免费看| 亚洲福中文字幕伊人影院| 久久精品国产一区二区三区免费看| 国产呦精品一区二区三区网站| 国产精品一区二区三区网站| 9久草视频在线视频精品| 91福利视频久久久久| 欧美日韩高清影院| 久久亚洲捆绑美女| 中文字幕在线不卡一区| 亚洲国产一区二区三区青草影视| 麻豆精品视频在线观看视频| 成人综合婷婷国产精品久久蜜臀| 一本久久精品一区二区| 日韩欧美国产三级| 国产精品高潮久久久久无| 亚洲一区二区精品视频| 麻豆91免费看| 99久久99久久精品免费看蜜桃| 欧美日韩免费在线视频| 久久一留热品黄| 一区二区成人在线| 激情深爱一区二区| 日本道精品一区二区三区| 精品精品国产高清a毛片牛牛| 国产女人18毛片水真多成人如厕| 亚洲高清视频在线| 国产大片一区二区| 欧美日韩久久一区二区| 中文字幕精品在线不卡| 日日夜夜免费精品| 成人精品免费看| 欧美一区欧美二区| 亚洲视频一区二区在线观看| 蜜桃精品视频在线观看| 91美女福利视频| 国产色产综合色产在线视频| 天堂成人国产精品一区| 不卡一区在线观看| 欧美精品一区二区不卡 | 一区二区高清在线| 国产精品中文字幕日韩精品| 91.com在线观看| 亚洲人成小说网站色在线| 久久电影网电视剧免费观看| 在线免费观看日本一区| 国产蜜臀av在线一区二区三区| 日韩精品五月天| 91色porny| 欧美激情一区二区在线| 久久99在线观看| 欧美巨大另类极品videosbest| 亚洲视频免费观看| 国产老肥熟一区二区三区| 91麻豆精品国产| 夜夜揉揉日日人人青青一国产精品 | 一区二区在线观看免费视频播放| 国产美女精品在线| 日韩精品一区二区三区在线播放| 亚洲国产精品久久人人爱蜜臀| eeuss影院一区二区三区| 精品国产青草久久久久福利| 日韩和欧美的一区| 欧美视频在线观看一区二区| 中文字幕在线免费不卡| 丰满放荡岳乱妇91ww| 久久久久99精品一区| 麻豆91免费观看| 日韩免费看的电影| 久久成人18免费观看| 欧美v日韩v国产v| 久久99精品久久久久| 日韩精品一区二区三区在线观看| 日本成人中文字幕| 欧美一级免费大片| 日本伊人色综合网| 欧美一卡2卡3卡4卡| 日韩中文字幕亚洲一区二区va在线| 欧美日韩亚洲综合一区| 性感美女久久精品| 欧美另类一区二区三区| 日韩高清在线不卡| 欧美一区二区三区视频在线| 日本亚洲一区二区| 日韩欧美国产一区在线观看| 久久国产免费看| 久久久久久久久久久99999| 国产在线日韩欧美| 欧美极品xxx| 波多野洁衣一区| 亚洲女性喷水在线观看一区| 91麻豆成人久久精品二区三区| 亚洲日本va在线观看| 色婷婷香蕉在线一区二区| 夜夜操天天操亚洲| 4438成人网| 韩国精品一区二区| 欧美国产日韩在线观看| 91日韩一区二区三区| 亚洲成av人**亚洲成av**| 91精品国产综合久久小美女 | 欧美久久久一区| 久久精品国产一区二区三| 国产日韩欧美精品在线| 91麻豆国产福利在线观看| 五月婷婷久久综合| 精品国一区二区三区| a级精品国产片在线观看| 一区二区三区精品视频| 欧美精品日韩一本| 精品一区二区三区香蕉蜜桃| 亚洲国产精品t66y| 在线视频国内自拍亚洲视频| 蜜臀av性久久久久av蜜臀妖精| 国产亚洲女人久久久久毛片| 在线免费亚洲电影| 热久久国产精品| 国产精品乱码一区二区三区软件 | av色综合久久天堂av综合| 一区二区三区日本| 日韩精品一区二区三区swag| 成人高清av在线| 爽爽淫人综合网网站| 久久久青草青青国产亚洲免观| 91片在线免费观看| 精品一区二区三区在线观看国产| 亚洲欧美自拍偷拍| 欧美一区二区三区不卡| www.av亚洲| 免费看日韩精品| 自拍偷拍国产精品| 日韩欧美国产1| 91国偷自产一区二区使用方法| 久久99国产精品久久| 一区二区在线观看视频| 久久欧美一区二区| 欧美日韩另类国产亚洲欧美一级| 国产成人av一区二区| 日日欢夜夜爽一区| 中文字幕一区二区三区乱码在线| 91精品国产欧美一区二区成人| 成人午夜激情在线| 免费视频最近日韩| 亚洲精品国产无天堂网2021| 久久精品欧美日韩精品| 制服丝袜日韩国产| 色综合久久66| 国产91精品一区二区麻豆网站| 国产高清在线观看免费不卡| 精品在线你懂的| 伊人夜夜躁av伊人久久| 久久精品日韩一区二区三区| 69堂精品视频| 色拍拍在线精品视频8848| 国产a区久久久| 久久99精品久久久久婷婷| 亚洲一区二区美女| 亚洲天堂2014| 国产欧美va欧美不卡在线| 日韩一区二区三区电影在线观看| 色8久久精品久久久久久蜜| 成人免费看黄yyy456| 国产一区二区三区美女| 日韩电影一区二区三区| 亚洲在线免费播放| 亚洲人妖av一区二区| 国产三级欧美三级| 精品福利二区三区| 日韩欧美色综合网站| 91精品婷婷国产综合久久性色 | 91欧美一区二区| 成人福利视频在线| 国产不卡高清在线观看视频| 国产精品亚洲成人| 国产精品一二三四五| 国产麻豆欧美日韩一区| 精品一区二区三区香蕉蜜桃| 极品瑜伽女神91|