CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Sat, 19 Jul 2025 06:22:25 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20071205173754
location: https://web.archive.org/web/20071205173754/https://wiki.python.org/moin/MacPython/Authorization
server-timing: captures_list;dur=0.684632, exclusion.robots;dur=0.026945, exclusion.robots.policy;dur=0.012955, esindex;dur=0.011649, cdx.remote;dur=10.004606, LoadShardBlock;dur=243.055046, PetaboxLoader3.datanode;dur=46.714798, PetaboxLoader3.resolve;dur=193.772517
x-app-server: wwwb-app219
x-ts: 302
x-tr: 277
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app219; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Sat, 19 Jul 2025 06:22:26 GMT
content-type: text/html;charset=utf-8
x-archive-orig-date: Wed, 05 Dec 2007 17:37:54 GMT
x-archive-orig-server: Apache/2.0.54 (Debian GNU/Linux) mod_fastcgi/2.4.2
x-archive-orig-connection: close
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Wed, 05 Dec 2007 17:37:54 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 05 Nov 2007 09:09:13 GMT", ; rel="prev memento"; datetime="Mon, 05 Nov 2007 09:09:13 GMT", ; rel="memento"; datetime="Wed, 05 Dec 2007 17:37:54 GMT", ; rel="next memento"; datetime="Mon, 22 Dec 2008 10:51:01 GMT", ; rel="last memento"; datetime="Thu, 07 Jul 2022 06:44:21 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_0_20071205155413_crawl108-c/51_0_20071205173322_crawl107.arc.gz
server-timing: captures_list;dur=0.586938, exclusion.robots;dur=0.020508, exclusion.robots.policy;dur=0.009686, esindex;dur=0.012513, cdx.remote;dur=6.411908, LoadShardBlock;dur=163.768727, PetaboxLoader3.datanode;dur=192.498639, load_resource;dur=205.483975, PetaboxLoader3.resolve;dur=69.636000
x-app-server: wwwb-app219
x-ts: 200
x-tr: 436
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
MacPython/Authorization - PythonInfo Wiki
MacPython/Authorization
Authorization
Authorization is a Python wrapper for Apple's Authorization API. Basically, it allows you to spawn arbitrary processes as root after successfully authenticating as an administrator. This is useful for installers, twiddling kernel settings (via sysctl or the like), etc.
status
Authorization is currently at its first public release, 0.1.
examples
1 import os, sys, struct, tempfile
2 from Authorization import Authorization, kAuthorizationFlagDestroyRights
3
4 AUTHORIZEDTOOL = "#!%s\n%s" % (sys.executable,
5 r"""
6 import os
7 print os.getuid(), os.geteuid()
8 os.setuid(0)
9 print "I'm root!"
10 """)
11
12 def main():
13 auth = Authorization(destroyflags=(kAuthorizationFlagDestroyRights,))
14 fd, name = tempfile.mkstemp('.py')
15 os.write(fd, AUTHORIZEDTOOL)
16 os.close(fd)
17 os.chmod(name, 0700)
18 try:
19 pipe = auth.executeWithPrivileges(name)
20 sys.stdout.write(pipe.read())
21 pipe.close()
22 finally:
23 os.unlink(name)
24
25 if __name__=='__main__':
26 main()
homepage
EditText (last edited 2007-10-20 00:12:59 by DavidBoddie)
DeleteCache (cached 2007-11-21 18:32:42)- Login
- Navigation
- Actions
- Your recent pages