LCOV - code coverage report
Current view: top level - source3/winbindd - winbindd_locator.c (source / functions) Hit Total Coverage
Test: coverage report for master 98b443d9 Lines: 10 13 76.9 %
Date: 2024-05-31 13:13:24 Functions: 3 3 100.0 %

          Line data    Source code
       1             : /*
       2             :    Unix SMB/CIFS implementation.
       3             : 
       4             :    Winbind daemon - miscellaneous other functions
       5             : 
       6             :    Copyright (C) Tim Potter      2000
       7             :    Copyright (C) Andrew Bartlett 2002
       8             : 
       9             :    This program is free software; you can redistribute it and/or modify
      10             :    it under the terms of the GNU General Public License as published by
      11             :    the Free Software Foundation; either version 3 of the License, or
      12             :    (at your option) any later version.
      13             : 
      14             :    This program is distributed in the hope that it will be useful,
      15             :    but WITHOUT ANY WARRANTY; without even the implied warranty of
      16             :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17             :    GNU General Public License for more details.
      18             : 
      19             :    You should have received a copy of the GNU General Public License
      20             :    along with this program.  If not, see <http://www.gnu.org/licenses/>.
      21             : */
      22             : 
      23             : #include "includes.h"
      24             : #include "winbindd.h"
      25             : 
      26             : #undef DBGC_CLASS
      27             : #define DBGC_CLASS DBGC_WINBIND
      28             : 
      29             : 
      30             : static struct winbindd_child *static_locator_child = NULL;
      31             : 
      32         111 : struct winbindd_child *locator_child(void)
      33             : {
      34         111 :         return static_locator_child;
      35             : }
      36             : 
      37          10 : struct dcerpc_binding_handle *locator_child_handle(void)
      38             : {
      39          10 :         return static_locator_child->binding_handle;
      40             : }
      41             : 
      42          45 : NTSTATUS init_locator_child(TALLOC_CTX *mem_ctx)
      43             : {
      44          45 :         if (static_locator_child != NULL) {
      45           0 :                 DBG_ERR("locator child already allocated\n");
      46           0 :                 return NT_STATUS_INTERNAL_ERROR;
      47             :         }
      48             : 
      49          45 :         static_locator_child = talloc_zero(mem_ctx, struct winbindd_child);
      50          45 :         if (static_locator_child == NULL) {
      51           0 :                 return NT_STATUS_NO_MEMORY;
      52             :         }
      53             : 
      54          45 :         setup_child(NULL, static_locator_child, "log.winbindd", "locator");
      55          45 :         return NT_STATUS_OK;
      56             : }

Generated by: LCOV version 1.14