]> oss.titaniummirror.com Git - repo_shell.git/blobdiff - git_acl.c
Proper free on execvp fail
[repo_shell.git] / git_acl.c
index 6af2c2c03bd0ec896004f1e5d366d2d562f88cb2..4bb75ee46fe715788da76b44ae6415db956ffbf7 100644 (file)
--- a/git_acl.c
+++ b/git_acl.c
@@ -28,6 +28,7 @@
 #include "utility.h"
 #include "mystrtok.h"
 #include "stra.h"
+#include "match.h"
 #include "git_acl.h"
 
 enum {
@@ -121,7 +122,7 @@ static bool str_has_word(const char* string, const char* word)
   char *p = my_strtok(&s, " \t\n");
 
   while (p) {
-    if (!strcmp(p, word)) {
+    if (match(p, word)) {
       free(_s);
       return true;
     }
@@ -159,8 +160,8 @@ static int acl_handler(void* user, const char* section, const char* name,
     if (!repo || my_strtok(&p, " \t\n"))
       die("acl_handler: badly formatted section '%s'", section);
     /* repo is repo name, name is userid, value is permission */
-    if (stra_find(&acl->repoids, repo) >= 0 &&
-        stra_find(&acl->userids, name) >= 0) {
+    if (stra_match(&acl->repoids, repo) >= 0 &&
+        stra_match(&acl->userids, name) >= 0) {
       acl->perms = perms_from_str(value);
       set_lm_repoid(repo);
       set_lm_userid(name);