diff options
Diffstat (limited to 'lib/gitano/admincommand.lua')
-rw-r--r-- | lib/gitano/admincommand.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitano/admincommand.lua b/lib/gitano/admincommand.lua index be6bf0a..5f1bcf9 100644 --- a/lib/gitano/admincommand.lua +++ b/lib/gitano/admincommand.lua @@ -129,6 +129,7 @@ local function update_user_in_htpasswd(conf, userfrom, userto) return end local htpasswd_path = os.getenv("HOME") .. "/htpasswd" + local lock = util.lockfile(htpasswd_path .. ".lock") local fh = io.open(htpasswd_path, "r") if not fh then return end local to_write = {} @@ -151,6 +152,7 @@ local function update_user_in_htpasswd(conf, userfrom, userto) log.warn(i18n.expand("ERROR_UNABLE_TO_RENAME_INTO_PLACE", {what="htpasswd", reason=luxio.strerror(errno)})) end + util.unlockfile(lock) end local builtin_user_short = "Manage users in Gitano" |