"Fossies" - the Fresh Open Source Software Archive

Member "sssd-2.2.3/src/providers/ad/ad_autofs.c" (30 Nov 2019, 1684 Bytes) of package /linux/misc/sssd-2.2.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ad_autofs.c" see the Fossies "Dox" file reference documentation.

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