[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Mon Jul 3 20:41:01 UTC 2023
The branch, master has been updated
via 7c8fbf15b99 build: We don't need SEEKDIR_RETURNS_VOID
via 3d6befda583 lib: Move IO_REPARSE_TAG_NFS subtypes to toplevel
via 1548c1e7a6f lib: Translate ENXIO to NT_STATUS_ILLEGAL_FUNCTION
via 79b07271ee9 smbd: Fix a typo
via f6a24e7d29e error_inject: Reduce indentation with an early return
via c7df6cea8af torture4: Fix an error message
via 53c6f2fe917 tests: Enable a few tests for FreeBSD
via b3ce869d4f4 smbd: Save 76 bytes of .text
via 9907fd3e293 smbd: Avoid a direct reference to smb_messages[]
via 34fbfb04d88 smbclient3: Use talloc_asprintf(), no explicit SAFE_FREE required
via dbe95be8bb8 utils3: Remove the "split_tokens" utility
from 3119f6c283a wb_dsgetdcname: don't use stack variables for async code
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7c8fbf15b999b30a2c9594e65e8826d4bb9a3fc5
Author: Volker Lendecke <vl at samba.org>
Date: Wed Jun 14 08:02:07 2023 +0200
build: We don't need SEEKDIR_RETURNS_VOID
We don't call seekdir() in source3 anymore
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Mon Jul 3 20:40:05 UTC 2023 on atb-devel-224
commit 3d6befda5838141d2de344ca58dcd268bab7c1a0
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 26 08:55:59 2023 +0200
lib: Move IO_REPARSE_TAG_NFS subtypes to toplevel
They should be generally available
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1548c1e7a6fd3582e8011eeb27c67f44fcee614c
Author: Volker Lendecke <vl at samba.org>
Date: Mon May 15 17:23:43 2023 +0200
lib: Translate ENXIO to NT_STATUS_ILLEGAL_FUNCTION
ENXIO is returned when trying to openat() a unix domain socket or a
FIFO without anything at the other end. [MS-ERREF] has
ILLEGAL_FUNCTION as "The specified handle is not open to the server
end of the named pipe.", which comes pretty close to me.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 79b07271ee94b13c68dd4e4c4cde1474614a1699
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 19 21:10:14 2023 +0200
smbd: Fix a typo
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit f6a24e7d29e4e71575331c9e4d2862c1d2a274da
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 26 12:48:16 2023 +0200
error_inject: Reduce indentation with an early return
Review with "git show -b"
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit c7df6cea8aff596735a0cc9be7f1e8aa6d0cd5a1
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 26 16:15:25 2023 +0200
torture4: Fix an error message
The fsctl is called FSCTL_SET_ZERO_DATA
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 53c6f2fe917e581bce8c1bcfcb4ef6f2dfe7c98a
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 26 15:45:39 2023 +0200
tests: Enable a few tests for FreeBSD
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit b3ce869d4f46d9ee44150e156ff24532261344ce
Author: Volker Lendecke <vl at samba.org>
Date: Wed Jun 28 11:48:34 2023 +0200
smbd: Save 76 bytes of .text
Probably not really measurable, but as this is a pretty frequently
accessed table, maybe this saves us some cache misses. And it's very
cheap to get :-)
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 9907fd3e293d3b6ac9b621c8159cbcd94b75fdae
Author: Volker Lendecke <vl at samba.org>
Date: Thu Mar 9 17:49:50 2023 +0100
smbd: Avoid a direct reference to smb_messages[]
That's what we have smb_fn_name() for
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 34fbfb04d88f6a3021dca99f50472b3a4976f164
Author: Volker Lendecke <vl at samba.org>
Date: Thu Jun 29 11:46:35 2023 +0200
smbclient3: Use talloc_asprintf(), no explicit SAFE_FREE required
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit dbe95be8bb8a8dede68847b745f628a6f5463fbd
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jul 3 11:08:38 2023 +0200
utils3: Remove the "split_tokens" utility
This is not tested as far as I can see, and as this is explicity meant
as a testing utility I think we can live without it.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
libcli/smb/smb_constants.h | 10 +++
source3/client/client.c | 6 +-
source3/include/ntioctl.h | 7 --
source3/lib/errmap_unix.c | 3 +
source3/modules/vfs_error_inject.c | 32 ++++----
source3/param/loadparm.c | 2 +-
.../tests/printing/printing_var_exp_lpr_cmd.sh | 2 +-
source3/script/tests/test_aio_outstanding.sh | 2 +-
source3/script/tests/test_chdir_cache.sh | 2 +-
source3/script/tests/test_close_denied_share.sh | 2 +-
source3/script/tests/test_force_close_share.sh | 2 +-
source3/script/tests/test_large_acl.sh | 2 +-
source3/script/tests/test_net_cred_change_at.sh | 2 +-
source3/script/tests/test_netfileenum.sh | 2 +-
source3/script/tests/test_open_eintr.sh | 2 +-
source3/script/tests/test_shadow_copy.sh | 2 +-
source3/script/tests/test_shadow_copy_torture.sh | 2 +-
.../script/tests/test_smb1_shadow_copy_torture.sh | 2 +-
.../script/tests/test_smbXsrv_client_cross_node.sh | 2 +-
.../script/tests/test_smbXsrv_client_dead_rec.sh | 2 +-
source3/script/tests/test_smbget.sh | 2 +-
source3/script/tests/test_user_in_sharelist.sh | 2 +-
source3/smbd/posix_acls.c | 2 +-
source3/smbd/smb1_process.c | 3 +-
source3/smbd/smb2_reply.c | 2 +-
source3/smbd/smb2_server.c | 8 +-
source3/utils/split_tokens.c | 96 ----------------------
source3/utils/wscript_build | 9 --
source3/wscript | 5 --
source4/torture/smb2/ioctl.c | 7 +-
30 files changed, 62 insertions(+), 162 deletions(-)
delete mode 100644 source3/utils/split_tokens.c
Changeset truncated at 500 lines:
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index 1ee5d7f406e..8d3dc998a10 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -614,6 +614,16 @@ enum csc_policy {
#define IO_REPARSE_TAG_DFS 0x8000000A
#define IO_REPARSE_TAG_NFS 0x80000014
+/*
+ * Sub-types for IO_REPARSE_TAG_NFS from [MS-FSCC] 2.1.2.6 Network
+ * File System (NFS) Reparse Data Buffer
+ */
+#define NFS_SPECFILE_LNK 0x00000000014B4E4C
+#define NFS_SPECFILE_CHR 0x0000000000524843
+#define NFS_SPECFILE_BLK 0x00000000004B4C42
+#define NFS_SPECFILE_FIFO 0x000000004F464946
+#define NFS_SPECFILE_SOCK 0x000000004B434F53
+
/*
* Flag from [MS-FSCC] 2.1.2.4 Symbolic Link Reparse Data Buffer
*/
diff --git a/source3/client/client.c b/source3/client/client.c
index c4d309958cd..68011679d7e 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -6122,12 +6122,14 @@ static int process_stdin(void)
int i;
/* display a prompt */
- if (asprintf(&the_prompt, "smb: %s> ", client_get_cur_dir()) < 0) {
+ the_prompt = talloc_asprintf(frame,
+ "smb: %s> ",
+ client_get_cur_dir());
+ if (the_prompt == NULL) {
TALLOC_FREE(frame);
break;
}
line = smb_readline(the_prompt, readline_callback, completion_fn);
- SAFE_FREE(the_prompt);
if (!line) {
TALLOC_FREE(frame);
break;
diff --git a/source3/include/ntioctl.h b/source3/include/ntioctl.h
index 1c2e5d5eb07..18959b06147 100644
--- a/source3/include/ntioctl.h
+++ b/source3/include/ntioctl.h
@@ -20,13 +20,6 @@
#ifndef _NTIOCTL_H
#define _NTIOCTL_H
-/* Sub-types for IO_REPARSE_TAG_NFS */
-#define NFS_SPECFILE_LNK 0x00000000014B4E4C
-#define NFS_SPECFILE_CHR 0x0000000000524843
-#define NFS_SPECFILE_BLK 0x00000000004B4C42
-#define NFS_SPECFILE_FIFO 0x000000004F464946
-#define NFS_SPECFILE_SOCK 0x000000004B434F53
-
/* For FSCTL_GET_SHADOW_COPY_DATA ...*/
typedef char SHADOW_COPY_LABEL[25]; /* sizeof("@GMT-2004.02.18-15.44.00") + 1 */
diff --git a/source3/lib/errmap_unix.c b/source3/lib/errmap_unix.c
index 209bd255be5..3aa2cd1e4fa 100644
--- a/source3/lib/errmap_unix.c
+++ b/source3/lib/errmap_unix.c
@@ -122,6 +122,9 @@ static const struct {
#ifdef ERANGE
{ ERANGE, NT_STATUS_INTEGER_OVERFLOW },
#endif
+#ifdef ENXIO
+ { ENXIO, NT_STATUS_ILLEGAL_FUNCTION },
+#endif
};
/*********************************************************************
diff --git a/source3/modules/vfs_error_inject.c b/source3/modules/vfs_error_inject.c
index edb7c64a92a..529504fd8d5 100644
--- a/source3/modules/vfs_error_inject.c
+++ b/source3/modules/vfs_error_inject.c
@@ -52,29 +52,29 @@ static int find_unix_error_from_string(const char *err_str)
static int inject_unix_error(const char *vfs_func, vfs_handle_struct *handle)
{
const char *err_str;
+ int error;
err_str = lp_parm_const_string(SNUM(handle->conn),
"error_inject", vfs_func, NULL);
+ if (err_str == NULL) {
+ return 0;
+ }
- if (err_str != NULL) {
- int error;
-
- error = find_unix_error_from_string(err_str);
- if (error != 0) {
- DBG_WARNING("Returning error %s for VFS function %s\n",
- err_str, vfs_func);
- return error;
- }
-
- if (strequal(err_str, "panic")) {
- DBG_ERR("Panic in VFS function %s\n", vfs_func);
- smb_panic("error_inject");
- }
+ error = find_unix_error_from_string(err_str);
+ if (error != 0) {
+ DBG_WARNING("Returning error %s for VFS function %s\n",
+ err_str, vfs_func);
+ return error;
+ }
- DBG_ERR("Unknown error inject %s requested "
- "for vfs function %s\n", err_str, vfs_func);
+ if (strequal(err_str, "panic")) {
+ DBG_ERR("Panic in VFS function %s\n", vfs_func);
+ smb_panic("error_inject");
}
+ DBG_ERR("Unknown error inject %s requested "
+ "for vfs function %s\n", err_str, vfs_func);
+
return 0;
}
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 46743b58a57..fd9157fb95f 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4424,7 +4424,7 @@ const char *volume_label(TALLOC_CTX *ctx, int snum)
}
}
- /* This returns a max of 33 byte guarenteed null terminated string. */
+ /* This returns a max of 33 byte guaranteed null terminated string. */
ret = talloc_strndup(ctx, label, end);
if (!ret) {
return "";
diff --git a/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh b/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh
index 8259f375a40..c25b49a7cc6 100755
--- a/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh
+++ b/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
logfile="${SELFTEST_TMPDIR}/${USER}_printing_var_exp.log"
diff --git a/source3/script/tests/test_aio_outstanding.sh b/source3/script/tests/test_aio_outstanding.sh
index 66616e99000..a49718127a8 100755
--- a/source3/script/tests/test_aio_outstanding.sh
+++ b/source3/script/tests/test_aio_outstanding.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Test terminating an smbclient connection with outstanding
# aio requests.
diff --git a/source3/script/tests/test_chdir_cache.sh b/source3/script/tests/test_chdir_cache.sh
index 11967180d35..89037a244a8 100755
--- a/source3/script/tests/test_chdir_cache.sh
+++ b/source3/script/tests/test_chdir_cache.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Ensure we get a chdir_current_service error if CHDIR fails with EACCESS
# for an SMB2 request.
diff --git a/source3/script/tests/test_close_denied_share.sh b/source3/script/tests/test_close_denied_share.sh
index 056b8cf30df..2e6e285b404 100755
--- a/source3/script/tests/test_close_denied_share.sh
+++ b/source3/script/tests/test_close_denied_share.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Test smbcontrol close-denied-share command.
#
diff --git a/source3/script/tests/test_force_close_share.sh b/source3/script/tests/test_force_close_share.sh
index 87276ad1a08..c9f943ae3f7 100755
--- a/source3/script/tests/test_force_close_share.sh
+++ b/source3/script/tests/test_force_close_share.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Test smbcontrol close-share command.
#
diff --git a/source3/script/tests/test_large_acl.sh b/source3/script/tests/test_large_acl.sh
index ac960298cc0..4e98c2e1cdf 100755
--- a/source3/script/tests/test_large_acl.sh
+++ b/source3/script/tests/test_large_acl.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Blackbox test for fetching a large ACL
#
diff --git a/source3/script/tests/test_net_cred_change_at.sh b/source3/script/tests/test_net_cred_change_at.sh
index 75456928530..47434bc607d 100755
--- a/source3/script/tests/test_net_cred_change_at.sh
+++ b/source3/script/tests/test_net_cred_change_at.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if [ $# -lt 2 ]; then
cat <<EOF
diff --git a/source3/script/tests/test_netfileenum.sh b/source3/script/tests/test_netfileenum.sh
index 3afc74b210c..d343555d97c 100755
--- a/source3/script/tests/test_netfileenum.sh
+++ b/source3/script/tests/test_netfileenum.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Test rpcclient netfileenum
#
diff --git a/source3/script/tests/test_open_eintr.sh b/source3/script/tests/test_open_eintr.sh
index 31aa26dda4c..b40b14d65e7 100755
--- a/source3/script/tests/test_open_eintr.sh
+++ b/source3/script/tests/test_open_eintr.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Test smbd handling when open returns EINTR
#
diff --git a/source3/script/tests/test_shadow_copy.sh b/source3/script/tests/test_shadow_copy.sh
index fe4bcb8720e..b5726e4b833 100755
--- a/source3/script/tests/test_shadow_copy.sh
+++ b/source3/script/tests/test_shadow_copy.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Blackbox test for shadow_copy2 VFS.
#
diff --git a/source3/script/tests/test_shadow_copy_torture.sh b/source3/script/tests/test_shadow_copy_torture.sh
index f21e98044c3..3a6ba91d075 100755
--- a/source3/script/tests/test_shadow_copy_torture.sh
+++ b/source3/script/tests/test_shadow_copy_torture.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Blackbox test for shadow_copy2 VFS.
#
diff --git a/source3/script/tests/test_smb1_shadow_copy_torture.sh b/source3/script/tests/test_smb1_shadow_copy_torture.sh
index 64a4614b832..3ea30301f0e 100755
--- a/source3/script/tests/test_smb1_shadow_copy_torture.sh
+++ b/source3/script/tests/test_smb1_shadow_copy_torture.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Blackbox test for shadow_copy2 VFS - SMB1 only.
#
diff --git a/source3/script/tests/test_smbXsrv_client_cross_node.sh b/source3/script/tests/test_smbXsrv_client_cross_node.sh
index 8597bf14d90..5b412b29f97 100755
--- a/source3/script/tests/test_smbXsrv_client_cross_node.sh
+++ b/source3/script/tests/test_smbXsrv_client_cross_node.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Test smbd let cluster node 0 destroy the connection,
# if the client with a specific client-guid connections to node 1
diff --git a/source3/script/tests/test_smbXsrv_client_dead_rec.sh b/source3/script/tests/test_smbXsrv_client_dead_rec.sh
index ecfc8858834..e9e8f776c12 100755
--- a/source3/script/tests/test_smbXsrv_client_dead_rec.sh
+++ b/source3/script/tests/test_smbXsrv_client_dead_rec.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Test smbd doesn't crash if there an existing dead record for a client with a
# specific client-guid in smbXsrv_client_global.tdb
diff --git a/source3/script/tests/test_smbget.sh b/source3/script/tests/test_smbget.sh
index 6bb925a4126..46c1f4a68a5 100755
--- a/source3/script/tests/test_smbget.sh
+++ b/source3/script/tests/test_smbget.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Blackbox test for smbget.
#
diff --git a/source3/script/tests/test_user_in_sharelist.sh b/source3/script/tests/test_user_in_sharelist.sh
index 1abd554f90b..0069d6db535 100755
--- a/source3/script/tests/test_user_in_sharelist.sh
+++ b/source3/script/tests/test_user_in_sharelist.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if [ $# -lt 2 ]; then
echo Usage: $0 RPCCLIENT SERVER
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index b95fe632296..78739602854 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -958,7 +958,7 @@ static void merge_aces( canon_ace **pp_list_head, bool dir_acl)
* Even after removing permissions, there
* are still allow permissions - delete the deny.
* It is safe to delete the deny here,
- * as we are guarenteed by the deny first
+ * as we are guaranteed by the deny first
* ordering that all the deny entries for
* this SID have already been merged into one
* before we can get to an allow ace.
diff --git a/source3/smbd/smb1_process.c b/source3/smbd/smb1_process.c
index a25ae9d2767..dd1ff7d4766 100644
--- a/source3/smbd/smb1_process.c
+++ b/source3/smbd/smb1_process.c
@@ -2400,8 +2400,7 @@ static bool smbd_echo_reply(struct smbd_echo_state *state,
req.inbuf = inbuf;
DEBUG(10, ("smbecho handler got cmd %d (%s)\n", (int)req.cmd,
- smb_messages[req.cmd].name
- ? smb_messages[req.cmd].name : "unknown"));
+ smb_fn_name(req.cmd)));
if (req.cmd != SMBecho) {
return false;
diff --git a/source3/smbd/smb2_reply.c b/source3/smbd/smb2_reply.c
index f361ddcdefe..36a863c687b 100644
--- a/source3/smbd/smb2_reply.c
+++ b/source3/smbd/smb2_reply.c
@@ -697,7 +697,7 @@ void reply_special(struct smbXsrv_connection *xconn, char *inbuf, size_t inbuf_s
switch (msg_type) {
case NBSSrequest: /* session request */
{
- /* inbuf_size is guarenteed to be at least 4. */
+ /* inbuf_size is guaranteed to be at least 4. */
fstring name1,name2;
int name_type1, name_type2;
int name_len1, name_len2;
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 462e0d7ecac..14842b0a6ef 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -62,11 +62,11 @@ static NTSTATUS smbd_smb2_flush_send_queue(struct smbXsrv_connection *xconn);
static const struct smbd_smb2_dispatch_table {
uint16_t opcode;
- bool need_session;
- bool need_tcon;
- bool as_root;
uint16_t fileid_ofs;
- bool modify;
+ bool need_session : 1;
+ bool need_tcon : 1;
+ bool as_root : 1;
+ bool modify : 1;
} smbd_smb2_table[] = {
{
.opcode = SMB2_OP_NEGPROT,
diff --git a/source3/utils/split_tokens.c b/source3/utils/split_tokens.c
deleted file mode 100644
index ab48dc5c9c1..00000000000
--- a/source3/utils/split_tokens.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- test program for the next_token() function
-
- Copyright (C) 2009 Michael Adam
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-/*
- * Diagnostic output for "next_token()".
- */
-
-#include "includes.h"
-#include "lib/cmdline/cmdline.h"
-
-int main(int argc, const char *argv[])
-{
- const char *sequence = "";
- poptContext pc;
- char *buff;
- TALLOC_CTX *ctx = talloc_stackframe();
- int opt;
- bool ok;
-
- struct poptOption long_options[] = {
- POPT_AUTOHELP
- POPT_COMMON_VERSION
- POPT_TABLEEND
- };
-
- smb_init_locale();
-
- ok = samba_cmdline_init(ctx,
- SAMBA_CMDLINE_CONFIG_CLIENT,
- false /* require_smbconf */);
- if (!ok) {
- DBG_ERR("Failed to init cmdline parser!\n");
- TALLOC_FREE(ctx);
- exit(1);
- }
-
- pc = samba_popt_get_context(getprogname(),
- argc,
- argv,
- long_options,
- POPT_CONTEXT_KEEP_FIRST);
- if (pc == NULL) {
- DBG_ERR("Failed to setup popt context!\n");
- TALLOC_FREE(ctx);
- exit(1);
- }
-
- poptSetOtherOptionHelp(pc, "[OPTION...] <sequence-string>");
-
- while((opt = poptGetNextOpt(pc)) != -1) {
- switch (opt) {
- case POPT_ERROR_BADOPT:
- fprintf(stderr, "\nInvalid option %s: %s\n\n",
- poptBadOption(pc, 0), poptStrerror(opt));
- poptPrintUsage(pc, stderr, 0);
- exit(1);
- }
- }
-
- sequence = poptGetArg(pc);
-
- if (sequence == NULL) {
- fprintf(stderr, "ERROR: missing sequence string\n");
- return 1;
- }
-
- lp_set_cmdline("log level", "0");
-
- while(next_token_talloc(ctx, &sequence, &buff, NULL)) {
- printf("[%s]\n", buff);
- }
-
- poptFreeContext(pc);
- talloc_free(ctx);
-
- return 0;
-}
-
diff --git a/source3/utils/wscript_build b/source3/utils/wscript_build
index 172457f4b57..90656b3d965 100644
--- a/source3/utils/wscript_build
+++ b/source3/utils/wscript_build
@@ -155,15 +155,6 @@ bld.SAMBA3_BINARY('dbwrap_torture',
''',
install=False)
-bld.SAMBA3_BINARY('split_tokens',
- source='split_tokens.c',
- deps='''
- talloc
- CMDLINE_S3
- smbconf
- ''',
- install=False)
-
bld.SAMBA3_BINARY('samba-regedit',
source="""regedit.c regedit_samba3.c
regedit_wrap.c regedit_treeview.c
diff --git a/source3/wscript b/source3/wscript
index 1b2ae5a1f5d..6117f7be3e7 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1660,11 +1660,6 @@ int main(void) {
conf.env.with_ctdb = True
conf.DEFINE('CLUSTER_SUPPORT', 1)
- conf.CHECK_CODE('void seekdir(DIR *d, long loc) { return; }',
- 'SEEKDIR_RETURNS_VOID',
- headers='sys/types.h dirent.h',
- msg='Checking whether seekdir returns void')
-
if Options.options.with_profiling_data:
conf.DEFINE('WITH_PROFILE', 1);
conf.CHECK_FUNCS('getrusage', headers="sys/time.h sys/resource.h")
diff --git a/source4/torture/smb2/ioctl.c b/source4/torture/smb2/ioctl.c
index 6ceaccfc7ca..925c022b998 100644
--- a/source4/torture/smb2/ioctl.c
+++ b/source4/torture/smb2/ioctl.c
@@ -4025,8 +4025,11 @@ bool test_ioctl_zero_data(struct torture_context *tctx)
--
Samba Shared Repository
More information about the samba-cvs
mailing list