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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? services.c

?? linux 內(nèi)核源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
 */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 kernel class that is defined in the * policy is correct */static int validate_classes(struct policydb *p){	int i, j;	struct class_datum *cladatum;	struct perm_datum *perdatum;	u32 nprim, tmp, common_pts_len, perm_val, pol_val;	u16 class_val;	const struct selinux_class_perm *kdefs = &selinux_class_perm;	const char *def_class, *def_perm, *pol_class;	struct symtab *perms;	if (p->allow_unknown) {		u32 num_classes = kdefs->cts_len;		p->undefined_perms = kcalloc(num_classes, sizeof(u32), GFP_KERNEL);		if (!p->undefined_perms)			return -ENOMEM;	}	for (i = 1; i < kdefs->cts_len; i++) {		def_class = kdefs->class_to_string[i];		if (!def_class)			continue;		if (i > p->p_classes.nprim) {			printk(KERN_INFO			       "security:  class %s not defined in policy\n",			       def_class);			if (p->reject_unknown)				return -EINVAL;			if (p->allow_unknown)				p->undefined_perms[i-1] = ~0U;			continue;		}		pol_class = p->p_class_val_to_name[i-1];		if (strcmp(pol_class, def_class)) {			printk(KERN_ERR			       "security:  class %d is incorrect, found %s but should be %s\n",			       i, pol_class, def_class);			return -EINVAL;		}	}	for (i = 0; i < kdefs->av_pts_len; i++) {		class_val = kdefs->av_perm_to_string[i].tclass;		perm_val = kdefs->av_perm_to_string[i].value;		def_perm = kdefs->av_perm_to_string[i].name;		if (class_val > p->p_classes.nprim)			continue;		pol_class = p->p_class_val_to_name[class_val-1];		cladatum = hashtab_search(p->p_classes.table, pol_class);		BUG_ON(!cladatum);		perms = &cladatum->permissions;		nprim = 1 << (perms->nprim - 1);		if (perm_val > nprim) {			printk(KERN_INFO			       "security:  permission %s in class %s not defined in policy\n",			       def_perm, pol_class);			if (p->reject_unknown)				return -EINVAL;			if (p->allow_unknown)				p->undefined_perms[class_val-1] |= perm_val;			continue;		}		perdatum = hashtab_search(perms->table, def_perm);		if (perdatum == NULL) {			printk(KERN_ERR			       "security:  permission %s in class %s not found in policy, bad policy\n",			       def_perm, pol_class);			return -EINVAL;		}		pol_val = 1 << (perdatum->value - 1);		if (pol_val != perm_val) {			printk(KERN_ERR			       "security:  permission %s in class %s has incorrect value\n",			       def_perm, pol_class);			return -EINVAL;		}	}	for (i = 0; i < kdefs->av_inherit_len; i++) {		class_val = kdefs->av_inherit[i].tclass;		if (class_val > p->p_classes.nprim)			continue;		pol_class = p->p_class_val_to_name[class_val-1];		cladatum = hashtab_search(p->p_classes.table, pol_class);		BUG_ON(!cladatum);		if (!cladatum->comdatum) {			printk(KERN_ERR			       "security:  class %s should have an inherits clause but does not\n",			       pol_class);			return -EINVAL;		}		tmp = kdefs->av_inherit[i].common_base;		common_pts_len = 0;		while (!(tmp & 0x01)) {			common_pts_len++;			tmp >>= 1;		}		perms = &cladatum->comdatum->permissions;		for (j = 0; j < common_pts_len; j++) {			def_perm = kdefs->av_inherit[i].common_pts[j];			if (j >= perms->nprim) {				printk(KERN_INFO				       "security:  permission %s in class %s not defined in policy\n",				       def_perm, pol_class);				if (p->reject_unknown)					return -EINVAL;				if (p->allow_unknown)					p->undefined_perms[class_val-1] |= (1 << j);				continue;			}			perdatum = hashtab_search(perms->table, def_perm);			if (perdatum == NULL) {				printk(KERN_ERR				       "security:  permission %s in class %s not found in policy, bad policy\n",				       def_perm, pol_class);				return -EINVAL;			}			if (perdatum->value != j + 1) {				printk(KERN_ERR				       "security:  permission %s in class %s has incorrect value\n",				       def_perm, pol_class);				return -EINVAL;			}		}	}	return 0;}/* 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 (selinux_enforcing) {		rc = -EINVAL;	} else {		char *s;		u32 len;		context_struct_to_string(context, &s, &len);		printk(KERN_ERR "security:  context %s is invalid\n", s);		kfree(s);	}	return rc;}struct convert_context_args {	struct policydb *oldp;	struct policydb *newp;};/* * Convert the values in the security context * structure `c' from the values specified * in the policy `p->oldp' to the values specified * in the policy `p->newp'.  Verify that the * context is valid under the new policy. */static int convert_context(u32 key,			   struct context *c,			   void *p){	struct convert_context_args *args;	struct context oldc;	struct role_datum *role;	struct type_datum *typdatum;	struct user_datum *usrdatum;	char *s;	u32 len;	int rc;	args = p;	rc = context_cpy(&oldc, c);	if (rc)		goto out;	rc = -EINVAL;	/* Convert the user. */	usrdatum = hashtab_search(args->newp->p_users.table,	                          args->oldp->p_user_val_to_name[c->user - 1]);	if (!usrdatum) {		goto bad;	}	c->user = usrdatum->value;	/* Convert the role. */	role = hashtab_search(args->newp->p_roles.table,	                      args->oldp->p_role_val_to_name[c->role - 1]);	if (!role) {		goto bad;	}	c->role = role->value;	/* Convert the type. */	typdatum = hashtab_search(args->newp->p_types.table,	                          args->oldp->p_type_val_to_name[c->type - 1]);	if (!typdatum) {		goto bad;	}	c->type = typdatum->value;	rc = mls_convert_context(args->oldp, args->newp, c);	if (rc)		goto bad;	/* Check the validity of the new context. */	if (!policydb_context_isvalid(args->newp, c)) {		rc = convert_context_handle_invalid_context(&oldc);		if (rc)			goto bad;	}	context_destroy(&oldc);out:	return rc;bad:	context_struct_to_string(&oldc, &s, &len);	context_destroy(&oldc);	printk(KERN_ERR "security:  invalidating context %s\n", s);	kfree(s);	goto out;}extern void selinux_complete_init(void);static int security_preserve_bools(struct policydb *p);/** * security_load_policy - Load a security policy configuration. * @data: binary policy data * @len: length of data in bytes * * Load a new set of security policy configuration data, * validate it and convert the SID table as necessary. * This function will flush the access vector cache after * loading the new policy. */int security_load_policy(void *data, size_t len){	struct policydb oldpolicydb, newpolicydb;	struct sidtab oldsidtab, newsidtab;	struct convert_context_args args;	u32 seqno;	int rc = 0;	struct policy_file file = { data, len }, *fp = &file;	LOAD_LOCK;	if (!ss_initialized) {		avtab_cache_init();		if (policydb_read(&policydb, fp)) {			LOAD_UNLOCK;			avtab_cache_destroy();			return -EINVAL;		}		if (policydb_load_isids(&policydb, &sidtab)) {			LOAD_UNLOCK;			policydb_destroy(&policydb);			avtab_cache_destroy();			return -EINVAL;		}		/* Verify that the kernel defined classes are correct. */		if (validate_classes(&policydb)) {			printk(KERN_ERR			       "security:  the definition of a class is incorrect\n");			LOAD_UNLOCK;			sidtab_destroy(&sidtab);			policydb_destroy(&policydb);			avtab_cache_destroy();			return -EINVAL;		}		policydb_loaded_version = policydb.policyvers;		ss_initialized = 1;		seqno = ++latest_granting;		LOAD_UNLOCK;		selinux_complete_init();		avc_ss_reset(seqno);		selnl_notify_policyload(seqno);		selinux_netlbl_cache_invalidate();		selinux_xfrm_notify_policyload();		return 0;	}#if 0	sidtab_hash_eval(&sidtab, "sids");#endif	if (policydb_read(&newpolicydb, fp)) {		LOAD_UNLOCK;		return -EINVAL;	}	sidtab_init(&newsidtab);	/* Verify that the kernel defined classes are correct. */	if (validate_classes(&newpolicydb)) {		printk(KERN_ERR		       "security:  the definition of a class is incorrect\n");		rc = -EINVAL;		goto err;	}	rc = security_preserve_bools(&newpolicydb);	if (rc) {		printk(KERN_ERR "security:  unable to preserve booleans\n");		goto err;	}	/* Clone the SID table. */	sidtab_shutdown(&sidtab);	if (sidtab_map(&sidtab, clone_sid, &newsidtab)) {		rc = -ENOMEM;		goto err;	}	/* Convert the internal representations of contexts	   in the new SID table and remove invalid SIDs. */	args.oldp = &policydb;	args.newp = &newpolicydb;	sidtab_map_remove_on_error(&newsidtab, convert_context, &args);	/* Save the old policydb and SID table to free later. */	memcpy(&oldpolicydb, &policydb, sizeof policydb);	sidtab_set(&oldsidtab, &sidtab);	/* Install the new policydb and SID table. */	POLICY_WRLOCK;	memcpy(&policydb, &newpolicydb, sizeof policydb);	sidtab_set(&sidtab, &newsidtab);	seqno = ++latest_granting;	policydb_loaded_version = policydb.policyvers;	POLICY_WRUNLOCK;	LOAD_UNLOCK;	/* Free the old policydb and SID table. */	policydb_destroy(&oldpolicydb);	sidtab_destroy(&oldsidtab);	avc_ss_reset(seqno);	selnl_notify_policyload(seqno);	selinux_netlbl_cache_invalidate();	selinux_xfrm_notify_policyload();	return 0;err:	LOAD_UNLOCK;	sidtab_destroy(&newsidtab);	policydb_destroy(&newpolicydb);	return rc;}/** * security_port_sid - Obtain the SID for a port. * @domain: communication domain aka address family * @type: socket type * @protocol: protocol number * @port: port number * @out_sid: security identifier */int security_port_sid(u16 domain,		      u16 type,		      u8 protocol,		      u16 port,		      u32 *out_sid){	struct ocontext *c;	int rc = 0;	POLICY_RDLOCK;	c = policydb.ocontexts[OCON_PORT];	while (c) {		if (c->u.port.protocol == protocol &&		    c->u.port.low_port <= port &&		    c->u.port.high_port >= port)			break;		c = c->next;	}	if (c) {		if (!c->sid[0]) {			rc = sidtab_context_to_sid(&sidtab,						   &c->context[0],						   &c->sid[0]);			if (rc)				goto out;		}		*out_sid = c->sid[0];	} else {		*out_sid = SECINITSID_PORT;	}out:	POLICY_RDUNLOCK;	return rc;}/** * security_netif_sid - Obtain the SID for a network interface. * @name: interface name * @if_sid: interface SID * @msg_sid: default SID for received packets */int security_netif_sid(char *name,		       u32 *if_sid,		       u32 *msg_sid){	int rc = 0;	struct ocontext *c;	POLICY_RDLOCK;	c = policydb.ocontexts[OCON_NETIF];	while (c) {		if (strcmp(name, c->u.name) == 0)			break;		c = c->next;	}	if (c) {		if (!c->sid[0] || !c->sid[1]) {			rc = sidtab_context_to_sid(&sidtab,						  &c->context[0],						  &c->sid[0]);			if (rc)				goto out;			rc = sidtab_context_to_sid(&sidtab,						   &c->context[1],						   &c->sid[1]);			if (rc)				goto out;		}		*if_sid = c->sid[0];		*msg_sid = c->sid[1];	} else {		*if_sid = SECINITSID_NETIF;		*msg_sid = SECINITSID_NETMSG;	}out:	POLICY_RDUNLOCK;	return rc;}static int match_ipv6_addrmask(u32 *input, u32 *addr, u32 *mask){	int i, fail = 0;	for(i = 0; i < 4; i++)		if(addr[i] != (input[i] & mask[i])) {			fail = 1;			break;		}	return !fail;}/** * security_node_sid - Obtain the SID for a node (host). * @domain: communication domain aka address family * @addrp: address * @addrlen: address length in bytes * @out_sid: security identifier */int security_node_sid(u16 domain,		      void *addrp,		      u32 addrlen,		      u32 *out_sid){	int rc = 0;	struct ocontext *c;	POLICY_RDLOCK;	switch (domain) {	case AF_INET: {		u32 addr;		if (addrlen != sizeof(u32)) {			rc = -EINVAL;			goto out;		}		addr = *((u32 *)addrp);		c = policydb.ocontexts[OCON_NODE];		while (c) {			if (c->u.node.addr == (addr & c->u.node.mask))				break;			c = c->next;		}		break;	}	case AF_INET6:		if (addrlen != sizeof(u64) * 2) {			rc = -EINVAL;			goto out;		}		c = policydb.ocontexts[OCON_NODE6];		while (c) {			if (match_ipv6_addrmask(addrp, c->u.node6.addr,						c->u.node6.mask))				break;			c = c->next;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本大胆欧美人术艺术动态| 在线观看国产91| 色悠悠亚洲一区二区| 日韩欧美在线一区二区三区| 国产精品国产自产拍高清av王其| 日韩成人免费电影| 91亚洲精品久久久蜜桃| 久久欧美中文字幕| 亚洲18影院在线观看| 成人91在线观看| 精品国产乱码久久久久久牛牛| 亚洲国产精品一区二区www | 中文字幕欧美日韩一区| 视频一区欧美日韩| 91九色02白丝porn| 亚洲女同一区二区| 成人激情动漫在线观看| 精品国产欧美一区二区| 日韩电影一二三区| 欧美日韩国产天堂| 亚洲图片有声小说| 91福利视频网站| 亚洲激情图片qvod| 91香蕉视频mp4| 国产精品成人网| 国产大片一区二区| 久久精品一区四区| 国产成人精品免费网站| 久久伊99综合婷婷久久伊| 久久99久久99小草精品免视看| 欧美酷刑日本凌虐凌虐| 国产毛片精品一区| 精品对白一区国产伦| 蜜桃av一区二区| 日韩一区二区免费高清| 日产精品久久久久久久性色| 7777精品久久久大香线蕉| 亚洲精品国产精品乱码不99| 在线免费观看日本一区| 亚洲综合视频网| 欧美精品高清视频| 亚洲福利一区二区三区| k8久久久一区二区三区| 亚洲三级小视频| 欧美色欧美亚洲另类二区| 亚洲成人综合网站| 2024国产精品| 成a人片国产精品| 亚洲免费观看视频| 欧美精品色一区二区三区| 美女视频黄a大片欧美| 久久免费精品国产久精品久久久久| 国产精品中文欧美| 成人免费一区二区三区视频 | 国产一本一道久久香蕉| 中文字幕巨乱亚洲| 欧洲色大大久久| 日韩av一区二区三区四区| 欧美精品一区二| 成人爱爱电影网址| 视频一区二区不卡| 久久蜜桃香蕉精品一区二区三区| 不卡欧美aaaaa| 午夜电影网一区| 欧美日韩的一区二区| 国产在线视频一区二区三区| 亚洲欧洲精品天堂一级| 欧美日韩电影在线| 国产不卡在线一区| 亚洲无线码一区二区三区| 久久色.com| 欧美日本在线视频| 高清不卡一二三区| 日韩av一区二| 亚洲少妇30p| 久久嫩草精品久久久精品一| 日本精品视频一区二区三区| 久久电影网站中文字幕| 亚洲视频网在线直播| 久久久国产精品午夜一区ai换脸| 91麻豆.com| 国产成人h网站| 日产精品久久久久久久性色| 亚洲另类春色校园小说| 精品国内二区三区| 欧美性大战久久久久久久蜜臀| 国产盗摄视频一区二区三区| 热久久一区二区| 亚洲一区二区三区视频在线 | 天堂一区二区在线免费观看| 国产精品美日韩| 日韩一区二区三区观看| 一本色道**综合亚洲精品蜜桃冫| 国产一区二区精品在线观看| 五月综合激情日本mⅴ| 亚洲另类色综合网站| 国产精品国产精品国产专区不蜜 | 欧美韩国日本不卡| 欧美不卡视频一区| 日韩一区二区影院| 欧美一区二区三区在| 欧美性做爰猛烈叫床潮| 色综合久久综合网欧美综合网 | 久久99久久精品欧美| 午夜欧美视频在线观看| 亚洲欧美成aⅴ人在线观看| 久久综合九色欧美综合狠狠| 91精品国产综合久久精品app| 欧美在线短视频| 色狠狠一区二区三区香蕉| 91麻豆国产自产在线观看| 99国产精品99久久久久久| 成人听书哪个软件好| 成人精品国产免费网站| 国产a精品视频| 成人一区在线看| www.爱久久.com| 91国产免费看| 69堂精品视频| 26uuu国产在线精品一区二区| 欧美电视剧在线观看完整版| 欧美精品一区二区三区蜜桃| 精品少妇一区二区三区在线视频| 精品少妇一区二区三区日产乱码 | 日韩制服丝袜av| 日本欧美肥老太交大片| 蜜桃精品视频在线观看| 精品综合久久久久久8888| 激情伊人五月天久久综合| 国产老妇另类xxxxx| 成人黄页在线观看| 日本电影欧美片| 欧美久久久久中文字幕| 欧美成人video| 国产欧美va欧美不卡在线| 日韩一区在线播放| 午夜视频在线观看一区| 麻豆91免费观看| 大白屁股一区二区视频| 91日韩一区二区三区| 8x8x8国产精品| 久久综合视频网| 亚洲女同一区二区| 麻豆91在线观看| 色先锋久久av资源部| 日韩三级在线免费观看| 亚洲欧洲国产日本综合| 日日嗨av一区二区三区四区| 激情五月播播久久久精品| 91原创在线视频| 日韩一区和二区| 中文字幕一区在线观看视频| 午夜激情综合网| av欧美精品.com| 日韩一区二区三区免费观看| 中文无字幕一区二区三区 | 一区二区三区在线影院| 免费人成网站在线观看欧美高清| 国产91精品精华液一区二区三区| 欧美在线色视频| 中文字幕欧美三区| 久久精品国产免费| 91久久免费观看| 国产拍欧美日韩视频二区| 青青草成人在线观看| 91啪亚洲精品| 国产视频在线观看一区二区三区| 亚洲福利国产精品| 91免费国产在线观看| 久久精品日韩一区二区三区| 天天综合日日夜夜精品| 91在线码无精品| 国产日韩欧美精品电影三级在线| 亚洲1区2区3区视频| 色婷婷精品久久二区二区蜜臀av| 久久这里只有精品6| 久久精品国产一区二区三 | 91蝌蚪porny| 国产欧美一区二区精品婷婷| 日韩电影在线观看一区| 97se狠狠狠综合亚洲狠狠| 国产亚洲欧美一区在线观看| 亚洲图片欧美色图| 91麻豆精东视频| 亚洲欧美aⅴ...| 色综合色综合色综合色综合色综合 | 97久久超碰精品国产| 久久伊人中文字幕| 美女尤物国产一区| 欧美美女喷水视频| 亚洲成人一区二区在线观看| 色婷婷久久久亚洲一区二区三区| 日本一区二区三区在线不卡| 天天综合网天天综合色| 欧美三区免费完整视频在线观看| 亚洲欧美成aⅴ人在线观看| 91在线国产观看| 亚洲欧美区自拍先锋| 色噜噜久久综合| 亚洲一区二区三区四区中文字幕|