summaryrefslogtreecommitdiffstats
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-05-29 01:43:44 +0000
committerTim Potter <tpot@samba.org>2002-05-29 01:43:44 +0000
commit568deecbf0bcda46fd9c927ad10b76d748b8c64d (patch)
treed4fbc740caa88be5608001dcde47c0d58ead43ea /source3/rpcclient
parent43b35364ffda5c779452fb41c015b280fefc6ab6 (diff)
downloadsamba-568deecbf0bcda46fd9c927ad10b76d748b8c64d.tar.gz
samba-568deecbf0bcda46fd9c927ad10b76d748b8c64d.tar.xz
samba-568deecbf0bcda46fd9c927ad10b76d748b8c64d.zip
Added netremotetod to try and figure out which srvsvc commands are denied
when using restrictanonymous. (This used to be commit 0c65978ed07903af808da5f32cc29531aef23225)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_srvsvc.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c
index c02dfd4573..88ebdb207d 100644
--- a/source3/rpcclient/cmd_srvsvc.c
+++ b/source3/rpcclient/cmd_srvsvc.c
@@ -293,6 +293,28 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct cli_state *cli,
return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
}
+static NTSTATUS cmd_srvsvc_net_remote_tod(struct cli_state *cli,
+ TALLOC_CTX *mem_ctx,
+ int argc, char **argv)
+{
+ TIME_OF_DAY_INFO tod;
+ WERROR result;
+
+ if (argc > 1) {
+ printf("Usage: %s\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+
+ result = cli_srvsvc_net_remote_tod(
+ cli, mem_ctx, cli->srv_name_slash, &tod);
+
+ if (!W_ERROR_IS_OK(result))
+ goto done;
+
+ done:
+ return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+}
+
/* List of commands exported by this module */
struct cmd_set srvsvc_commands[] = {
@@ -301,6 +323,7 @@ struct cmd_set srvsvc_commands[] = {
{ "srvinfo", cmd_srvsvc_srv_query_info, PIPE_SRVSVC, "Server query info", "" },
{ "netshareenum", cmd_srvsvc_net_share_enum, PIPE_SRVSVC, "Enumerate shares", "" },
+ { "netremotetod", cmd_srvsvc_net_remote_tod, PIPE_SRVSVC, "Fetch remote time of day", "" },
{ NULL }
};