sandbox

Dropping promised files on to application icon in Dock

半城伤御伤魂 提交于 2019-11-29 04:44:09
Is it possible to open promised files NSFilesPromisePboardType in sandboxed application when dropping on to application icon in Dock? The Dock icon is accepting the drop, but -application:openFile: is never called. The only reference I found are pre sandbox: Accepting iCal events dropped on my application's icon rdar://47917787 Let's break this down: NSApplication and NSDocumentController in NSDocument based apps gives you -application:openFile: or -openDocumentWithContentsOfURL:display:completionHandler: for free in case of NSFilenamesPboardType and NSURLPboardType drops. Note: I think under

Refused to execute inline event handler because it violates CSP. (SANDBOX)

回眸只為那壹抹淺笑 提交于 2019-11-29 03:38:25
I'm developing a google chrome packaged app, when I put Sandbox in the manifest.json : { "manifest_version": 2, "name": "WM32216", "version": "2.1", "minimum_chrome_version": "23", "permissions":["webview", "https://ajax.googleapis.com/*"], "sandbox":{ "pages":["index.html"] }, "app": { "background": { "scripts": ["main.js"] } } } An onclick event on my anchor tag works, and the flow of the app is complete EXCEPT THAT, icons from a CSS stylesheet don't load. I got an error from the console that File not found , but those are just fonts so it's fine with me, The big problem is that, the video

技术分享 | 如何使用 dbdeployer 快速搭建 MySQL 测试环境

断了今生、忘了曾经 提交于 2019-11-29 01:57:29
作者:余振兴 一、工具介绍 dbdeployer 是一款十分强大的数据库测试环境部署工具,可实现一键部署不同架构、不同版本的数据库环境。 如:MySQL 主从复制、GTID 模式复制、MySQL 组复制(单主模式、多主模式等) 完整的数据库类型支持及版本,可在安装完 dbdeployer 后使用 dbdeployer admin capabilities 命令进行查看,以下是当前已支持数据库及组件类型 Oracle MySQL Percona MySQL MariaDB TiDB MySQL NDB Cluster Percona XtraDB Cluster mysql-shell 本文主要介绍基于 dbdeployer 工具快速搭建 MySQL 测试环境以及 dbdeployer 的基础使用。完整的功能特性以及使用方式可查看 dbdeployer 文档手册,dbdeployer 的文档手册十分详细的介绍了该工具特性及各类使用方式,可查看文末的相关链接。 二、工具安装 本文以 MacOS 下部署为例,Linux 平台安装部署方式基本类似( 该工具不提供 Windows 版本 ),可访问 https://github.com/datacharmer/dbdeployer/releases 获取最新版 dbdeployer 下载链接,以下内容中 shell> 表示命令行提示符 ```

Creating a security scope bookmark for a file from one of a directory containing it

爷,独闯天下 提交于 2019-11-29 01:56:27
I have a security scope bookmark for a directory, provided by a user via an openDialog request. I'm trying to create another security scope bookmark for a file inside this directory: NSURL *musicFolder = /* Secured URL Resolved from a NSData, bookmark not stale */; if (![musicFolder startAccessingSecurityScopedResource]) { NSLog(@"Error accessing bookmark."); } NSString *file = @"myfile.txt"; /* This file exists inside the directory */ NSURL *pathURL = [musicFolder URLByAppendingPathComponent:file]; NSError *systemError; NSData *bookmarkData = [pathURL bookmarkDataWithOptions

Create java sandbox based on security policies

半世苍凉 提交于 2019-11-29 01:27:17
I need to create environment to run potentially untrusted code. Program allowed to connect to preconfigured address:port and nothing else (even read the system time). I have compiled the class whitelist. I'd searched similar questions, but found only template that based on SecurityManager which AFAIK is deprecated. Can anybody give me a simple sample how to run code in sandbox based on security policies and AccessController? As far as I know it's still SecurityManager that runs the security checks. But it seems to delegate to the AccessController nowadays. First you'll need to switch on the

Can you update a sandboxed Mac app using Sparkle or something similar?

自闭症网瘾萝莉.ら 提交于 2019-11-29 00:44:18
问题 For those distributing Mac apps outside the Mac App Store, how are you planning to support updating and sandboxing? I'm guessing most people's answers for the time being is that they're not, but I hope that eventually non-MAS apps could be sandboxed just like MAS apps. To use Sparkle, your app would need network access, which could be granted, as well as the ability to overwrite itself in Applications. Currently you could do this with the com.apple.security.temporary-exception.files.absolute

How to sandbox a command line tool?

廉价感情. 提交于 2019-11-28 21:41:29
问题 I've a simple unix tool made by me that launches the main cocoa app from a shell. I need to sandbox it but when I run it, it crashes with error "Illegal instruction: 4", on console.app I can see the following error message Sandbox creation failed: Container object initialization failed: NIL container info object with no error description for visdiff The file is correctly signed with codesign. I've read the post Mac OS app, sandbox with command line tool? but it doesn't help 回答1: I was having

Enabling start at login with App Sandbox enabled

自作多情 提交于 2019-11-28 21:33:23
I have an application that must be sandboxed. It's not a difficult task, but I see that I cannot enable automatic start at login with LSSharedFileList editing the Session Login Items list. Is there another way to enable start at login with App Sandbox enabled? An updated project/tutorial is available here, with addendums for some misleading Console messages you'll see under 10.8.2: http://blog.timschroeder.net/2012/07/03/the-launch-at-login-sandbox-project/ I'm not the author, but the tutorial was very helpful in getting a start-at-login app configured under 10.8.2 w/ Sandboxing enabled. Apple

Mac OS app, sandbox with command line tool?

我与影子孤独终老i 提交于 2019-11-28 21:16:48
I've made an app which includes a command-line tool. I have enabled the app's sandbox, and tested that it works. I've also code-signed both the app and the command line tool. But when I upload the app to iTunes, I received a email telling me "App sandbox not enabled". Apparently I need to set entitlement file of key com.apple.security.app-sandbox with true value, and list the executables: /Contents/MacOS/myApp and /contents/Frameworks/x86/myCommandLineTool . I'm sure I've enabled sandbox in Xcode, so I thought the problem was with the command line tool. How can I enable sandbox for command

Python: block network connections for testing purposes?

假如想象 提交于 2019-11-28 20:36:57
I'm trying to test a package that provides interfaces to a few web services. It has a test suite that is supposed to test most functions without connecting to the internet. However, there are some lingering tests that may attempt to connect to the internet / download data, and I'd like to prevent them from doing so for two reasons: first, to make sure my test suite works if no network connection is available; second, so that I'm not spamming the web services with excess queries. An obvious solution is to unplug my machine / turn off wireless, but when I'm running tests on a remote machine that