Show More
@@ -35,13 +35,13 b' A configuration section is available to ' | |||
|
35 | 35 | default, these entries are:: |
|
36 | 36 | |
|
37 | 37 | [factotum] |
|
38 |
|
|
|
39 |
|
|
|
38 | executable = /bin/auth/factotum | |
|
39 | mountpoint = /mnt/factotum | |
|
40 | 40 | service = hg |
|
41 | 41 | |
|
42 |
The |
|
|
43 |
|
|
|
44 | entry controls the service name used when reading keys. | |
|
42 | The executable entry defines the full path to the factotum binary. The | |
|
43 | mountpoint entry defines the path to the factotum file service. Lastly, the | |
|
44 | service entry controls the service name used when reading keys. | |
|
45 | 45 | |
|
46 | 46 | ''' |
|
47 | 47 | |
@@ -58,12 +58,12 b' def auth_getkey(self, params):' | |||
|
58 | 58 | if 'user=' not in params: |
|
59 | 59 | params = '%s user?' % params |
|
60 | 60 | params = '%s !password?' % params |
|
61 |
os.system("%s -g '%s'" % (_ |
|
|
61 | os.system("%s -g '%s'" % (_executable, params)) | |
|
62 | 62 | |
|
63 | 63 | def auth_getuserpasswd(self, getkey, params): |
|
64 | 64 | params = 'proto=pass %s' % params |
|
65 | 65 | while True: |
|
66 | fd = os.open('%s/rpc' % _mount, os.O_RDWR) | |
|
66 | fd = os.open('%s/rpc' % _mountpoint, os.O_RDWR) | |
|
67 | 67 | try: |
|
68 | 68 | try: |
|
69 | 69 | os.write(fd, 'start %s' % params) |
@@ -112,9 +112,9 b' def find_user_password(self, realm, auth' | |||
|
112 | 112 | return (user, passwd) |
|
113 | 113 | |
|
114 | 114 | def uisetup(ui): |
|
115 |
global _ |
|
|
116 |
_ |
|
|
117 |
global _ |
|
|
118 |
_ |
|
|
115 | global _executable | |
|
116 | _executable = ui.config('factotum', 'executable', '/bin/auth/factotum') | |
|
117 | global _mountpoint | |
|
118 | _mountpoint = ui.config('factotum', 'mountpoint', '/mnt/factotum') | |
|
119 | 119 | global _service |
|
120 | 120 | _service = ui.config('factotum', 'service', 'hg') |
General Comments 0
You need to be logged in to leave comments.
Login now