diff options
author | Ralph Boehme <slow@samba.org> | 2015-10-15 10:06:42 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-10-21 03:10:27 +0200 |
commit | 7f8f1ab9a48cd0e90c0b18a73956c25afb528a99 (patch) | |
tree | 8946873d069a8d21532355a652f324ddf086e70e /source3/utils/net_serverid.c | |
parent | f00dd4a8d13bb6806ac2b123a99ad9db8a8a2482 (diff) | |
download | samba-7f8f1ab9a48cd0e90c0b18a73956c25afb528a99.tar.gz |
net: print file path in serverid wipedbs --verbose
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Oct 21 03:10:28 CEST 2015 on sn-devel-104
Diffstat (limited to 'source3/utils/net_serverid.c')
-rw-r--r-- | source3/utils/net_serverid.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source3/utils/net_serverid.c b/source3/utils/net_serverid.c index 41e09e3d3f8..630a7dea082 100644 --- a/source3/utils/net_serverid.c +++ b/source3/utils/net_serverid.c @@ -26,6 +26,7 @@ #include "lib/conn_tdb.h" #include "smbd/globals.h" #include "util_tdb.h" +#include "librpc/gen_ndr/ndr_open_files.h" static int net_serverid_list_fn(const struct server_id *id, uint32_t msg_flags, void *priv) @@ -303,9 +304,22 @@ static int wipedbs_traverse_open(struct smbXsrv_open_global0 *open, if (state->verbose) { TALLOC_CTX *mem_ctx = talloc_new(talloc_tos()); - d_printf("open[global: %u] disconnected at " + enum ndr_err_code ndr_err; + struct vfs_default_durable_cookie cookie; + + ndr_err = ndr_pull_struct_blob( + &open->backend_cookie, mem_ctx, &cookie, + (ndr_pull_flags_fn_t)ndr_pull_vfs_default_durable_cookie); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + d_printf("ndr_pull_struct_blob failed\n"); + ret = -1; + goto done; + } + + d_printf("open[%s/%s id: 0x%" PRIx32 "] disconnected at " "[%s] %us ago with timeout of %us " "-%s reached\n", + cookie.servicepath, cookie.base_name, open->open_global_id, nt_time_string(mem_ctx, open->disconnect_time), (unsigned)(tdiff/1000000), |