Setuid 使 iPhone 应用程序以 root 身份运行
我正在尝试让我的 iPhone 应用程序以 root 身份运行,我被告知要 setuid, 我不知道该怎么做。
Im am trying to make my iphone app run as root, and i was told to setuid, I do not know how to do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您遵循 Apple 的开发准则,则无法以 root 身份运行应用程序,并且无法访问您自己的应用程序空间(称为“应用程序主目录”)之外的任何资源。
应用程序主目录由以下部分组成:
(1) myApp.app(捆绑包 - 代码签名且不可更改)
- myApp、mainWindow.xib、somepicture.png 等
(二)文件
- 安装后在运行时创建的文件
(3) 图书馆
- 缓存、首选项等
为了访问这些之外的任何资源,您需要调用他们的 iOS API。
这种应用程序的划分是苹果安全模型的核心部分。它使包管理变得更加容易,并且比应用程序在文件系统上拥有根级权限更安全。
艾伦
If you follow Apple's development guidelines, you can not run the application as root, and you can not access any resources outside of your your own application space, called its "application home directory".
The application home directory is made up of the following:
(1) myApp.app (the bundle — code-signed, and un-changeable)
- myApp, mainWindow.xib, somepicture.png, etc
(2) Documents
- files created at run-time, after installation
(3) Library
- caches, preferences, etc
In order to access any resources outside of those, you'll need to call their iOS API's.
This compartmentalization of the applications is a core part of Apple's security model. It makes package management much easier, and it is much safer than if applications had root-level permissions across the filesystem.
Alan