err = ipc_has_perm(&sma->sem_perm, SECCLASS_SEM, perms); 
err = ipc_has_perm(&sma->sem_perm, perms); 
static int selinux_sem_semctl(struct sem_array *sma, int cmd){	int err;	u32 perms;	switch(cmd) {	case IPC_INFO:	case SEM_INFO:		/* No specific object, just general system-wide information. */		return task_has_system(current, SYSTEM__IPC_INFO);	case GETPID:	case GETNCNT:	case GETZCNT:		perms = SEM__GETATTR;		break;	case GETVAL:	case GETALL:		perms = SEM__READ;		break;	case SETVAL:	case SETALL:		perms = SEM__WRITE;		break;	case IPC_RMID:		perms = SEM__DESTROY;		break;	case IPC_SET:		perms = SEM__SETATTR;		break;	case IPC_STAT:	case SEM_STAT:		perms = SEM__GETATTR | SEM__ASSOCIATE;		break;	default:		return 0;	}	err = ipc_has_perm(&sma->sem_perm, SECCLASS_SEM, perms);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6af963f1d6789ef20abca5696cd52a758b396e52/hooks.c/buggy/security/selinux/hooks.c