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

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

?? services.c

?? h內核
?? C
?? 第 1 頁 / 共 3 頁
字號:
	/* 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);	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;		}		break;	default:		*out_sid = SECINITSID_NODE;		goto out;	}	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_NODE;	}out:	POLICY_RDUNLOCK;	return rc;}#define SIDS_NEL 25/** * security_get_user_sids - Obtain reachable SIDs for a user. * @fromsid: starting SID * @username: username * @sids: array of reachable SIDs for user * @nel: number of elements in @sids * * Generate the set of SIDs for legal security contexts * for a given user that can be reached by @fromsid. * Set *@sids to point to a dynamically allocated * array containing the set of SIDs.  Set *@nel to the * number of elements in the array. */int security_get_user_sids(u32 fromsid,	                   char *username,			   u32 **sids,			   u32 *nel){	struct context *fromcon, usercon;	u32 *mysids, *mysids2, sid;	u32 mynel = 0, maxnel = SIDS_NEL;	struct user_datum *user;	struct role_datum *role;	struct av_decision avd;	int rc = 0, i, j;	if (!ss_initialized) {		*sids = NULL;		*nel = 0;		goto out;	}	POLICY_RDLOCK;	fromcon = sidtab_search(&sidtab, fromsid);	if (!fromcon) {		rc = -EINVAL;		goto out_unlock;	}	user = hashtab_search(policydb.p_users.table, username);	if (!user) {		rc = -EINVAL;		goto out_unlock;	}	usercon.user = user->value;	mysids = kmalloc(maxnel*sizeof(*mysids), GFP_ATOMIC);	if (!mysids) {		rc = -ENOMEM;		goto out_unlock;	}	memset(mysids, 0, maxnel*sizeof(*mysids));	for (i = ebitmap_startbit(&user->roles); i < ebitmap_length(&user->roles); i++) {		if (!ebitmap_get_bit(&user->roles, i))			continue;		role = policydb.role_val_to_struct[i];		usercon.role = i+1;		for (j = ebitmap_startbit(&role->types); j < ebitmap_length(&role->types); j++) {			if (!ebitmap_get_bit(&role->types, j))				continue;			usercon.type = j+1;			mls_for_user_ranges(user,usercon) {				rc = context_struct_compute_av(fromcon, &usercon,							       SECCLASS_PROCESS,							       PROCESS__TRANSITION,							       &avd);				if (rc ||  !(avd.allowed & PROCESS__TRANSITION))					continue;				rc = sidtab_context_to_sid(&sidtab, &usercon, &sid);				if (rc) {					kfree(mysids);					goto out_unlock;				}				if (mynel < maxnel) {					mysids[mynel++] = sid;				} else {					maxnel += SIDS_NEL;					mysids2 = kmalloc(maxnel*sizeof(*mysids2), GFP_ATOMIC);					if (!mysids2) {						rc = -ENOMEM;						kfree(mysids);						goto out_unlock;					}					memset(mysids2, 0, maxnel*sizeof(*mysids2));					memcpy(mysids2, mysids, mynel * sizeof(*mysids2));					kfree(mysids);					mysids = mysids2;					mysids[mynel++] = sid;				}			}			mls_end_user_ranges;		}	}	*sids = mysids;	*nel = mynel;out_unlock:	POLICY_RDUNLOCK;out:	return rc;}/** * security_genfs_sid - Obtain a SID for a file in a filesystem * @fstype: filesystem type * @path: path from root of mount * @sclass: file security class * @sid: SID for path * * Obtain a SID to use for a file in a filesystem that * cannot support xattr or use a fixed labeling behavior like * transition SIDs or task SIDs. */int security_genfs_sid(const char *fstype,	               char *path,		       u16 sclass,		       u32 *sid){	int len;	struct genfs *genfs;	struct ocontext *c;	int rc = 0, cmp = 0;	POLICY_RDLOCK;	for (genfs = policydb.genfs; genfs; genfs = genfs->next) {		cmp = strcmp(fstype, genfs->fstype);		if (cmp <= 0)			break;	}	if (!genfs || cmp) {		*sid = SECINITSID_UNLABELED;		rc = -ENOENT;		goto out;	}	for (c = genfs->head; c; c = c->next) {		len = strlen(c->u.name);		if ((!c->v.sclass || sclass == c->v.sclass) &&		    (strncmp(c->u.name, path, len) == 0))			break;	}	if (!c) {		*sid = SECINITSID_UNLABELED;		rc = -ENOENT;		goto out;	}	if (!c->sid[0]) {		rc = sidtab_context_to_sid(&sidtab,					   &c->context[0],					   &c->sid[0]);		if (rc)			goto out;	}	*sid = c->sid[0];out:	POLICY_RDUNLOCK;	return rc;}/** * security_fs_use - Determine how to handle labeling for a filesystem. * @fstype: filesystem type * @behavior: labeling behavior * @sid: SID for filesystem (superblock) */int security_fs_use(	const char *fstype,	unsigned int *behavior,	u32 *sid){	int rc = 0;	struct ocontext *c;	POLICY_RDLOCK;	c = policydb.ocontexts[OCON_FSUSE];	while (c) {		if (strcmp(fstype, c->u.name) == 0)			break;		c = c->next;	}	if (c) {		*behavior = c->v.behavior;		if (!c->sid[0]) {			rc = sidtab_context_to_sid(&sidtab,						   &c->context[0],						   &c->sid[0]);			if (rc)				goto out;		}		*sid = c->sid[0];	} else {		rc = security_genfs_sid(fstype, "/", SECCLASS_DIR, sid);		if (rc) {			*behavior = SECURITY_FS_USE_NONE;			rc = 0;		} else {			*behavior = SECURITY_FS_USE_GENFS;		}	}out:	POLICY_RDUNLOCK;	return rc;}int security_get_bools(int *len, char ***names, int **values){	int i, rc = -ENOMEM;	POLICY_RDLOCK;	*names = NULL;	*values = NULL;	*len = policydb.p_bools.nprim;	if (!*len) {		rc = 0;		goto out;	}	*names = (char**)kmalloc(sizeof(char*) * *len, GFP_ATOMIC);	if (!*names)		goto err;	memset(*names, 0, sizeof(char*) * *len);	*values = (int*)kmalloc(sizeof(int) * *len, GFP_ATOMIC);	if (!*values)		goto err;	for (i = 0; i < *len; i++) {		size_t name_len;		(*values)[i] = policydb.bool_val_to_struct[i]->state;		name_len = strlen(policydb.p_bool_val_to_name[i]) + 1;		(*names)[i] = (char*)kmalloc(sizeof(char) * name_len, GFP_ATOMIC);		if (!(*names)[i])			goto err;		strncpy((*names)[i], policydb.p_bool_val_to_name[i], name_len);		(*names)[i][name_len - 1] = 0;	}	rc = 0;out:	POLICY_RDUNLOCK;	return rc;err:	if (*names) {		for (i = 0; i < *len; i++)			if ((*names)[i])				kfree((*names)[i]);	}	if (*values)		kfree(*values);	goto out;}int security_set_bools(int len, int *values){	int i, rc = 0;	int lenp, seqno = 0;	struct cond_node *cur;	POLICY_WRLOCK;	lenp = policydb.p_bools.nprim;	if (len != lenp) {		rc = -EFAULT;		goto out;	}	printk(KERN_INFO "security: committed booleans { ");	for (i = 0; i < len; i++) {		if (values[i]) {			policydb.bool_val_to_struct[i]->state = 1;		} else {			policydb.bool_val_to_struct[i]->state = 0;		}		if (i != 0)			printk(", ");		printk("%s:%d", policydb.p_bool_val_to_name[i],		       policydb.bool_val_to_struct[i]->state);	}	printk(" }\n");	for (cur = policydb.cond_list; cur != NULL; cur = cur->next) {		rc = evaluate_cond_node(&policydb, cur);		if (rc)			goto out;	}	seqno = ++latest_granting;out:	POLICY_WRUNLOCK;	if (!rc) {		avc_ss_reset(seqno);		selnl_notify_policyload(seqno);	}	return rc;}int security_get_bool_value(int bool){	int rc = 0;	int len;	POLICY_RDLOCK;	len = policydb.p_bools.nprim;	if (bool >= len) {		rc = -EFAULT;		goto out;	}	rc = policydb.bool_val_to_struct[bool]->state;out:	POLICY_RDUNLOCK;	return rc;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av亚洲产国偷v产偷v自拍| 欧美α欧美αv大片| 精品久久久网站| 亚洲日本韩国一区| 大白屁股一区二区视频| 日韩午夜av电影| 亚洲1区2区3区视频| 成人白浆超碰人人人人| 久久亚洲精华国产精华液| 亚洲福利视频三区| 一本到三区不卡视频| 国产欧美精品区一区二区三区| 免费成人美女在线观看.| 欧美天堂一区二区三区| 亚洲婷婷综合久久一本伊一区| 国产一区二区三区精品欧美日韩一区二区三区 | 久久久精品中文字幕麻豆发布| 亚洲一区二区av在线| 91亚洲大成网污www| 国产亚洲精品aa午夜观看| 久久精品国产精品亚洲综合| 欧美日韩精品免费| 亚洲动漫第一页| 欧美亚洲自拍偷拍| 亚洲精品乱码久久久久久黑人| 成人三级伦理片| 国产精品五月天| jiyouzz国产精品久久| 国产精品高潮呻吟| www.性欧美| 亚洲视频一区在线| 91女神在线视频| 伊人色综合久久天天人手人婷| 日本大香伊一区二区三区| 一级日本不卡的影视| 欧美系列日韩一区| 亚洲图片一区二区| 欧美精品一卡二卡| 日本麻豆一区二区三区视频| 日韩一区二区在线观看视频播放| 奇米一区二区三区| 久久精品人人做人人综合| 不卡的av网站| 一区二区成人在线视频| 在线中文字幕不卡| 青青草国产精品97视觉盛宴| 日韩欧美一级二级三级久久久| 国产在线精品一区二区三区不卡| 久久久久九九视频| 99re在线精品| 天堂久久久久va久久久久| 欧美zozo另类异族| 99久久免费精品高清特色大片| 亚洲精品水蜜桃| 欧美日韩国产影片| 国产精品白丝jk黑袜喷水| 国产精品久久久久久久久搜平片| 色8久久人人97超碰香蕉987| 日韩在线一区二区| 日本一区二区三区在线不卡| 色天使久久综合网天天| 日本aⅴ精品一区二区三区| 久久久久99精品国产片| 在线观看欧美精品| 久久99精品久久久久婷婷| 国产精品久久看| 欧美一区二区高清| 成人av电影免费观看| 日韩中文字幕不卡| 亚洲欧美综合另类在线卡通| 在线播放一区二区三区| 播五月开心婷婷综合| 蜜芽一区二区三区| 亚洲欧美一区二区视频| 精品少妇一区二区三区免费观看| 99久久久无码国产精品| 久久狠狠亚洲综合| 亚洲精品日日夜夜| 国产午夜精品在线观看| 3d动漫精品啪啪| 色美美综合视频| 国产精品一级在线| 午夜精品久久久久影视| 国产精品久久久久久久久快鸭 | 国产精品区一区二区三| 欧美男男青年gay1069videost| 国产成人一区在线| 日韩精品一卡二卡三卡四卡无卡| 中文字幕在线不卡| 国产亚洲一本大道中文在线| 在线不卡的av| 欧美无砖专区一中文字| 不卡的av在线| 国产精品 日产精品 欧美精品| 亚洲成人资源网| 一区二区三区在线不卡| 中文字幕日韩一区二区| 国产日韩综合av| 久久免费的精品国产v∧| 91精品啪在线观看国产60岁| 欧美亚洲日本国产| 91成人国产精品| 91麻豆精品一区二区三区| 不卡一卡二卡三乱码免费网站| 精品亚洲欧美一区| 美国毛片一区二区| 麻豆精品久久精品色综合| 日韩精品一级中文字幕精品视频免费观看 | 丝袜亚洲另类欧美综合| 亚洲一区二区欧美激情| 亚洲一区在线观看网站| 亚洲精品成人悠悠色影视| 亚洲伦理在线精品| 一区二区三区免费看视频| 一区二区在线观看免费| 亚洲欧美综合网| 一区二区激情小说| 三级影片在线观看欧美日韩一区二区| 亚洲一区二区三区四区在线| 亚洲一区二区三区四区在线免费观看 | 亚洲午夜在线视频| 亚洲国产视频a| 午夜亚洲国产au精品一区二区| 五月婷婷综合激情| 蜜桃精品在线观看| 国产精品一区二区在线观看不卡| 国内精品写真在线观看| 成人免费视频app| 日本久久一区二区三区| 欧美视频一区在线| 日韩欧美另类在线| 久久精品综合网| 亚洲欧美国产高清| 亚洲成人免费av| 狠狠色丁香久久婷婷综合_中| 国产高清不卡一区二区| 99久久精品免费看| 欧美精品亚洲一区二区在线播放| 日韩欧美第一区| 国产女人水真多18毛片18精品视频 | 日本欧美加勒比视频| 久久国产夜色精品鲁鲁99| 国产馆精品极品| 欧美三级韩国三级日本三斤 | 蜜桃精品视频在线| 成人福利在线看| 欧美二区乱c少妇| 亚洲国产精品精华液2区45| 夜夜爽夜夜爽精品视频| 久久国产免费看| 91麻豆国产在线观看| 日韩亚洲欧美在线观看| 国产精品福利在线播放| 奇米色一区二区三区四区| 99精品视频一区二区| 日韩亚洲欧美在线| 亚洲免费看黄网站| 国产在线播放一区二区三区| 欧美羞羞免费网站| 国产午夜精品一区二区| 日本人妖一区二区| 欧美性色aⅴ视频一区日韩精品| 2欧美一区二区三区在线观看视频| 一区二区三区在线观看动漫| 国产九色sp调教91| 欧美电影影音先锋| 亚洲免费看黄网站| 成人h精品动漫一区二区三区| 欧美一级日韩免费不卡| 亚洲乱码一区二区三区在线观看| 精品写真视频在线观看| 欧美妇女性影城| 亚洲欧美另类久久久精品2019| 国产高清在线观看免费不卡| 91精品国产免费| 亚洲女同一区二区| 成人一区二区三区视频| 精品999久久久| 青青草国产成人av片免费| 91高清视频在线| 亚洲欧洲av在线| 不卡一区二区三区四区| 亚洲国产精品二十页| 国内外成人在线视频| 精品欧美久久久| 精品一区二区三区久久久| 91精品国产黑色紧身裤美女| 一区二区三区日韩在线观看| 99国产精品一区| 亚洲视频一二三区| 色一区在线观看| 日韩理论片网站| 在线一区二区三区四区五区| 最新不卡av在线| 99久久免费精品高清特色大片| 中文字幕在线播放不卡一区| 9色porny自拍视频一区二区| 国产精品卡一卡二| 色94色欧美sute亚洲线路二| 一级做a爱片久久|