Ejemplo n.º 1
0
static void system_exitspawn(void)
{
#ifdef HAVE_RARCH_EXEC

#ifdef IS_SALAMANDER
   system_exec(libretro_path, false);

   cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_GAME);
   cellSysmoduleLoadModule(CELL_SYSMODULE_FS);
   cellSysmoduleLoadModule(CELL_SYSMODULE_IO);
#else
   char core_launch[256];
#ifdef HAVE_MULTIMAN 
   if (g_extern.lifecycle_state & (1ULL << MODE_EXITSPAWN_MULTIMAN))
   {
      RARCH_LOG("Boot Multiman: %s.\n", MULTIMAN_SELF_FILE);
      strlcpy(core_launch, MULTIMAN_SELF_FILE, sizeof(core_launch));
   }
   else
#endif
   strlcpy(core_launch, g_settings.libretro, sizeof(core_launch));
   bool should_load_game = false;
   if (g_extern.lifecycle_state & (1ULL << MODE_EXITSPAWN_START_GAME))
      should_load_game = true;

   system_exec(core_launch, should_load_game);
#endif

#endif

}
Ejemplo n.º 2
0
static void system_exitspawn(void)
{
#ifdef IS_SALAMANDER
   system_exec(libretro_path, false);
#else
   bool should_load_game = false;
   if (g_extern.lifecycle_state & (1ULL << MODE_EXITSPAWN_START_GAME))
      should_load_game = true;

   system_exec(g_settings.libretro, should_load_game);
#endif
}
Ejemplo n.º 3
0
static void system_exitspawn(void)
{
#if defined(IS_SALAMANDER)
   system_exec(libretro_path, gx_rom_path[0] != '\0' ? true : false);
#elif defined(HW_RVL)
   bool should_load_game = false;
   if (g_extern.lifecycle_state & (1ULL << MODE_EXITSPAWN_START_GAME))
      should_load_game = true;

   system_exec(g_settings.libretro, should_load_game);
   // direct loading failed (out of memory), try to jump to salamander then load the correct core
   char boot_dol[PATH_MAX];
   fill_pathname_join(boot_dol, default_paths.core_dir, "boot.dol", sizeof(boot_dol));
   system_exec(boot_dol, should_load_game);
#endif
}
Ejemplo n.º 4
0
/** The auth callback responds to a request to serve from the authdir */
void
http_nodogsplash_callback_auth(httpd *webserver, request *r)
{
	s_config *config;
	t_client  *client;
	t_auth_target *authtarget;
	char /**ip, *mac,*/ *msg = NULL, *data = NULL;
	int seconds;

	client = http_nodogsplash_add_client(r);
	/* http_nodogsplash_add_client() should log and return null on error */
	if(!client) return;

	/* Get info we need from request, and do action */
	authtarget = http_nodogsplash_decode_authtarget(r);
	config = config_get_config();

	if (config->bin_voucher && ((authtarget->voucher) || (config->force_voucher))) {

		if (!client)
			goto serve_splash;

		if (!authtarget->voucher || !http_isAlphaNum(authtarget->voucher))
			goto serve_splash;

		char cmd_buff[strlen(config->bin_voucher)+strlen(client->mac)+strlen(authtarget->voucher)+16];
		snprintf(cmd_buff, sizeof(cmd_buff), "%s auth_voucher %s %s",
				 config->bin_voucher, client->mac, authtarget->voucher);
		data = system_exec(cmd_buff);

		if (!data)
			goto serve_splash;

		seconds = data_extract_bw(data, client);
		if(seconds < 1)
			goto serve_splash;

		debug(LOG_NOTICE, "Remote voucher: client [%s, %s] authenticated %d seconds",
			  client->mac, client->ip, seconds);

		free(data);
		http_nodogsplash_callback_action(r,authtarget,AUTH_MAKE_AUTHENTICATED);
		client->added_time = time(NULL) - (config->checkinterval * config->clientforceout) + seconds;
	} else if(http_nodogsplash_check_userpass(r,authtarget)) {
		http_nodogsplash_callback_action (r,authtarget,AUTH_MAKE_AUTHENTICATED);
	} else {
		/* Password check failed; just serve them the splash page again */
serve_splash:
		if (data) {
			msg = strchr(data, ' ');
			if (msg)
				msg++;
		}
		http_nodogsplash_serve_splash(r,authtarget,client,msg);
		free(data);
	}

	http_nodogsplash_free_authtarget(authtarget);
}
Ejemplo n.º 5
0
bool
dbg_run_satex_is_no_sat(ch_string f_nam){
	bool is_no_sat = true;
#ifdef FULL_DEBUG

	if(file_exists(f_nam)){
		ch_string o_str = "satex -s " + f_nam;

		system_exec(o_str);
		ch_string lg_nm = get_satex_log_name(f_nam, LOG_SATEX_NM_RESULTS);

		RSATX_CK(file_exists(lg_nm));
		is_no_sat = all_results_batch_instances(lg_nm, bjr_no_satisf);
		MARK_USED(is_no_sat);
	}
#endif
	return is_no_sat;
}
Ejemplo n.º 6
0
/** Respond to attempted access from a preauthenticated client.
 *  Add the client to the client list and serves the splash page.
 */
void
http_nodogsplash_first_contact(request *r)
{
	t_client *client;
	t_auth_target *authtarget;
	s_config *config;
	const char *redir;
	char *origurl;
	char *data = NULL;
	int seconds;

	/* only allow GET requests */
	if (r->request.method != HTTP_GET) {
		http_nodogsplash_405(r);
		return;
	}
	config = config_get_config();

	client = http_nodogsplash_add_client(r);
	/* http_nodogsplash_add_client() should log and return null on error */
	if(!client) return;

	/* We just assume protocol http; after all we caught the client by
	   redirecting port 80 tcp packets
	*/
	safe_asprintf(&origurl,"http://%s%s%s%s",
				  r->request.host,r->request.path,
				  r->request.query[0]?"?":"",r->request.query);

	/* Create redirect URL for this contact as appropriate */
	redir = http_nodogsplash_make_redir(origurl);

	/* Create authtarget with all needed info */
	authtarget = http_nodogsplash_make_authtarget(client->token,redir);

	free(origurl);

	if(config->authenticate_immediately) {
		/* Don't serve splash, just authenticate */
		http_nodogsplash_callback_action(r,authtarget,AUTH_MAKE_AUTHENTICATED);
	} else if (config->enable_preauth) {
		char cmd_buff[strlen(config->bin_voucher)+strlen(client->mac)+14];
		snprintf(cmd_buff, sizeof(cmd_buff), "%s auth_status %s",
				 config->bin_voucher, client->mac);
		data = system_exec(cmd_buff);

		if(!data)
			goto serve_splash;

		seconds = data_extract_bw(data, client);
		if(seconds < 1)
			goto serve_splash;

		debug(LOG_NOTICE, "Remote auth data: client [%s, %s] authenticated %d seconds",
			  client->mac, client->ip, seconds);
		http_nodogsplash_callback_action(r,authtarget,AUTH_MAKE_AUTHENTICATED);
		client->added_time = time(NULL) - (config->checkinterval * config->clientforceout) + seconds;
		free(data);
	} else {
		/* Serve the splash page (or redirect to remote authenticator) */
serve_splash:
		free(data);
		http_nodogsplash_serve_splash(r,authtarget, client, NULL);
	}

	http_nodogsplash_free_authtarget(authtarget);
}