[SCM] Samba Shared Repository - branch v4-6-stable updated
Karolin Seeger
kseeger at samba.org
Fri Dec 22 21:26:28 UTC 2017
The branch, v4-6-stable has been updated
via 1377b56 VERSION: Disable GIT_SNAPSHOT for the 4.6.12 release.
via d665971 WHATSNEW: Add release notes for Samba 4.6.12.
via d9aaf8d messaging: Always register the unique id
via 1a8c27f pthreadpool: Add a test for the race condition fixed in the last commit
via b181b26 pthreadpool: Fix starvation after fork
via 7dcc119 winbindd: idmap_rid: error code for failing id-to-sid mapping request
via d85e691 winbindd: idmap_rid: don't rely on the static domain list
via 96cc7e0 winbindd: pass domain SID to wbint_UnixIDs2Sids
via e16ef9f winbindd: add domain SID to idmap mapping domains
via 822b5da s3: libsmb: Fix reversing of oldname/newname paths when creating a reparse point symlink on Windows from smbclient.
via c441234 s3: client: Rename <oldname> to <link_target> in cmd_symlink() and cli_posix_symlink().
via 3fc3531 pthreadpool: Undo put_job when returning error
via b51a271 pthreadpool: Move creating of thread to new function
via 82f6111 ctdb-daemon: Send STARTUP control after startup event
via 0d42cfc ctdb-takeover: Send tcp tickles immediately on STARTUP control
via 7d173bf ctdb-takeover: Refactor code to send tickle lists for all public IPs
via 730c8f9 vfs_zfsacl: fix compilation error
via 9cc7d3d s3: libsmb: Fix valgrind read-after-free error in cli_smb2_close_fnum_recv().
via 8a37c85 testprogs: Fix a typo in the net ads test
via fb542aa testprogs: Test net ads keytab list
via 19c9997 s3:libads: net ads keytab list fails with "Key table name malformed"
via 3679be1 vfs_fruit: proper VFS-stackable conversion of FinderInfo
via 0282d52 vfs_fruit: add AfpInfo prototypes
via b7f5e69 s4/torture: fruit: in test_adouble_conversion() also check stream list and AFPINFO_STREAM
via 775ec5e s4/torture: fruit: remove use of localdir from test_adouble_conversion test
via dba33c9 selftest: add "fruit:veto_appledouble = no" to fruit shares
via de13adb s4/torture: let write_stream() deal with stream=NULL
via 90ed82b selftest: run AppleDouble sidecar-file conversion test runs against all fruit shares
via 79b3ea5 s4/torture: use torture_assert_goto in a vfs.fruit test
via 51e21a3 s4/torture: rework stream names tests usage of local xattr call
via e266163 selftest: add localdir option to fruit subtests
via 2354d2b selftest: reorder arguments for fruit tests
via 1b9a0ca s3/loadparm: don't mark IPC$ as autoloaded
via e0a08bd s3/loadparm: ensure default service options are not changed
via 37e816e s3/loadparm: allocate a fresh sDefault object per lp_ctx
via b728d17 Add vfs_zfsacl manpage to the list of manpages if we have this module enabled.
via d484d1b Fix typo in the "wide links" description for the getwd cache.
via 3af01bd libnet_join: fix "net rpc oldjoin"
via b9d0fce s3:selftest: add samba3.blackbox.net_rpc_oldjoin test
via eea9b63 ctdb-common: Call missing tevent_wakeup_recv() in sock_daemon
via c54477d ctdb-daemon: Allocate deferred calls off calling context
via 7e41c94 winbind: Remove winbind_messaging_context
via 65bbf31 winbind: winbind_messaging_context -> server_messaging_context
via 88a92ba winbind: Remove winbind_event_context
via d0b4331 winbind: Replace winbind_event_context with server_event_context
via 598cc46 s3: smbclient: tests: Test "volume" command over SMB1 and SMB2+.
via 3490bbd s3: smbclient: Implement "volume" command over SMB2.
via a7de852 VERSION: Bump version up to 4.6.12...
via 3a06a4f Merge tag 'samba-4.6.11' into v4-6-test
via d4217c0 s3: libsmb: smbc_statvfs is missing the supporting SMB2 calls.
via a6db21e libsmbclient: Allow server (NetApp) to return STATUS_INVALID_PARAMETER from an echo.
via b196d0e VERSION: Bump version up to 4.6.11...
from 4878a25 VERSION: Disable GIT_SNAPSHOT for the 4.6.11 release
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-6-stable
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
VERSION | 2 +-
WHATSNEW.txt | 99 ++++++++-
ctdb/common/sock_daemon.c | 8 +
ctdb/server/ctdb_call.c | 14 +-
ctdb/server/ctdb_daemon.c | 6 -
ctdb/server/ctdb_monitor.c | 6 +
ctdb/server/ctdb_takeover.c | 59 +++---
docs-xml/smbdotconf/tuning/getwdcache.xml | 2 +-
docs-xml/wscript_build | 3 +
librpc/idl/winbind.idl | 1 +
selftest/knownfail | 1 +
selftest/target/Samba3.pm | 3 +
source3/client/client.c | 23 +-
source3/include/idmap.h | 5 +
source3/lib/messages_ctdbd.c | 13 ++
source3/lib/pthreadpool/pthreadpool.c | 196 ++++++++++++-----
source3/lib/pthreadpool/tests.c | 82 +++++++
source3/libads/kerberos_keytab.c | 6 +-
source3/libnet/libnet_join.c | 94 +++++++--
source3/libsmb/cli_smb2_fnum.c | 235 ++++++++++++++++++++-
source3/libsmb/cli_smb2_fnum.h | 11 +
source3/libsmb/clifile.c | 15 +-
source3/libsmb/clifsinfo.c | 17 ++
source3/libsmb/clisymlink.c | 14 +-
source3/libsmb/libsmb_server.c | 11 +-
source3/modules/vfs_fruit.c | 91 ++++++--
source3/modules/vfs_zfsacl.c | 10 +-
source3/param/loadparm.c | 20 +-
source3/script/tests/test_net_rpc_oldjoin.sh | 32 +++
source3/script/tests/test_smbclient_s3.sh | 32 +++
source3/selftest/tests.py | 8 +-
source3/torture/torture.c | 9 -
source3/winbindd/idmap.c | 4 +-
source3/winbindd/idmap_ldap.c | 2 +-
source3/winbindd/idmap_proto.h | 3 +-
source3/winbindd/idmap_rfc2307.c | 2 +-
source3/winbindd/idmap_rid.c | 10 +-
source3/winbindd/wb_xids2sids.c | 167 +++++++++++++--
source3/winbindd/winbindd.c | 110 ++++------
source3/winbindd/winbindd_cm.c | 36 ++--
source3/winbindd/winbindd_cred_cache.c | 14 +-
source3/winbindd/winbindd_dual.c | 50 ++---
source3/winbindd/winbindd_dual_srv.c | 9 +-
source3/winbindd/winbindd_irpc.c | 8 +-
source3/winbindd/winbindd_misc.c | 2 +-
source3/winbindd/winbindd_pam_auth.c | 2 +-
source3/winbindd/winbindd_pam_auth_crap.c | 2 +-
source3/winbindd/winbindd_pam_chauthtok.c | 2 +-
.../winbindd/winbindd_pam_chng_pswd_auth_crap.c | 2 +-
source3/winbindd/winbindd_pam_logoff.c | 2 +-
source3/winbindd/winbindd_proto.h | 2 -
source3/winbindd/winbindd_util.c | 2 +-
source4/torture/vfs/fruit.c | 198 +++++++++--------
testprogs/blackbox/test_net_ads.sh | 15 +-
54 files changed, 1351 insertions(+), 421 deletions(-)
create mode 100755 source3/script/tests/test_net_rpc_oldjoin.sh
Changeset truncated at 500 lines:
diff --git a/VERSION b/VERSION
index c0e85a2..0c4ca38 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
########################################################
SAMBA_VERSION_MAJOR=4
SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=11
+SAMBA_VERSION_RELEASE=12
########################################################
# If a official release has a serious bug #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 8199d91..a759fa9 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,99 @@
==============================
+ Release Notes for Samba 4.6.12
+ December 20, 2017
+ =============================
+
+
+This is the latest stable release of the Samba 4.6 release series.
+
+
+smbclient reparse point symlink parameters reversed
+===================================================
+
+A bug in smbclient caused the 'symlink' command to reverse the
+meaning of the new name and link target parameters when creating a
+reparse point symlink against a Windows server.
+
+This only affects using the smbclient 'symlink' command against
+a Windows server, not a Samba server using the UNIX extensions
+(the parameter order is correct in that case) so no existing
+user scripts that depend on creating symlinks on Samba servers
+need to change.
+
+As this is a little used feature the ordering of these parameters
+has been reversed to match the parameter ordering of the UNIX
+extensions 'symlink' command. This means running 'symlink' against
+both Windows and Samba now uses the same paramter ordering in both
+cases.
+
+The usage message for this command has also been improved to remove confusion.
+
+
+Changes since 4.6.11:
+---------------------
+
+o Jeremy Allison <jra at samba.org>
+ * BUG 13140: s3: smbclient: Implement 'volume' command over SMB2.
+ * BUG 13171: s3: libsmb: Fix valgrind read-after-free error in
+ cli_smb2_close_fnum_recv().
+ * BUG 13172: s3: libsmb: Fix reversing of oldname/newname paths when creating
+ a reparse point symlink on Windows from smbclient.
+
+o Timur I. Bakeyev <timur at iXsystems.com>
+ * BUG 12934: Build man page for vfs_zfsacl.8 with Samba.
+
+o Ralph Boehme <slow at samba.org>
+ * BUG 6133: vfs_zfsacl: Fix compilation error.
+ * BUG 13051: "smb encrypt" setting changes are not fully applied until full
+ smbd restart.
+ * BUG 13052: winbindd: Fix idmap_rid dependency on trusted domain list.
+ * BUG 13155: vfs_fruit: Proper VFS-stackable conversion of FinderInfo.
+
+o Amitay Isaacs <amitay at gmail.com>
+ * BUG 13153: ctdb: sock_daemon leaks memory.
+ * BUG 13154: TCP tickles not getting synchronised on CTDB restart.
+
+o Volker Lendecke <vl at samba.org>
+ * BUG 13150: winbindd: Parent and child share a ctdb connection.
+ * BUG 13179: pthreadpool: Fix starvation after fork.
+ * BUG 13180: ctdb: Messaging initialisation for CTDB does not register
+ unique ID.
+
+o Stefan Metzmacher <metze at samba.org>
+ * BUG 13149: libnet_join: Fix 'net rpc oldjoin'.
+
+o Noel Power <noel.power at suse.com>
+ * BUG 13166: s3:libads: net ads keytab list fails with "Key table name
+ malformed".
+
+o Christof Schmitt <cs at samba.org>
+ * BUG 13170: pthreadpool: Undo put_job when returning error.
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored. All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+ ==============================
Release Notes for Samba 4.6.11
November 21, 2017
=============================
@@ -66,8 +161,8 @@ database (https://bugzilla.samba.org/).
======================================================================
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
+
==============================
Release Notes for Samba 4.6.10
diff --git a/ctdb/common/sock_daemon.c b/ctdb/common/sock_daemon.c
index b53b4d8..1fe5ff5 100644
--- a/ctdb/common/sock_daemon.c
+++ b/ctdb/common/sock_daemon.c
@@ -628,6 +628,14 @@ static void sock_daemon_run_started(struct tevent_req *subreq)
struct sock_daemon_run_state *state = tevent_req_data(
req, struct sock_daemon_run_state);
struct sock_daemon_context *sockd = state->sockd;
+ bool status;
+
+ status = tevent_wakeup_recv(subreq);
+ TALLOC_FREE(subreq);
+ if (! status) {
+ tevent_req_error(req, EIO);
+ return;
+ }
D_NOTICE("daemon started, pid=%u\n", getpid());
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index b3bc9cf..a4f84a3 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -1567,6 +1567,7 @@ struct revokechild_deferred_call {
struct ctdb_req_header *hdr;
deferred_requeue_fn fn;
void *ctx;
+ struct revokechild_handle *rc;
};
struct revokechild_handle {
@@ -1591,12 +1592,20 @@ static void deferred_call_requeue(struct tevent_context *ev,
while (dlist != NULL) {
struct revokechild_deferred_call *dcall = dlist;
+ talloc_set_destructor(dcall, NULL);
DLIST_REMOVE(dlist, dcall);
dcall->fn(dcall->ctx, dcall->hdr);
talloc_free(dcall);
}
}
+static int deferred_call_destructor(struct revokechild_deferred_call *dcall)
+{
+ struct revokechild_handle *rc = dcall->rc;
+
+ DLIST_REMOVE(rc->deferred_call_list, dcall);
+ return 0;
+}
static int revokechild_destructor(struct revokechild_handle *rc)
{
@@ -1935,7 +1944,7 @@ int ctdb_add_revoke_deferred_call(struct ctdb_context *ctdb, struct ctdb_db_cont
return -1;
}
- deferred_call = talloc(ctdb_db, struct revokechild_deferred_call);
+ deferred_call = talloc(call_context, struct revokechild_deferred_call);
if (deferred_call == NULL) {
DEBUG(DEBUG_ERR,("Failed to allocate deferred call structure for revoking record\n"));
return -1;
@@ -1945,6 +1954,9 @@ int ctdb_add_revoke_deferred_call(struct ctdb_context *ctdb, struct ctdb_db_cont
deferred_call->hdr = talloc_steal(deferred_call, hdr);
deferred_call->fn = fn;
deferred_call->ctx = call_context;
+ deferred_call->rc = rc;
+
+ talloc_set_destructor(deferred_call, deferred_call_destructor);
DLIST_ADD(rc->deferred_call_list, deferred_call);
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 4d6987a..80f205e 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1085,12 +1085,6 @@ static void ctdb_setup_event_callback(struct ctdb_context *ctdb, int status,
}
ctdb_run_notification_script(ctdb, "setup");
- /* tell all other nodes we've just started up */
- ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL,
- 0, CTDB_CONTROL_STARTUP, 0,
- CTDB_CTRL_FLAG_NOREPLY,
- tdb_null, NULL, NULL);
-
/* Start the recovery daemon */
if (ctdb_start_recoverd(ctdb) != 0) {
DEBUG(DEBUG_ALERT,("Failed to start recovery daemon\n"));
diff --git a/ctdb/server/ctdb_monitor.c b/ctdb/server/ctdb_monitor.c
index 738acb1..1864887 100644
--- a/ctdb/server/ctdb_monitor.c
+++ b/ctdb/server/ctdb_monitor.c
@@ -243,6 +243,12 @@ static void ctdb_startup_callback(struct ctdb_context *ctdb, int status, void *p
ctdb->monitor->monitoring_mode = CTDB_MONITORING_ENABLED;
+ /* tell all other nodes we've just started up */
+ ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_CONNECTED,
+ 0, CTDB_CONTROL_STARTUP, 0,
+ CTDB_CTRL_FLAG_NOREPLY,
+ tdb_null, NULL, NULL);
+
tevent_add_timer(ctdb->ev, ctdb->monitor->monitor_context,
timeval_current_ofs(ctdb->monitor->next_interval, 0),
ctdb_check_health, ctdb);
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index 513da63..b7fab09 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -1495,24 +1495,23 @@ int32_t ctdb_control_tcp_remove(struct ctdb_context *ctdb, TDB_DATA indata)
}
+static void ctdb_send_set_tcp_tickles_for_all(struct ctdb_context *ctdb,
+ bool force);
+
/*
Called when another daemon starts - causes all tickles for all
public addresses we are serving to be sent to the new node on the
- next check. This actually causes the next scheduled call to
- tdb_update_tcp_tickles() to update all nodes. This is simple and
+ next check. This actually causes the tickles to be sent to the
+ other node immediately. In case there is an error, the periodic
+ timer will send the updates on timer event. This is simple and
doesn't require careful error handling.
*/
int32_t ctdb_control_startup(struct ctdb_context *ctdb, uint32_t pnn)
{
- struct ctdb_vnn *vnn;
-
DEBUG(DEBUG_INFO, ("Received startup control from node %lu\n",
(unsigned long) pnn));
- for (vnn = ctdb->vnn; vnn != NULL; vnn = vnn->next) {
- vnn->tcp_update_needed = true;
- }
-
+ ctdb_send_set_tcp_tickles_for_all(ctdb, true);
return 0;
}
@@ -1995,43 +1994,53 @@ static int ctdb_send_set_tcp_tickles_for_ip(struct ctdb_context *ctdb,
return ret;
}
-
-/*
- perform tickle updates if required
- */
-static void ctdb_update_tcp_tickles(struct tevent_context *ev,
- struct tevent_timer *te,
- struct timeval t, void *private_data)
+static void ctdb_send_set_tcp_tickles_for_all(struct ctdb_context *ctdb,
+ bool force)
{
- struct ctdb_context *ctdb = talloc_get_type(private_data, struct ctdb_context);
- int ret;
struct ctdb_vnn *vnn;
+ int ret;
- for (vnn=ctdb->vnn;vnn;vnn=vnn->next) {
- /* we only send out updates for public addresses that
+ for (vnn = ctdb->vnn; vnn != NULL; vnn = vnn->next) {
+ /* we only send out updates for public addresses that
we have taken over
*/
if (ctdb->pnn != vnn->pnn) {
continue;
}
+
/* We only send out the updates if we need to */
- if (!vnn->tcp_update_needed) {
+ if (!force && !vnn->tcp_update_needed) {
continue;
}
+
ret = ctdb_send_set_tcp_tickles_for_ip(ctdb,
&vnn->public_address,
vnn->tcp_array);
if (ret != 0) {
- DEBUG(DEBUG_ERR,("Failed to send the tickle update for public address %s\n",
- ctdb_addr_to_str(&vnn->public_address)));
+ D_ERR("Failed to send the tickle update for ip %s\n",
+ ctdb_addr_to_str(&vnn->public_address));
+ vnn->tcp_update_needed = true;
} else {
- DEBUG(DEBUG_INFO,
- ("Sent tickle update for public address %s\n",
- ctdb_addr_to_str(&vnn->public_address)));
+ D_INFO("Sent tickle update for ip %s\n",
+ ctdb_addr_to_str(&vnn->public_address));
vnn->tcp_update_needed = false;
}
}
+}
+
+/*
+ perform tickle updates if required
+ */
+static void ctdb_update_tcp_tickles(struct tevent_context *ev,
+ struct tevent_timer *te,
+ struct timeval t, void *private_data)
+{
+ struct ctdb_context *ctdb = talloc_get_type(
+ private_data, struct ctdb_context);
+
+ ctdb_send_set_tcp_tickles_for_all(ctdb, false);
+
tevent_add_timer(ctdb->ev, ctdb->tickle_update_context,
timeval_current_ofs(ctdb->tunable.tickle_update_interval, 0),
ctdb_update_tcp_tickles, ctdb);
diff --git a/docs-xml/smbdotconf/tuning/getwdcache.xml b/docs-xml/smbdotconf/tuning/getwdcache.xml
index 93f7a90..ec4d9ed 100644
--- a/docs-xml/smbdotconf/tuning/getwdcache.xml
+++ b/docs-xml/smbdotconf/tuning/getwdcache.xml
@@ -6,7 +6,7 @@
<para>This is a tuning option. When this is enabled a
caching algorithm will be used to reduce the time taken for getwd()
calls. This can have a significant impact on performance, especially
- when the <smbconfoption name="wide smbconfoptions"/> parameter is set to <constant>no</constant>.</para>
+ when the <smbconfoption name="wide links"/> parameter is set to <constant>no</constant>.</para>
</description>
<value type="default">yes</value>
diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build
index 0b690a8..093a20d 100644
--- a/docs-xml/wscript_build
+++ b/docs-xml/wscript_build
@@ -142,3 +142,6 @@ if ('XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']):
if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
bld.SAMBAMANPAGES(krb5_locator_manpages)
+
+ if bld.SAMBA3_IS_ENABLED_MODULE('vfs_zfsacl'):
+ bld.SAMBAMANPAGES('manpages/vfs_zfsacl.8')
diff --git a/librpc/idl/winbind.idl b/librpc/idl/winbind.idl
index 05db6b9..ab9af2d 100644
--- a/librpc/idl/winbind.idl
+++ b/librpc/idl/winbind.idl
@@ -58,6 +58,7 @@ interface winbind
NTSTATUS wbint_UnixIDs2Sids(
[in,string,charset(UTF8)] char *domain_name,
+ [in] dom_sid domain_sid,
[in] uint32 num_ids,
[in,out] unixid xids[num_ids],
[out] dom_sid sids[num_ids]
diff --git a/selftest/knownfail b/selftest/knownfail
index 713e39b..6e1d058 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -307,3 +307,4 @@
^samba.tests.dcerpc.dnsserver.samba.tests.dcerpc.dnsserver.DnsserverTests.test_add_duplicate_different_type.*
^samba.tests.dcerpc.dnsserver.samba.tests.dcerpc.dnsserver.DnsserverTests.test_rank_none.*
^samba.tests.dcerpc.dnsserver.samba.tests.dcerpc.dnsserver.DnsserverTests.test_security_descriptor.*
+^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion\(nt4_dc\)
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 66ac1e1..dbfad1c 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1789,6 +1789,7 @@ sub provision($$$$$$$$)
fruit:metadata = netatalk
fruit:locking = netatalk
fruit:encoding = native
+ fruit:veto_appledouble = no
[vfs_fruit_metadata_stream]
path = $shrdir
@@ -1796,6 +1797,7 @@ sub provision($$$$$$$$)
ea support = yes
fruit:resource = file
fruit:metadata = stream
+ fruit:veto_appledouble = no
[vfs_fruit_stream_depot]
path = $shrdir
@@ -1803,6 +1805,7 @@ sub provision($$$$$$$$)
ea support = yes
fruit:resource = stream
fruit:metadata = stream
+ fruit:veto_appledouble = no
[vfs_wo_fruit]
path = $shrdir
diff --git a/source3/client/client.c b/source3/client/client.c
index bb2518a..4fefc99 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3331,7 +3331,7 @@ static int cmd_readlink(void)
static int cmd_symlink(void)
{
TALLOC_CTX *ctx = talloc_tos();
- char *oldname = NULL;
+ char *link_target = NULL;
char *newname = NULL;
char *buf = NULL;
char *buf2 = NULL;
@@ -3340,11 +3340,11 @@ static int cmd_symlink(void)
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
!next_token_talloc(ctx, &cmd_ptr,&buf2,NULL)) {
- d_printf("symlink <oldname> <newname>\n");
+ d_printf("symlink <link_target> <newname>\n");
return 1;
}
/* Oldname (link target) must be an untouched blob. */
- oldname = buf;
+ link_target = buf;
if (SERVER_HAS_UNIX_CIFS(cli)) {
newname = talloc_asprintf(ctx, "%s%s", client_get_cur_dir(),
@@ -3360,19 +3360,20 @@ static int cmd_symlink(void)
status = cli_resolve_path(ctx, "", auth_info, cli, newname,
&newcli, &newname);
if (!NT_STATUS_IS_OK(status)) {
- d_printf("link %s: %s\n", oldname, nt_errstr(status));
+ d_printf("link %s: %s\n", newname,
+ nt_errstr(status));
return 1;
}
- status = cli_posix_symlink(newcli, oldname, newname);
+ status = cli_posix_symlink(newcli, link_target, newname);
} else {
status = cli_symlink(
- cli, oldname, buf2,
+ cli, link_target, buf2,
buf2[0] == '\\' ? 0 : SYMLINK_FLAG_RELATIVE);
}
if (!NT_STATUS_IS_OK(status)) {
d_printf("%s symlinking files (%s -> %s)\n",
- nt_errstr(status), oldname, newname);
+ nt_errstr(status), newname, link_target);
return 1;
}
@@ -5696,7 +5697,13 @@ static void readline_callback(void)
/* Ping the server to keep the connection alive using SMBecho. */
memset(garbage, 0xf0, sizeof(garbage));
status = cli_echo(cli, 1, data_blob_const(garbage, sizeof(garbage)));
- if (NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_IS_OK(status) ||
+ NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) {
+ /*
+ * Even if server returns NT_STATUS_INVALID_PARAMETER
+ * it still responded.
+ * BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007
+ */
return;
}
diff --git a/source3/include/idmap.h b/source3/include/idmap.h
index c379eba..1ca79cc 100644
--- a/source3/include/idmap.h
+++ b/source3/include/idmap.h
@@ -36,6 +36,11 @@ struct wbint_userinfo;
struct idmap_domain {
const char *name;
+ /*
+ * dom_sid is currently only initialized in the unixids_to_sids request,
+ * so don't rely on this being filled out everywhere!
+ */
+ struct dom_sid dom_sid;
struct idmap_methods *methods;
NTSTATUS (*query_user)(struct idmap_domain *domain,
struct wbint_userinfo *info);
diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c
index bee2685..b375da2 100644
--- a/source3/lib/messages_ctdbd.c
+++ b/source3/lib/messages_ctdbd.c
--
Samba Shared Repository
More information about the samba-cvs
mailing list