monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone.contrib.usher: 32937faee71b


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone.contrib.usher: 32937faee71bb1b0c312d9f294ea9e124921a423
Date: Wed, 19 Jan 2011 08:21:59 GMT

revision:            32937faee71bb1b0c312d9f294ea9e124921a423
date:                2011-01-19T07:36:06
author:              Richard Levitte <address@hidden>
branch:              net.venge.monotone.contrib.usher
changelog:
Provide a simple version of authorize_remote_automate.lua, that works
with monotone < 1.0 .

Really, those who use usherctl are encouraged to use 'usherctl addkey
... -t ra' anyway, so the use of remote-automate-permissions.d is not
really needed here.


manifest:
format_version "1"

new_manifest [be503b54da91beb2f59e5f28cd9f8e0131feeae6]

old_revision [16c4bbbb9ceb649dbc1fbff5669ee5f7ce2cf311]

patch "utils/usherctl"
 from [bd5a99baf454e2414ff514e236aa8bfb69aecf5c]
   to [ebc251598e05d0d71aed487c0dc8ef4bb87b2537]
============================================================
--- utils/usherctl	bd5a99baf454e2414ff514e236aa8bfb69aecf5c
+++ utils/usherctl	ebc251598e05d0d71aed487c0dc8ef4bb87b2537
@@ -856,12 +856,16 @@ exit
 #       _safe_commands = ARA_safe_commands
 #    end
 # 
-#    function _get_remote_automate_permitted(key_identity, permfilename)
-#       if not exists(permfilename) or isdir(permfilename) then return false end
-#       local permfile = io.open(permfilename, "r")
+#    local _save_get_remote_automate_permitted = get_remote_automate_permitted
+#    function get_remote_automate_permitted(key_identity, command, options)
+#       local permfile =
+# 	 io.open(get_confdir() .. "/remote-automate-permissions", "r")
 #       if (permfile == nil) then
 # 	 return false
 #       end
+# 
+#       -- See if the incoming key matches any of the key identities or
+#       -- patterns found in the permissions file.
 #       local matches = false
 #       local line = permfile:read()
 #       while (not matches and line ~= nil) do
@@ -874,30 +878,8 @@ exit
 # 	 end
 #       end
 #       io.close(permfile)
-#       return matches
-#    end
+#       if matches then return true end
 # 
-#    local _save_get_remote_automate_permitted = get_remote_automate_permitted
-#    function get_remote_automate_permitted(key_identity, command, options)
-#       local permfilename = get_confdir() .. "/remote-automate-permissions"
-#       local permdirname = permfilename .. ".d"
-# 
-#       -- See if the incoming key matches any of the key identities or
-#       -- patterns found in the permissions file.
-#       if _get_remote_automate_permitted(key_identity, permfilename) then
-# 	 return true
-#       end
-#       if isdir(permdirname) then
-# 	 local files = read_directory(permdirname)
-# 	 table.sort(files)
-# 	 for _,f in ipairs(files) do
-# 	    pf = permdirname.."/"..f
-# 	    if _get_remote_automate_permitted(key_identity, pf) then
-# 	       return true
-# 	    end
-# 	 end
-#       end
-# 
 #       -- No matching key found, let's see if the command matches one the
 #       -- admin allowed to be performed anonymously
 #       for _,v in ipairs(_safe_commands) do

reply via email to

[Prev in Thread] Current Thread [Next in Thread]