LCOV - code coverage report
Current view: top level - providers/ad - ad_sudo.c (source / functions) Hit Total Coverage
Test: .coverage.total Lines: 0 10 0.0 %
Date: 2015-10-19 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /*
       2             :     SSSD
       3             : 
       4             :     AD SUDO Provider Initialization functions
       5             : 
       6             :     Authors:
       7             :         Sumit Bose <sbose@redhat.com>
       8             : 
       9             :     Copyright (C) 2014 Red Hat
      10             : 
      11             :     This program is free software; you can redistribute it and/or modify
      12             :     it under the terms of the GNU General Public License as published by
      13             :     the Free Software Foundation; either version 3 of the License, or
      14             :     (at your option) any later version.
      15             : 
      16             :     This program is distributed in the hope that it will be useful,
      17             :     but WITHOUT ANY WARRANTY; without even the implied warranty of
      18             :     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19             :     GNU General Public License for more details.
      20             : 
      21             :     You should have received a copy of the GNU General Public License
      22             :     along with this program.  If not, see <http://www.gnu.org/licenses/>.
      23             : */
      24             : 
      25             : #include "providers/ad/ad_common.h"
      26             : #include "providers/ldap/sdap_sudo.h"
      27             : 
      28           0 : int ad_sudo_init(struct be_ctx *be_ctx,
      29             :                  struct ad_id_ctx *id_ctx,
      30             :                  struct bet_ops **ops,
      31             :                  void **pvt_data)
      32             : {
      33             :     int ret;
      34             :     struct ad_options *ad_options;
      35             :     struct sdap_options *ldap_options;
      36             : 
      37           0 :     DEBUG(SSSDBG_TRACE_INTERNAL, "Initializing sudo AD back end\n");
      38             : 
      39           0 :     ret = sdap_sudo_init(be_ctx, id_ctx->sdap_id_ctx, ops, pvt_data);
      40           0 :     if (ret != EOK) {
      41           0 :         DEBUG(SSSDBG_OP_FAILURE, "Cannot initialize LDAP SUDO [%d]: %s\n",
      42             :                                  ret, strerror(ret));
      43           0 :         return ret;
      44             :     }
      45             : 
      46           0 :     ad_options = id_ctx->ad_options;
      47           0 :     ldap_options = id_ctx->sdap_id_ctx->opts;
      48             : 
      49           0 :     ad_options->id->sudorule_map = ldap_options->sudorule_map;
      50           0 :     return EOK;
      51             : }

Generated by: LCOV version 1.10