diff --git a/git-auth.c b/git-auth.c
index ab1a5d6..9d218f8 100644
--- a/git-auth.c
+++ b/git-auth.c
@@ -76,6 +76,17 @@ static void log_rule (const char *op, s_rule *rule)
syslog(LOG_INFO, "%s %s", op, msg);
}
+static void log_rules (s_rule rules[RULES_MAX])
+{
+ int r = 0;
+ while (rules[r].user) {
+ char buf[16];
+ snprintf(buf, 15, "%d", r);
+ log_rule(buf, &rules[r]);
+ r++;
+ }
+}
+
static void log_cmd (const char *op, int argc, const char **argv)
{
char msg[2048];
@@ -171,6 +182,7 @@ int main (int argc, char **argv)
cmd_argv[1] = argv[2];
cmd_argv[2] = argv[3];
read_rules(rules, "/etc/git-auth.conf");
+ log_rules(rules);
auth_ok = auth(rules, 3, cmd_argv);
log_cmd(auth_ok ? "ALLOW" : "DENY", 3, cmd_argv);
if (auth_ok) {