1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib: relicense smb_strtoul(l) under LGPLv3

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug  3 22:21:04 UTC 2020 on sn-devel-184
This commit is contained in:
Ralph Boehme 2020-07-03 08:11:20 +02:00 committed by Jeremy Allison
parent 611e643d14
commit 2327471756
67 changed files with 285 additions and 169 deletions

View File

@ -27,6 +27,7 @@
#include "protocol.h"
#include "protocol_util.h"
#include "lib/util/util.h"
#include "lib/util/smb_strtox.h"
static struct {
enum ctdb_runstate runstate;

View File

@ -30,6 +30,7 @@
#include "lib/util/sys_rw.h"
#include "lib/util/tevent_unix.h"
#include "lib/util/util.h"
#include "lib/util/smb_strtox.h"
/* protocol.h is just needed for ctdb_sock_addr, which is used in system.h */
#include "protocol/protocol.h"

View File

@ -32,6 +32,7 @@
#include "lib/util/time.h"
#include "lib/util/tevent_unix.h"
#include "lib/util/util.h"
#include "lib/util/smb_strtox.h"
#include "protocol/protocol.h"
#include "protocol/protocol_api.h"

View File

@ -27,6 +27,7 @@
#include <tevent.h>
#include "lib/util/util.h"
#include "lib/util/smb_strtox.h"
/*
* ctdb_cluster_mutex.c is included below. This requires a few hacks...

View File

@ -34,6 +34,7 @@
#include "lib/util/debug.h"
#include "lib/util/sys_rw.h"
#include "lib/util/util.h"
#include "lib/util/smb_strtox.h"
#include "lib/tdb_wrap/tdb_wrap.h"
#include "common/cmdline.h"

View File

@ -34,6 +34,7 @@
#include "lib/util/debug.h"
#include "lib/util/samba_util.h"
#include "lib/util/sys_rw.h"
#include "lib/util/smb_strtox.h"
#include "common/db_hash.h"
#include "common/logging.h"

View File

@ -27,6 +27,7 @@
#include "libcli/security/security.h"
#include "dsdb/common/util.h"
#include "librpc/gen_ndr/ndr_dnsp.h"
#include "lib/util/smb_strtox.h"
static int ldb_eval_transitive_filter_helper(TALLOC_CTX *mem_ctx,
struct ldb_context *ldb,

View File

@ -36,6 +36,7 @@
#include "libcli/security/security.h"
#include "param/param.h"
#include "../lib/util/asn1.h"
#include "lib/util/smb_strtox.h"
/*
use ndr_print_* to convert a NDR formatted blob to a ldif formatted blob

View File

@ -32,6 +32,7 @@
#include "lib/util/iov_buf.h"
#include "lib/util/blocking.h"
#include "lib/util/tevent_unix.h"
#include "lib/util/smb_strtox.h"
#define MESSAGING_DGM_FRAGMENT_LENGTH 1024

View File

@ -73,6 +73,7 @@
#include "lib/util/samba_util.h"
#include "libcli/auth/ntlm_check.h"
#include "lib/crypto/gnutls_helpers.h"
#include "lib/util/smb_strtox.h"
#ifdef HAVE_HTTPCONNECTENCRYPT
#include <cups/http.h>

View File

@ -21,6 +21,7 @@
#include "lib/util/memory.h"
#include "lib/util/access.h"
#include "lib/util/unix_match.h"
#include "lib/util/smb_strtox.h"
#if defined(HAVE_NETGROUP)
#include "system/nis.h"

View File

@ -22,6 +22,7 @@
#include "lib/util/asn1.h"
#include "lib/util/debug.h"
#include "lib/util/samba_util.h"
#include "lib/util/smb_strtox.h"
struct nesting {
off_t start;

177
lib/util/smb_strtox.c Normal file
View File

@ -0,0 +1,177 @@
/*
* Unix SMB/CIFS implementation.
*
* Copyright (C) Swen Schillig 2019
*
* ** NOTE! The following LGPL license applies to the tevent
* ** library. This does NOT imply that all of Samba is released
* ** under the LGPL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "replace.h"
#include "smb_strtox.h"
/**
* Convert a string to an unsigned long integer
*
* @param nptr pointer to string which is to be converted
* @param endptr [optional] reference to remainder of the string
* @param base base of the numbering scheme
* @param err error occured during conversion
* @flags controlling conversion feature
* @result result of the conversion as provided by strtoul
*
* The following flags are supported
* SMB_STR_STANDARD # raise error if negative or non-numeric
* SMB_STR_ALLOW_NEGATIVE # allow strings with a leading "-"
* SMB_STR_FULL_STR_CONV # entire string must be converted
* SMB_STR_ALLOW_NO_CONVERSION # allow empty strings or non-numeric
* SMB_STR_GLIBC_STANDARD # act exactly as the standard glibc strtoul
*
* The following errors are detected
* - wrong base
* - value overflow
* - string with a leading "-" indicating a negative number
* - no conversion due to empty string or not representing a number
*/
unsigned long int
smb_strtoul(const char *nptr, char **endptr, int base, int *err, int flags)
{
unsigned long int val;
int saved_errno = errno;
char *needle = NULL;
char *tmp_endptr = NULL;
errno = 0;
*err = 0;
val = strtoul(nptr, &tmp_endptr, base);
if (endptr != NULL) {
*endptr = tmp_endptr;
}
if (errno != 0) {
*err = errno;
errno = saved_errno;
return val;
}
if ((flags & SMB_STR_ALLOW_NO_CONVERSION) == 0) {
/* got an invalid number-string resulting in no conversion */
if (nptr == tmp_endptr) {
*err = EINVAL;
goto out;
}
}
if ((flags & SMB_STR_ALLOW_NEGATIVE ) == 0) {
/* did we convert a negative "number" ? */
needle = strchr(nptr, '-');
if (needle != NULL && needle < tmp_endptr) {
*err = EINVAL;
goto out;
}
}
if ((flags & SMB_STR_FULL_STR_CONV) != 0) {
/* did we convert the entire string ? */
if (tmp_endptr[0] != '\0') {
*err = EINVAL;
goto out;
}
}
out:
errno = saved_errno;
return val;
}
/**
* Convert a string to an unsigned long long integer
*
* @param nptr pointer to string which is to be converted
* @param endptr [optional] reference to remainder of the string
* @param base base of the numbering scheme
* @param err error occured during conversion
* @flags controlling conversion feature
* @result result of the conversion as provided by strtoull
*
* The following flags are supported
* SMB_STR_STANDARD # raise error if negative or non-numeric
* SMB_STR_ALLOW_NEGATIVE # allow strings with a leading "-"
* SMB_STR_FULL_STR_CONV # entire string must be converted
* SMB_STR_ALLOW_NO_CONVERSION # allow empty strings or non-numeric
* SMB_STR_GLIBC_STANDARD # act exactly as the standard glibc strtoul
*
* The following errors are detected
* - wrong base
* - value overflow
* - string with a leading "-" indicating a negative number
* - no conversion due to empty string or not representing a number
*/
unsigned long long int
smb_strtoull(const char *nptr, char **endptr, int base, int *err, int flags)
{
unsigned long long int val;
int saved_errno = errno;
char *needle = NULL;
char *tmp_endptr = NULL;
errno = 0;
*err = 0;
val = strtoull(nptr, &tmp_endptr, base);
if (endptr != NULL) {
*endptr = tmp_endptr;
}
if (errno != 0) {
*err = errno;
errno = saved_errno;
return val;
}
if ((flags & SMB_STR_ALLOW_NO_CONVERSION) == 0) {
/* got an invalid number-string resulting in no conversion */
if (nptr == tmp_endptr) {
*err = EINVAL;
goto out;
}
}
if ((flags & SMB_STR_ALLOW_NEGATIVE ) == 0) {
/* did we convert a negative "number" ? */
needle = strchr(nptr, '-');
if (needle != NULL && needle < tmp_endptr) {
*err = EINVAL;
goto out;
}
}
if ((flags & SMB_STR_FULL_STR_CONV) != 0) {
/* did we convert the entire string ? */
if (tmp_endptr[0] != '\0') {
*err = EINVAL;
goto out;
}
}
out:
errno = saved_errno;
return val;
}

40
lib/util/smb_strtox.h Normal file
View File

@ -0,0 +1,40 @@
/*
* Unix SMB/CIFS implementation.
*
* Copyright (C) Swen Schillig 2019
*
* ** NOTE! The following LGPL license applies to the tevent
* ** library. This does NOT imply that all of Samba is released
* ** under the LGPL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SMB_STRTOX_H
#define SMB_STRTOX_H
#define SMB_STR_STANDARD 0x00
#define SMB_STR_ALLOW_NEGATIVE 0x01
#define SMB_STR_FULL_STR_CONV 0x02
#define SMB_STR_ALLOW_NO_CONVERSION 0x04
#define SMB_STR_GLIBC_STANDARD (SMB_STR_ALLOW_NO_CONVERSION | \
SMB_STR_ALLOW_NEGATIVE)
unsigned long int
smb_strtoul(const char *nptr, char **endptr, int base, int *err, int flags);
unsigned long long int
smb_strtoull(const char *nptr, char **endptr, int base, int *err, int flags);
#endif

View File

@ -30,6 +30,7 @@
#include "torture/local/proto.h"
#include "lib/util/samba_util.h"
#include "lib/util/smb_strtox.h"
#include "limits.h"
#include "string.h"

View File

@ -52,158 +52,6 @@
* @brief Misc utility functions
*/
/**
* Convert a string to an unsigned long integer
*
* @param nptr pointer to string which is to be converted
* @param endptr [optional] reference to remainder of the string
* @param base base of the numbering scheme
* @param err error occured during conversion
* @flags controlling conversion feature
* @result result of the conversion as provided by strtoul
*
* The following flags are supported
* SMB_STR_STANDARD # raise error if negative or non-numeric
* SMB_STR_ALLOW_NEGATIVE # allow strings with a leading "-"
* SMB_STR_FULL_STR_CONV # entire string must be converted
* SMB_STR_ALLOW_NO_CONVERSION # allow empty strings or non-numeric
* SMB_STR_GLIBC_STANDARD # act exactly as the standard glibc strtoul
*
* The following errors are detected
* - wrong base
* - value overflow
* - string with a leading "-" indicating a negative number
* - no conversion due to empty string or not representing a number
*/
unsigned long int
smb_strtoul(const char *nptr, char **endptr, int base, int *err, int flags)
{
unsigned long int val;
int saved_errno = errno;
char *needle = NULL;
char *tmp_endptr = NULL;
errno = 0;
*err = 0;
val = strtoul(nptr, &tmp_endptr, base);
if (endptr != NULL) {
*endptr = tmp_endptr;
}
if (errno != 0) {
*err = errno;
errno = saved_errno;
return val;
}
if ((flags & SMB_STR_ALLOW_NO_CONVERSION) == 0) {
/* got an invalid number-string resulting in no conversion */
if (nptr == tmp_endptr) {
*err = EINVAL;
goto out;
}
}
if ((flags & SMB_STR_ALLOW_NEGATIVE ) == 0) {
/* did we convert a negative "number" ? */
needle = strchr(nptr, '-');
if (needle != NULL && needle < tmp_endptr) {
*err = EINVAL;
goto out;
}
}
if ((flags & SMB_STR_FULL_STR_CONV) != 0) {
/* did we convert the entire string ? */
if (tmp_endptr[0] != '\0') {
*err = EINVAL;
goto out;
}
}
out:
errno = saved_errno;
return val;
}
/**
* Convert a string to an unsigned long long integer
*
* @param nptr pointer to string which is to be converted
* @param endptr [optional] reference to remainder of the string
* @param base base of the numbering scheme
* @param err error occured during conversion
* @flags controlling conversion feature
* @result result of the conversion as provided by strtoull
*
* The following flags are supported
* SMB_STR_STANDARD # raise error if negative or non-numeric
* SMB_STR_ALLOW_NEGATIVE # allow strings with a leading "-"
* SMB_STR_FULL_STR_CONV # entire string must be converted
* SMB_STR_ALLOW_NO_CONVERSION # allow empty strings or non-numeric
* SMB_STR_GLIBC_STANDARD # act exactly as the standard glibc strtoul
*
* The following errors are detected
* - wrong base
* - value overflow
* - string with a leading "-" indicating a negative number
* - no conversion due to empty string or not representing a number
*/
unsigned long long int
smb_strtoull(const char *nptr, char **endptr, int base, int *err, int flags)
{
unsigned long long int val;
int saved_errno = errno;
char *needle = NULL;
char *tmp_endptr = NULL;
errno = 0;
*err = 0;
val = strtoull(nptr, &tmp_endptr, base);
if (endptr != NULL) {
*endptr = tmp_endptr;
}
if (errno != 0) {
*err = errno;
errno = saved_errno;
return val;
}
if ((flags & SMB_STR_ALLOW_NO_CONVERSION) == 0) {
/* got an invalid number-string resulting in no conversion */
if (nptr == tmp_endptr) {
*err = EINVAL;
goto out;
}
}
if ((flags & SMB_STR_ALLOW_NEGATIVE ) == 0) {
/* did we convert a negative "number" ? */
needle = strchr(nptr, '-');
if (needle != NULL && needle < tmp_endptr) {
*err = EINVAL;
goto out;
}
}
if ((flags & SMB_STR_FULL_STR_CONV) != 0) {
/* did we convert the entire string ? */
if (tmp_endptr[0] != '\0') {
*err = EINVAL;
goto out;
}
}
out:
errno = saved_errno;
return val;
}
/**
Find a suitable temporary directory. The result should be copied immediately
as it may be overwritten by a subsequent call.

View File

@ -22,19 +22,6 @@
#ifndef __UTIL_SAMBA_UTIL_H__
#define __UTIL_SAMBA_UTIL_H__
#define SMB_STR_STANDARD 0x00
#define SMB_STR_ALLOW_NEGATIVE 0x01
#define SMB_STR_FULL_STR_CONV 0x02
#define SMB_STR_ALLOW_NO_CONVERSION 0x04
#define SMB_STR_GLIBC_STANDARD (SMB_STR_ALLOW_NO_CONVERSION | \
SMB_STR_ALLOW_NEGATIVE)
unsigned long int
smb_strtoul(const char *nptr, char **endptr, int base, int *err, int flags);
unsigned long long int
smb_strtoull(const char *nptr, char **endptr, int base, int *err, int flags);
/**
* Write dump of binary data to a callback
*/

View File

@ -23,6 +23,7 @@
#include "includes.h"
#include "system/locale.h"
#include "smb_strtox.h"
#undef strncasecmp
#undef strcasemp

View File

@ -81,10 +81,15 @@ bld.SAMBA_SUBSYSTEM('samba-util-core',
strv_util.c bitmap.c select.c pidfile.c
become_daemon.c mkdir_p.c''',
deps='''time-basic samba-debug socket-blocking talloc
tevent execinfo pthread strv tini''',
tevent execinfo pthread strv tini smb_strtox''',
public_deps='systemd systemd-daemon sys_rw LIBUNWIND',
local_include=False)
bld.SAMBA_SUBSYSTEM('smb_strtox',
source='smb_strtox.c',
local_include=False)
bld.SAMBA_LIBRARY('iov_buf',
source='iov_buf.c',
deps='talloc',

View File

@ -27,6 +27,7 @@
#include "lib/util/util.h"
#include "librpc/gen_ndr/security.h"
#include "dom_sid.h"
#include "lib/util/smb_strtox.h"
/*****************************************************************
Compare the auth portion of two sids.

View File

@ -24,7 +24,7 @@
#include "replace.h"
#include "libwbclient.h"
#include "../winbind_client.h"
#include "lib/util/util.h"
#include "lib/util/smb_strtox.h"
/* Convert a Windows SID to a Unix uid, allocating an uid if needed */
wbcErr wbcCtxSidToUid(struct wbcContext *ctx, const struct wbcDomainSid *sid,

View File

@ -26,7 +26,7 @@
#include "replace.h"
#include "libwbclient.h"
#include "../winbind_client.h"
#include "lib/util/util.h"
#include "lib/util/smb_strtox.h"
/* Convert a sid to a string into a buffer. Return the string
* length. If buflen is too small, return the string length that would

View File

@ -37,7 +37,7 @@ def build(bld):
wbc_pwd.c
wbc_sid.c
wbc_util.c''',
deps='winbind-client samba-util',
deps='winbind-client smb_strtox',
pc_files='wbclient.pc',
public_headers='wbclient.h',
abi_directory='ABI',

View File

@ -27,6 +27,7 @@
#include "../libcli/auth/libcli_auth.h"
#include "lib/cmdline/popt_common.h"
#include "lib/afs/afs_settoken.h"
#include "lib/util/smb_strtox.h"
#ifdef DBGC_CLASS
#undef DBGC_CLASS

View File

@ -28,6 +28,7 @@
#include "lib/winbind_util.h"
#include <tdb.h>
#include "groupdb/mapping_tdb.h"
#include "lib/util/smb_strtox.h"
static const struct mapping_backend *backend;

View File

@ -29,6 +29,7 @@
#include "util_tdb.h"
#include "../libcli/security/security.h"
#include "groupdb/mapping_tdb.h"
#include "lib/util/smb_strtox.h"
static struct db_context *db; /* used for driver files */

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "lib/socket/interfaces.h"
#include "librpc/gen_ndr/ioctl.h"
#include "lib/util/smb_strtox.h"
static struct iface_struct *probed_ifaces;
static int total_probed;

View File

@ -26,6 +26,7 @@
#include "lib/util/talloc_stack.h"
#include "lib/util/charset/charset.h"
#include "libcli/security/dom_sid.h"
#include "lib/util/smb_strtox.h"
bool namemap_cache_set_sid2name(const struct dom_sid *sid,
const char *domain, const char *name,

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "lib/util_file.h"
#include "lib/util/smb_strtox.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_QUOTA

View File

@ -22,6 +22,7 @@
#include "tldap_util.h"
#include "../libcli/security/security.h"
#include "../lib/util/asn1.h"
#include "lib/util/smb_strtox.h"
bool tldap_entry_values(struct tldap_message *msg, const char *attribute,
DATA_BLOB **values, int *num_values)

View File

@ -24,6 +24,7 @@
#include "includes.h"
#include "lib/param/loadparm.h"
#include "lib/util/smb_strtox.h"
static const char toupper_ascii_fast_table[128] = {
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf,

View File

@ -27,6 +27,7 @@
#include "system/filesys.h"
#include "smbd/smbd.h"
#include "lib/util/tevent_ntstatus.h"
#include "lib/util/smb_strtox.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS

View File

@ -23,6 +23,7 @@
#include "smbd/smbd.h"
#include "lib/util/sys_rw.h"
#include "lib/util/sys_rw_data.h"
#include "lib/util/smb_strtox.h"
struct preopen_state;

View File

@ -37,6 +37,7 @@
#include "system/filesys.h"
#include "smbd/smbd.h"
#include "lib/util/tevent_ntstatus.h"
#include "lib/util/smb_strtox.h"
#define SNAPPER_SIG_LIST_SNAPS_RSP "a(uquxussa{ss})"
#define SNAPPER_SIG_LIST_CONFS_RSP "a(ssa{ss})"

View File

@ -60,6 +60,7 @@
#include "../smbd/globals.h"
#include "auth.h"
#include "../lib/tsocket/tsocket.h"
#include "lib/util/smb_strtox.h"
#include <libgen.h>
#define UM_PARAM_TYPE_NAME "unityed_media"

View File

@ -27,6 +27,7 @@
#include "../libcli/security/security.h"
#include "lib/privileges.h"
#include "lib/gencache.h"
#include "lib/util/smb_strtox.h"
static struct db_context *db;

View File

@ -54,6 +54,7 @@
#include "librpc/gen_ndr/idmap.h"
#include "lib/param/loadparm.h"
#include "lib/util_sid_passdb.h"
#include "lib/util/smb_strtox.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB

View File

@ -30,6 +30,7 @@
#include "../libcli/security/security.h"
#include "util_tdb.h"
#include "passdb/pdb_tdb.h"
#include "lib/util/smb_strtox.h"
#if 0 /* when made a module use this */

View File

@ -24,6 +24,7 @@
#include "rpc_server/mdssvc/mdssvc_es.h"
#include "rpc_server/mdssvc/es_parser.tab.h"
#include "rpc_server/mdssvc/es_mapping.h"
#include "lib/util/smb_strtox.h"
#include <jansson.h>
/*

View File

@ -31,6 +31,7 @@
#include "rpc_client/init_samr.h"
#include "rpc_client/init_lsa.h"
#include "../libcli/security/security.h"
#include "lib/util/smb_strtox.h"
static struct dom_sid domain_sid;

View File

@ -34,6 +34,7 @@
#include "../libcli/registry/util_reg.h"
#include "libsmb/libsmb.h"
#include "popt_common_cmdline.h"
#include "lib/util/smb_strtox.h"
#define RPCCLIENT_PRINTERNAME(_printername, _cli, _arg) \
{ \

View File

@ -21,6 +21,7 @@
#include "libsmb/libsmb.h"
#include "libsmb/clirap.h"
#include "lib/util/tevent_ntstatus.h"
#include "lib/util/smb_strtox.h"
extern int torture_nprocs;
extern int torture_numops;

View File

@ -28,6 +28,7 @@
#include "net_idmap_check.h"
#include "util_tdb.h"
#include "idmap_autorid_tdb.h"
#include "lib/util/smb_strtox.h"
#define ALLOC_CHECK(mem) do { \
if (!mem) { \

View File

@ -38,6 +38,7 @@
#include "passdb/machine_sid.h"
#include "net_registry_check.h"
#include "lib/util/util_tdb.h"
#include "lib/util/smb_strtox.h"
/*
*

View File

@ -32,6 +32,7 @@
#include "../libcli/security/display_sec.h"
#include "../libcli/registry/util_reg.h"
#include "client.h"
#include "lib/util/smb_strtox.h"
/*******************************************************************

View File

@ -31,6 +31,7 @@
#include "lib/privileges.h"
#include "secrets.h"
#include "idmap.h"
#include "lib/util/smb_strtox.h"
/*
* Set a user's data

View File

@ -27,6 +27,7 @@
#include "passdb.h"
#include "cmdline_contexts.h"
#include "passwd_proto.h"
#include "lib/util/smb_strtox.h"
#define BIT_BACKEND 0x00000004
#define BIT_VERBOSE 0x00000008

View File

@ -24,6 +24,7 @@
#include "regedit_hexedit.h"
#include "util_reg.h"
#include "lib/registry/registry.h"
#include "lib/util/smb_strtox.h"
#include <stdarg.h>
#include <form.h>

View File

@ -29,6 +29,7 @@
#include "idmap.h"
#include "idmap_rw.h"
#include "../libcli/security/security.h"
#include "lib/util/smb_strtox.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP

View File

@ -21,6 +21,7 @@
#include "winbindd.h"
#include "librpc/gen_ndr/ndr_winbind_c.h"
#include "../libcli/security/security.h"
#include "lib/util/smb_strtox.h"
struct winbindd_lookuprids_state {
struct tevent_context *ev;

View File

@ -33,6 +33,7 @@
#include "librpc/gen_ndr/ndr_drsblobs.h"
#include "auth/credentials/credentials.h"
#include "libsmb/samlogon_cache.h"
#include "lib/util/smb_strtox.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND

View File

@ -45,6 +45,7 @@
#include "lib/util/util_net.h"
#include "auth/kerberos/pac_utils.h"
#include "auth/kerberos/gssapi_helper.h"
#include "lib/util/smb_strtox.h"
#ifndef gss_mech_spnego
gss_OID_desc spnego_mech_oid_desc =

View File

@ -39,6 +39,7 @@
#include "lib/util/dlinklist.h"
#include "dlz_minimal.h"
#include "dnsserver_common.h"
#include "lib/util/smb_strtox.h"
struct b9_options {
const char *url;

View File

@ -24,6 +24,7 @@
#include <ldb_module.h>
#include "librpc/ndr/libndr.h"
#include "libcli/security/dom_sid.h"
#include "lib/util/smb_strtox.h"
enum dsdb_dn_format dsdb_dn_oid_to_format(const char *oid)
{

View File

@ -49,6 +49,7 @@
#include "lib/util/util_str_hex.h"
#include "lib/util/sys_rw_data.h"
#include "libcli/util/ntstatus.h"
#include "lib/util/smb_strtox.h"
/*
* This included to allow us to handle DSDB_FLAG_REPLICATED_UPDATE in

View File

@ -28,6 +28,7 @@
#include "librpc/ndr/libndr.h"
#include "dsdb/samdb/samdb.h"
#include "dsdb/samdb/ldb_modules/util.h"
#include "lib/util/smb_strtox.h"
#define LDAP_DIRSYNC_OBJECT_SECURITY 0x01
#define LDAP_DIRSYNC_ANCESTORS_FIRST_ORDER 0x800

View File

@ -20,6 +20,7 @@
#include "dsdb/samdb/ldb_modules/partition.h"
#include "lib/ldb-samba/ldb_wrap.h"
#include "system/filesys.h"
#include "lib/util/smb_strtox.h"
#define LDB_METADATA_SEQ_NUM "SEQ_NUM"

View File

@ -45,6 +45,7 @@
#include "libds/common/flag_mapping.h"
#include "system/network.h"
#include "librpc/gen_ndr/irpc.h"
#include "lib/util/smb_strtox.h"
struct samldb_ctx;
enum samldb_add_type {

View File

@ -33,6 +33,7 @@
#include "lib/tdb_wrap/tdb_wrap.h"
#include "dsdb/samdb/ldb_modules/util.h"
#include "lib/ldb-samba/ldb_wrap.h"
#include "lib/util/smb_strtox.h"
#include "system/filesys.h"
struct schema_load_private_data {

View File

@ -24,6 +24,7 @@
#include "librpc/gen_ndr/ndr_drsuapi.h"
#include "librpc/gen_ndr/ndr_drsblobs.h"
#include "../lib/util/asn1.h"
#include "lib/util/smb_strtox.h"
/**

View File

@ -25,6 +25,7 @@
#include "ldb_wrap.h"
#include "librpc/gen_ndr/winreg.h"
#include "param/param.h"
#include "lib/util/smb_strtox.h"
static struct hive_operations reg_backend_ldb;

View File

@ -25,6 +25,7 @@
#include "lib/socket/netif.h"
#include "../lib/util/util_net.h"
#include "../lib/util/dlinklist.h"
#include "lib/util/smb_strtox.h"
/* used for network interfaces */
struct interface {

View File

@ -41,6 +41,7 @@
#include "lib/addns/dnsquery.h"
#include "lib/addns/dns.h"
#include "lib/util/sys_rw.h"
#include "lib/util/smb_strtox.h"
#include <arpa/nameser.h>
#include <resolv.h>

View File

@ -31,6 +31,7 @@
#include "system/network.h"
#include "lib/socket/netif.h"
#include "param/param.h"
#include "lib/util/smb_strtox.h"
uint64_t winsdb_get_maxVersion(struct winsdb_handle *h)
{

View File

@ -33,6 +33,7 @@
#include "libcli/lsarpc/util_lsarpc.h"
#include "lib/messaging/irpc.h"
#include "libds/common/roles.h"
#include "lib/util/smb_strtox.h"
#include "lib/crypto/gnutls_helpers.h"
#include <gnutls/gnutls.h>

View File

@ -23,6 +23,7 @@
#include "torture/smbtorture.h"
#include "system/filesys.h"
#include "system/locale.h"
#include "lib/util/smb_strtox.h"
#include "torture/nbench/proto.h"

View File

@ -25,6 +25,7 @@
#include "libcli/security/security.h"
#include "torture/torture.h"
#include "torture/smb2/proto.h"
#include "lib/util/smb_strtox.h"
#include <tevent.h>
#define BASEDIRHOLD "sharemode_hold_test"