lib: relicense smb_strtoul(l) under LGPLv3
authorRalph Boehme <slow@samba.org>
Fri, 3 Jul 2020 06:11:20 +0000 (08:11 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 3 Aug 2020 22:21:02 +0000 (22:21 +0000)
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

67 files changed:
ctdb/protocol/protocol_util.c
ctdb/server/ctdb_mutex_fcntl_helper.c
ctdb/server/ctdb_recovery_helper.c
ctdb/tests/src/cluster_mutex_test.c
ctdb/tests/src/db_test_tool.c
ctdb/tools/ctdb.c
lib/ldb-samba/ldb_matching_rules.c
lib/ldb-samba/ldif_handlers.c
lib/messaging/messages_dgm.c
lib/param/loadparm.c
lib/util/access.c
lib/util/asn1.c
lib/util/smb_strtox.c [new file with mode: 0644]
lib/util/smb_strtox.h [new file with mode: 0644]
lib/util/tests/util.c
lib/util/util.c
lib/util/util.h
lib/util/util_str.c
lib/util/wscript_build
libcli/security/dom_sid.c
nsswitch/libwbclient/wbc_idmap.c
nsswitch/libwbclient/wbc_sid.c
nsswitch/libwbclient/wscript
nsswitch/wbinfo.c
source3/groupdb/mapping.c
source3/groupdb/mapping_tdb.c
source3/lib/interface.c
source3/lib/namemap_cache.c
source3/lib/sysquotas.c
source3/lib/tldap_util.c
source3/lib/util_str.c
source3/modules/vfs_ceph_snapshots.c
source3/modules/vfs_preopen.c
source3/modules/vfs_snapper.c
source3/modules/vfs_unityed_media.c
source3/passdb/account_pol.c
source3/passdb/pdb_ldap.c
source3/passdb/pdb_tdb.c
source3/rpc_server/mdssvc/es_parser.y
source3/rpcclient/cmd_samr.c
source3/rpcclient/cmd_spoolss.c
source3/torture/test_readdir_timestamp.c
source3/utils/net_idmap.c
source3/utils/net_registry.c
source3/utils/net_rpc_registry.c
source3/utils/net_sam.c
source3/utils/pdbedit.c
source3/utils/regedit_dialog.c
source3/winbindd/idmap_ldap.c
source3/winbindd/winbindd_lookuprids.c
source3/winbindd/winbindd_util.c
source4/auth/gensec/gensec_gssapi.c
source4/dns_server/dlz_bind9.c
source4/dsdb/common/dsdb_dn.c
source4/dsdb/common/util.c
source4/dsdb/samdb/ldb_modules/dirsync.c
source4/dsdb/samdb/ldb_modules/partition_metadata.c
source4/dsdb/samdb/ldb_modules/samldb.c
source4/dsdb/samdb/ldb_modules/schema_load.c
source4/dsdb/schema/schema_prefixmap.c
source4/lib/registry/ldb.c
source4/lib/socket/interface.c
source4/libcli/resolve/dns_ex.c
source4/nbt_server/wins/winsdb.c
source4/rpc_server/lsa/dcesrv_lsa.c
source4/torture/nbench/nbench.c
source4/torture/smb2/sharemode.c

index c67aa2e056f60dc67ffb7e3b67612704c85c5a8c..2d0a6f33038222e7737c706a8b844c69a67703be 100644 (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;
index 51c46ce733fec0f2b6aa5448d7de0af0a9ef89e1..87f5dc22c41de24f8907c29a8b056f31036e812a 100644 (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"
index f10e60104aeaa58db3246c2491fee6e90d1f3abf..4ce10b528bfd6d94a24346120901ba85aefe482b 100644 (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"
index 34398a98ea9a5918c5c897dd6bf40fdfc94bd8f7..3c045f3e807a44405a42a7f020ffcc523d159a36 100644 (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...
index fe0ab6c6e2aecc0cabc492d85922e09c4040ef8b..7ac6b0307408eb7adbed766b7b4e6c352814a434 100644 (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"
index 171069d7ebfef787814afd16ac985132a32f2a86..5209081f3227450dd86d8259fe236787cd25778e 100644 (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"
index 4b357bb706a65f34bb378d98b7f838a474608725..13edb51daaaa5ecfb9c600acc480297f75bcdeb2 100644 (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,
index e74a7182ecf0e55c90dc1e5427392bedb699e29c..78a433748bbe9f243c52ef9b9f06dc42bd111fe3 100644 (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
index b7126b9c8ca31faa755447cbbc3c2a2cb8132833..7c9dd8eb42fee4b248c1bc025888944fafb52e94 100644 (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
 
index da639a8b0ff8a812ad663c866a27140f0ea76ab6..dc22f646b3e8bf769f7f55ace9cce0a9d34113c8 100644 (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>
index 10a147718995853b7d0661852d2f0e2e1183fc3a..e02117fa23e22e28413ae31272e9906334d7cba8 100644 (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"
index 88d96d4544b1f834423d6c28e3ec994d1a90318d..0dfddc009c037300212670cfd7f8d04599b912c9 100644 (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;
diff --git a/lib/util/smb_strtox.c b/lib/util/smb_strtox.c
new file mode 100644 (file)
index 0000000..2cace8b
--- /dev/null
@@ -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;
+}
diff --git a/lib/util/smb_strtox.h b/lib/util/smb_strtox.h
new file mode 100644 (file)
index 0000000..f72bf12
--- /dev/null
@@ -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
index 4876144bcdcedad01447e2bd505aff5cc3529c91..03f62974c3f6e40a57a7213c3d6fd195d74d5a6f 100644 (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"
index a90d48f6f1b90ae85434b663879f2d620d201b4e..1f37688cbad85f9db04592d3ac1577a346271c20 100644 (file)
  * @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.
index c89f4807d5b2cfad4185e18f08daefb136c4dfef..a7acad5688042da7a8128361e6f20b55d0ca22c7 100644 (file)
 #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
  */
index 3356df34f04f1bbcb6710a35e4181e860d04bb63..c7773e0c927490ee196e369fa84a34f4f07c709a 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "includes.h"
 #include "system/locale.h"
+#include "smb_strtox.h"
 #undef strncasecmp
 #undef strcasemp
 
index 807c62636fd996897a4f12a4e0bfee69b6cf46cc..afda713cb06b184ed0319d703883123c7d5aa54a 100644 (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',
index ecf8926c12cd19a12c87481bc722a0854a4fc94f..32bc3e187a775b4a857bc1922b408f6703d7b27b 100644 (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.
index 270a3c3c3ecb0e5e8d9caf4ed84bd9686c521105..05ac60853a52a199826fd67e8f78339ab30a326c 100644 (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,
index aab96cf9188a2c740802892242577aafe58f34e1..e0b92bd4d3461f7ffc133a96c29a7efa71e2ec86 100644 (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
index d926067df9171fd3c4ef866729021a104277a72f..17150a2036bb31bd6d6b0ba52c8633094b5b0c0d 100644 (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',
index cd89bb0bddcfc6fac2eb23179ac16eff08f3d52e..39e3878b3960ef414e7df5d081d1c65b23b2d231 100644 (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
index 4a2e17d8bee671d7e9ba7277c1d32ba7a6222207..d646e979e8d9a580380084759120612a21004a91 100644 (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;
 
index 7f6ae4e65e4cf64dc48fd3b188ab9b6b817f7998..a39b03d9945f724962f4320446028273aa8f355c 100644 (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 */
 
index 35cfc5eee62bfaa5f7cbd91977cea2db70aae2ae..5a86524e69686464016b33cfbc9caff619ade77d 100644 (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;
index 7075b7c5b1e36a58a90ce254b555fedf6e7b9a7b..2e8d298a51d7fa6fb928b6e1ce4c9bb4524ca585 100644 (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,
index 64e41f740a32e312c246278917026b64491a443e..6553cac40dae11e110d13d8440ea9945f1404c1c 100644 (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
index 168932a8a96d32870b3b9b73f5e92eb47a1ffbee..89aea4c6a692c14883701471eb8ceb95a269358a 100644 (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)
index c31667c882135207b629089cb7cd94781fc3c4b5..13d30785c752915d370d34398472966915641fe6 100644 (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,
index 00cb72d6974510051456dbce8897a91d74323631..9ff5b9de074fe02fc17845df4b5560b5affcf1f5 100644 (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
index dc68d138bad388d24c6c2a7036a7758327993133..d27c4a8200066b9525f69e696af10be32d69e2f3 100644 (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;
 
index 8e78cb605c80ed2a9a7df7e3489fc8ee16351bac..8f239c6cb3fa1781453f40906e6767d664b6c937 100644 (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})"
index b755621208b442c5661f6417181384b6fd7ca5df..c42acaef3fe3a7e6cc39e7b4958e86bb3a43edf1 100644 (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"
index ee667815bc18ba210d691ad5e370a6b21bae560b..34c0d726652287b0c0dff0de82a8e1e2e926aca7 100644 (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;
 
index 36b4aa61fd44f668c79807379a85f00c7e81fb35..ba82c9833c66da69c81e77a281a3fbaccda36bb0 100644 (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
index 8b4d84b3704dfed945b2c5bcf264c0f2878b6302..0f7e2a919f49cd08d0672cb3968aa4afa21d3e0a 100644 (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 */
 
index 0514183b35d5d48c042f15171151c4878fa310a0..764f4bc5c2060a3b874e8f7b9da4ec2f1f5589f7 100644 (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>
 
        /*
index 068f5dc4a63508cf5121a3871d1148334ffad2bd..d30f4184cc62247c99a9a264fc5729409dd058cf 100644 (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;
 
index a7e0c673a65a1cf1b95087624a907aaa3e27c87e..88122eb296dfd6b42ca90ccdedeaf42fd888d05f 100644 (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) \
 { \
index 0ae75bb4f7b2e23223af989743a5b0ebfb4299f7..e53883cc21fd78ff248a4d74c09634c512824e3a 100644 (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;
index 24417a8620f77e65839aa8bf84fdf086364fcd4d..027b74131ddab16bc7f18957d08c4cf3ae1c883b 100644 (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) { \
index 4bffe1c0f6a7aa79b7a60435169300869f685756..389e3f6a5527cfc301fb7172992008edd4ed114c 100644 (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"
 
 /*
  *
index e47bad4e33f8f953ea84429a4992d2b2216d9f96..cec545902c76ade881226bad317a89cb16a2b55b 100644 (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"
 
 
 /*******************************************************************
index 74e500f0f3165ec956cb89b011c22e08654d94b0..10d7e342253c6adc648c40ff37336b84bdbc7c2f 100644 (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
index e0645a67423a5efc347245b7430e189aa38506c6..ac71167ad073fb552afdd8c9ce54befb5e3764ea 100644 (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
index c70dd44a743251a4b019a02b6b23778b84e1b273..d1cb45fd8f28d6796ebd856963512fc3bf7a7240 100644 (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>
 
index 86cb6f1bc5112bd6044e6e9a863cfa6bb58bb278..b29e990f97ae29d0c5a0e4924bcd8c8cedb510e9 100644 (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
index 3b7b4176d186a0541f8d4fde5f0d4f0645a9638e..b01e0e5877d70798b7756c5a2b96adc5853f7400 100644 (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;
index c2f02b74211e8b976d8405f45494e7a36c954881..6cebc5b12c57c3e6a40736ed342f80dc1a554f5b 100644 (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
index d66abf32a7f5ac55ed794892da4d61c5f056ee8b..1b0852795fd12924465ad4e4e926bd0b8ec2eb70 100644 (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 =
index 4fafea17751b76b1a189912e1c8723f22d7c3e80..990f4dc2edacaed0355dd1f519c3d6c9a10f4de8 100644 (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;
index fd009a7af98617882c31a9054571dd9f4cdd1fc6..856b3048771a963476f79b7599bf20c1bad86f50 100644 (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) 
 {
index ef03782f5889a6360fd35c1d0885461b0c7742a7..a4d90135b4106f546833beaa240e7a1892788e3c 100644 (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
index 21555491159d1d08a94c40793578789305fc0ab4..bafa7dd1b874fbe931028fd3fd9a70feb3174583 100644 (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
index 44ce2c66639f65825bde02e12c8c607cf5b71332..c220e67124e61536684b38654f7b8d3b9f2c627c 100644 (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"
 
index 4da8564c77ab84eca1d9bc1c7e9a4f53d6701239..2a43807272c488b98fa5b5f2c01fff8572864d49 100644 (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 {
index 40ea42b55e42f1bf9d95b387d66255d66e8e520d..4bbb7b0eff12faffd5d7b71a5bd2f9328085b04f 100644 (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 {
index 706e48a034e490fe9f03eb932fc5786d06f5d80a..3a6a13059fd76db4915541efcbefa7f5a4560028 100644 (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"
 
 
 /**
index c0b13e0d4ce9424d803b97f4c33698b5b8f98ff6..15419a65f642eb7dd39da8af4d4df17fdf9bbbac 100644 (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;
 
index 93b60f7d32f1d7a19a2ffc4886743276fef2fb24..181893a9e7fcbad8e95b20ff4a0b500b59f169bd 100644 (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 {
index 9ee19ffb4fda80ed72f078845b0a0eb2d0cccc99..a2e5551ea260889dc1c8337b906be1dca0320b1e 100644 (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>
 
index be1d8ba8050af9eaaf35884b7cabb71123b44229..414a31f493195d21eb8e2ab1da4a22008ee2e4e9 100644 (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)
 {
index 8333cb149b608ebdb3b6a14570b2504f1d525c7b..acd37131d7989464c97af912ff14d823bf407ea4 100644 (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>
index 6e2dbe0b907afb52f984f5e44f9fe7cf70a37001..f67784e31d6435193cadaf8c51eced13cc00ed23 100644 (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"
 
index 87f2f852c1cc13f62e837a1cbe00a60ab1d78eb6..ced4047d77d0ab4b3100592ebadcb84ba55b9fdf 100644 (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"