Welcome to little lamb

Code » anopa » commit 2857e6e

reset: Fix init_repo being in read-only mode

author Olivier Brunel
2018-01-27 14:56:54 UTC
committer Olivier Brunel
2018-01-28 14:47:32 UTC
parent 9ee80555dce0d4ead142af5c9bf9d5fc30c2d3dc

reset: Fix init_repo being in read-only mode

We should really init_repo() in write mode, since we intend to change service
statuses. It would otherwise fail (EPERM) when trying to write the
service file, but still.

src/anopa/aa-reset.c +1 -1

diff --git a/src/anopa/aa-reset.c b/src/anopa/aa-reset.c
index 95ea5df..a552627 100644
--- a/src/anopa/aa-reset.c
+++ b/src/anopa/aa-reset.c
@@ -232,7 +232,7 @@ main (int argc, char * const argv[])
     if (argc < 1 || mode == MODE_NONE)
         dieusage (RC_FATAL_USAGE);
 
-    r = aa_init_repo (path_repo, AA_REPO_READ);
+    r = aa_init_repo (path_repo, AA_REPO_WRITE);
     if (r < 0)
         aa_strerr_diefu2sys (RC_FATAL_INIT_REPO, "init repository ", path_repo);