Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Deploying Software Securely > ROLLING YOUR OWN INSTALLER

10.4. ROLLING YOUR OWN INSTALLER

The most important fact about custom installers in this book is this: I do not recommend building your own installer. It's a good way to get all the disadvantages of Apple's Installer without any of the advantages. Custom installer applications do not integrate well with the deployment tools used by systems administrators, and are always more complicated than drag-installs. The user effectively needs to deploy the installer application before following its workflow to get at the real product, and then must remove the installer.

To reliably deploy files to locations outside the user's home directory, an installer application needs to acquire appropriate privileges (while administrator accounts can write to /Applications and /Library, the user running the installer might not be an admin, so you need to test). Authorization Services provides a function, AuthorizationExecuteWithPrivileges(), to run an installer process as the root user. A successful call to AuthorizationExecuteWithPrivileges() requires the system.privilege.admin right, and on completion the installer process receives a copy of the Authorization Services session containing that right. The installer should make sure before doing its work that it really did acquire that right, by receiving an external form of the authorization reference (this was covered in Chapter 6: see the section "Factored Applications with Authorization Services"). The application and helper can communicate with each other, to the standard input and output of the installer tool.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint