diff options
Diffstat (limited to 'libglusterfs/src/graph.c')
| -rw-r--r-- | libglusterfs/src/graph.c | 23 | 
1 files changed, 23 insertions, 0 deletions
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c index 990e96e2fd8..2cfed066919 100644 --- a/libglusterfs/src/graph.c +++ b/libglusterfs/src/graph.c @@ -232,6 +232,23 @@ glusterfs_graph_readonly (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx)  int +glusterfs_graph_acl (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx) +{ +        int ret = 0; +        cmd_args_t      *cmd_args = NULL; + +        cmd_args = &ctx->cmd_args; + +        if (!cmd_args->acl) +                return 0; + +        ret = glusterfs_graph_insert (graph, ctx, "system/posix-acl", +                                      "posix-acl-autoload"); +        return ret; +} + + +int  glusterfs_graph_mac_compat (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx)  {          int ret = 0; @@ -458,6 +475,12 @@ glusterfs_graph_prepare (glusterfs_graph_t *graph, glusterfs_ctx_t *ctx)                  return -1;          } +        ret = glusterfs_graph_acl (graph, ctx); +        if (ret) { +                gf_log ("graph", GF_LOG_ERROR, "glusterfs graph ACL failed"); +                return -1; +        } +          /* XXX: MAC COMPAT */          ret = glusterfs_graph_mac_compat (graph, ctx);          if (ret) {  | 
