/*
 * Function: getPidCon
 * Purpose: Get the context of a process identified by its pid
 * Parameters:
 *            pid: a jint representing the process
 * Returns: a jstring representing the security context of the pid,
 *          the jstring may be NULL if there was an error
 * Exceptions: none
 */
static jstring getPidCon(JNIEnv *env, jobject, jint pid) {
    if (isSELinuxDisabled) {
        return NULL;
    }

    security_context_t tmp = NULL;
    int ret = getpidcon(static_cast<pid_t>(pid), &tmp);
    Unique_SecurityContext context(tmp);

    ScopedLocalRef<jstring> securityString(env, NULL);
    if (ret != -1) {
        securityString.reset(env->NewStringUTF(context.get()));
    }

    ALOGV("getPidCon(%d) => %s", pid, context.get());
    return securityString.release();
}
Example #2
0
		tmap->mark_all_dirty();
	}
}

WRITE16_MEMBER(aerofgt_state::pspikes_gfxbank_w)
{
	if (ACCESSING_BITS_0_7)
	{
		setbank(m_bg1_tilemap, 0, (data & 0xf0) >> 4);
		setbank(m_bg1_tilemap, 1, data & 0x0f);
	}
}


WRITE16_MEMBER(aerofgt_state::karatblz_gfxbank_w)
{
	if (ACCESSING_BITS_8_15)
	{
		setbank(m_bg1_tilemap, 0, (data & 0x0100) >> 8);
		setbank(m_bg2_tilemap, 1, (data & 0x0800) >> 11);
	}
}

WRITE16_MEMBER(aerofgt_state::spinlbrk_gfxbank_w)
{
Example #3
0
	{
		setbank(m_bg1_tilemap, 0, (data & 0x07));
		setbank(m_bg2_tilemap, 1, (data & 0x38) >> 3);
	}
}

WRITE16_MEMBER(aerofgt_state::turbofrc_gfxbank_w)
{
	tilemap_t *tmap = (offset == 0) ? m_bg1_tilemap : m_bg2_tilemap;

	data = COMBINE_DATA(&m_bank[offset]);

	setbank(tmap, 4 * offset + 0, (data >> 0) & 0x0f);
	setbank(tmap, 4 * offset + 1, (data >> 4) & 0x0f);
	setbank(tmap, 4 * offset + 2, (data >> 8) & 0x0f);
	setbank(tmap, 4 * offset + 3, (data >> 12) & 0x0f);
}

WRITE16_MEMBER(aerofgt_state::aerofgt_gfxbank_w)
{
	tilemap_t *tmap = (offset < 2) ? m_bg1_tilemap : m_bg2_tilemap;

	data = COMBINE_DATA(&m_bank[offset]);

	setbank(tmap, 2 * offset + 0, (data >> 8) & 0xff);
	setbank(tmap, 2 * offset + 1, (data >> 0) & 0xff);
/*
 * Function: getFileCon
 * Purpose: retrieves the context associated with the given path in the file system
 * Parameters:
 *        path: given path in the file system
 * Returns:
 *        string representing the security context string of the file object
 *        the string may be NULL if an error occured
 * Exceptions: NullPointerException if the path object is null
 */
static jstring getFileCon(JNIEnv *env, jobject, jstring pathStr) {
    if (isSELinuxDisabled) {
        return NULL;
    }

    ScopedUtfChars path(env, pathStr);
    if (path.c_str() == NULL) {
        return NULL;
    }

    security_context_t tmp = NULL;
    int ret = getfilecon(path.c_str(), &tmp);
    Unique_SecurityContext context(tmp);

    ScopedLocalRef<jstring> securityString(env, NULL);
    if (ret != -1) {
        securityString.reset(env->NewStringUTF(context.get()));
    }

    ALOGV("getFileCon(%s) => %s", path.c_str(), context.get());
    return securityString.release();
}
Example #5
0
}

UINT32 aerofgt_state::aerofgt_ol2_tile_callback( UINT32 code )
{
	return m_spriteram2[code % (m_spriteram2.bytes()/2)];
}



/***************************************************************************

  Memory handlers

***************************************************************************/

WRITE16_MEMBER(aerofgt_state::aerofgt_bg1videoram_w)
{
	COMBINE_DATA(&m_bg1videoram[offset]);
	m_bg1_tilemap->mark_tile_dirty(offset);
}

WRITE16_MEMBER(aerofgt_state::aerofgt_bg2videoram_w)
{
	COMBINE_DATA(&m_bg2videoram[offset]);
	m_bg2_tilemap->mark_tile_dirty(offset);
}


void aerofgt_state::setbank( tilemap_t *tmap, int num, int bank )
{
	if (m_gfxbank[num] != bank)
	{