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