summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_srvsvc.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-03-18 06:30:30 +0000
committerTim Potter <tpot@samba.org>2003-03-18 06:30:30 +0000
commit417bf608f4253fadf4b227b5f7360f03b0193ff2 (patch)
treecc6261c79833fa7c59701105deefcf3fedd384d0 /source3/rpcclient/cmd_srvsvc.c
parente6d438c2db8f9e5e1c2eff12fd278ddf1db353b4 (diff)
downloadsamba-417bf608f4253fadf4b227b5f7360f03b0193ff2.tar.gz
samba-417bf608f4253fadf4b227b5f7360f03b0193ff2.tar.bz2
samba-417bf608f4253fadf4b227b5f7360f03b0193ff2.zip
Merge of waider's rpcclient return type patch.
(This used to be commit fb91bfa7a28f548dcc549f7e09805e4485c83538)
Diffstat (limited to 'source3/rpcclient/cmd_srvsvc.c')
-rw-r--r--source3/rpcclient/cmd_srvsvc.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c
index 8597c7bc2e..3e569f51ce 100644
--- a/source3/rpcclient/cmd_srvsvc.c
+++ b/source3/rpcclient/cmd_srvsvc.c
@@ -179,7 +179,7 @@ static void display_srv_info_102(SRV_INFO_102 *sv102)
}
/* Server query info */
-static NTSTATUS cmd_srvsvc_srv_query_info(struct cli_state *cli,
+static WERROR cmd_srvsvc_srv_query_info(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -189,7 +189,7 @@ static NTSTATUS cmd_srvsvc_srv_query_info(struct cli_state *cli,
if (argc > 2) {
printf("Usage: %s [infolevel]\n", argv[0]);
- return NT_STATUS_OK;
+ return WERR_OK;
}
if (argc == 2)
@@ -217,7 +217,7 @@ static NTSTATUS cmd_srvsvc_srv_query_info(struct cli_state *cli,
}
done:
- return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+ return result;
}
static void display_share_info_1(SRV_SHARE_INFO_1 *info1)
@@ -246,7 +246,7 @@ static void display_share_info_2(SRV_SHARE_INFO_2 *info2)
printf("\tpassword:\t%s\n", passwd);
}
-static NTSTATUS cmd_srvsvc_net_share_enum(struct cli_state *cli,
+static WERROR cmd_srvsvc_net_share_enum(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -258,7 +258,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct cli_state *cli,
if (argc > 2) {
printf("Usage: %s [infolevel]\n", argv[0]);
- return NT_STATUS_OK;
+ return WERR_OK;
}
if (argc == 2)
@@ -289,10 +289,10 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct cli_state *cli,
}
done:
- return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+ return result;
}
-static NTSTATUS cmd_srvsvc_net_remote_tod(struct cli_state *cli,
+static WERROR cmd_srvsvc_net_remote_tod(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -301,7 +301,7 @@ static NTSTATUS cmd_srvsvc_net_remote_tod(struct cli_state *cli,
if (argc > 1) {
printf("Usage: %s\n", argv[0]);
- return NT_STATUS_OK;
+ return WERR_OK;
}
result = cli_srvsvc_net_remote_tod(
@@ -311,10 +311,10 @@ static NTSTATUS cmd_srvsvc_net_remote_tod(struct cli_state *cli,
goto done;
done:
- return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+ return result;
}
-static NTSTATUS cmd_srvsvc_net_file_enum(struct cli_state *cli,
+static WERROR cmd_srvsvc_net_file_enum(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv)
{
@@ -326,7 +326,7 @@ static NTSTATUS cmd_srvsvc_net_file_enum(struct cli_state *cli,
if (argc > 2) {
printf("Usage: %s [infolevel]\n", argv[0]);
- return NT_STATUS_OK;
+ return WERR_OK;
}
if (argc == 2)
@@ -343,7 +343,7 @@ static NTSTATUS cmd_srvsvc_net_file_enum(struct cli_state *cli,
goto done;
done:
- return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+ return result;
}
/* List of commands exported by this module */
@@ -352,10 +352,10 @@ struct cmd_set srvsvc_commands[] = {
{ "SRVSVC" },
- { "srvinfo", cmd_srvsvc_srv_query_info, PI_SRVSVC, "Server query info", "" },
- { "netshareenum", cmd_srvsvc_net_share_enum, PI_SRVSVC, "Enumerate shares", "" },
- { "netfileenum", cmd_srvsvc_net_file_enum, PI_SRVSVC, "Enumerate open files", "" },
- { "netremotetod", cmd_srvsvc_net_remote_tod, PI_SRVSVC, "Fetch remote time of day", "" },
+ { "srvinfo", RPC_RTYPE_WERROR, NULL, cmd_srvsvc_srv_query_info, PI_SRVSVC, "Server query info", "" },
+ { "netshareenum",RPC_RTYPE_WERROR, NULL, cmd_srvsvc_net_share_enum, PI_SRVSVC, "Enumerate shares", "" },
+ { "netfileenum", RPC_RTYPE_WERROR, NULL, cmd_srvsvc_net_file_enum, PI_SRVSVC, "Enumerate open files", "" },
+ { "netremotetod",RPC_RTYPE_WERROR, NULL, cmd_srvsvc_net_remote_tod, PI_SRVSVC, "Fetch remote time of day", "" },
{ NULL }
};