#define CFG_FILE "/etc/repo_shell.conf"
#define SHELL "/bin/bash"
+#define GIT_ACL_FILE ".gitacls"
typedef struct {
char *user;
return narg;
}
-static char *add_prefix(char *prefix, char* arg)
+static char *add_prefix(const char *prefix, const char* arg)
{
- char *narg = arg;
+ char *narg;
int i;
if (arg && prefix && (i = strlen(prefix))) {
if (!strcmp(name, "svn_root"))
pconfig->svn_root = xstrdup(value);
- else if (!strcmp(name, "git_root"))
+ else if (!strcmp(name, "git_root")) {
pconfig->git_root = xstrdup(value);
- else if (!strcmp(name, "owner"))
+ pconfig->git_acl_file = add_prefix(value, GIT_ACL_FILE);
+ } else if (!strcmp(name, "owner"))
pconfig->owner = xstrdup(value);
- else if (!strcmp(name, "git_acl_file"))
- pconfig->git_acl_file = xstrdup(value);
else if (!strcmp(name, "allow_interactive"))
pconfig->allow_interactive = str_has_word(value, pconfig->user);
else