summaryrefslogtreecommitdiffstats
path: root/source3/utils
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-10-04 04:10:23 +0000
committerGerald Carter <jerry@samba.org>2002-10-04 04:10:23 +0000
commit36ef82a52953384acedbd51f54ded9357fa8ca3e (patch)
tree3e74148ba7567a89a444347c8d3b49922e7f9844 /source3/utils
parent474340e4403648812e7d8eb9eeb4c4111afbf725 (diff)
downloadsamba-36ef82a52953384acedbd51f54ded9357fa8ca3e.tar.gz
samba-36ef82a52953384acedbd51f54ded9357fa8ca3e.tar.xz
samba-36ef82a52953384acedbd51f54ded9357fa8ca3e.zip
merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD (This used to be commit 1cfd2ee433305e91e87804dd55d10e025d30a69e)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c54
-rw-r--r--source3/utils/net_rpc_join.c6
-rw-r--r--source3/utils/net_rpc_samsync.c4
-rw-r--r--source3/utils/smbcacls.c2
4 files changed, 33 insertions, 33 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 11f73a1387..06538797e2 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -71,7 +71,7 @@ static DOM_SID *net_get_remote_domain_sid(struct cli_state *cli)
}
- if (!cli_nt_session_open (cli, PIPE_LSARPC)) {
+ if (!cli_nt_session_open (cli, PI_LSARPC)) {
fprintf(stderr, "could not initialise lsa pipe\n");
goto error;
}
@@ -117,7 +117,7 @@ static DOM_SID *net_get_remote_domain_sid(struct cli_state *cli)
* @return A shell status integer (0 for success)
*/
-static int run_rpc_command(struct cli_state *cli_arg, const char *pipe_name, int conn_flags,
+static int run_rpc_command(struct cli_state *cli_arg, const int pipe_idx, int conn_flags,
rpc_command_fn fn,
int argc, const char **argv)
{
@@ -146,8 +146,8 @@ static int run_rpc_command(struct cli_state *cli_arg, const char *pipe_name, int
return -1;
}
- if (!cli_nt_session_open(cli, pipe_name)) {
- DEBUG(0, ("Could not initialise %s pipe\n", pipe_name));
+ if (!cli_nt_session_open(cli, pipe_idx)) {
+ DEBUG(0, ("Could not initialise pipe\n"));
}
nt_status = fn(domain_sid, cli, mem_ctx, argc, argv);
@@ -209,7 +209,7 @@ static NTSTATUS rpc_changetrustpw_internals(const DOM_SID *domain_sid, struct cl
static int rpc_changetrustpw(int argc, const char **argv)
{
- return run_rpc_command(NULL, PIPE_NETLOGON, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC, rpc_changetrustpw_internals,
+ return run_rpc_command(NULL, PI_NETLOGON, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC, rpc_changetrustpw_internals,
argc, argv);
}
@@ -277,7 +277,7 @@ static NTSTATUS rpc_join_oldstyle_internals(const DOM_SID *domain_sid, struct cl
static int net_rpc_join_oldstyle(int argc, const char **argv)
{
- return run_rpc_command(NULL, PIPE_NETLOGON, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC, rpc_join_oldstyle_internals,
+ return run_rpc_command(NULL, PI_NETLOGON, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC, rpc_join_oldstyle_internals,
argc, argv);
}
@@ -400,7 +400,7 @@ rpc_info_internals(const DOM_SID *domain_sid, struct cli_state *cli,
**/
int net_rpc_info(int argc, const char **argv)
{
- return run_rpc_command(NULL, PIPE_SAMR, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,
+ return run_rpc_command(NULL, PI_SAMR, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,
rpc_info_internals,
argc, argv);
}
@@ -449,7 +449,7 @@ rpc_getsid_internals(const DOM_SID *domain_sid, struct cli_state *cli,
**/
int net_rpc_getsid(int argc, const char **argv)
{
- return run_rpc_command(NULL, PIPE_SAMR, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,
+ return run_rpc_command(NULL, PI_SAMR, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,
rpc_getsid_internals,
argc, argv);
}
@@ -553,7 +553,7 @@ static NTSTATUS rpc_user_add_internals(const DOM_SID *domain_sid, struct cli_sta
static int rpc_user_add(int argc, const char **argv)
{
- return run_rpc_command(NULL, PIPE_SAMR, 0, rpc_user_add_internals,
+ return run_rpc_command(NULL, PI_SAMR, 0, rpc_user_add_internals,
argc, argv);
}
@@ -654,7 +654,7 @@ static NTSTATUS rpc_user_del_internals(const DOM_SID *domain_sid,
static int rpc_user_delete(int argc, const char **argv)
{
- return run_rpc_command(NULL, PIPE_SAMR, 0, rpc_user_del_internals,
+ return run_rpc_command(NULL, PI_SAMR, 0, rpc_user_del_internals,
argc, argv);
}
@@ -756,7 +756,7 @@ rpc_user_info_internals(const DOM_SID *domain_sid, struct cli_state *cli,
static int rpc_user_info(int argc, const char **argv)
{
- return run_rpc_command(NULL, PIPE_SAMR, 0, rpc_user_info_internals,
+ return run_rpc_command(NULL, PI_SAMR, 0, rpc_user_info_internals,
argc, argv);
}
@@ -851,7 +851,7 @@ int net_rpc_user(int argc, const char **argv)
if (opt_long_list_entries) {
} else {
}
- return run_rpc_command(NULL,PIPE_SAMR, 0,
+ return run_rpc_command(NULL,PI_SAMR, 0,
rpc_user_list_internals,
argc, argv);
}
@@ -1002,7 +1002,7 @@ int net_rpc_group(int argc, const char **argv)
if (opt_long_list_entries) {
} else {
}
- return run_rpc_command(NULL, PIPE_SAMR, 0,
+ return run_rpc_command(NULL, PI_SAMR, 0,
rpc_group_list_internals,
argc, argv);
}
@@ -1060,7 +1060,7 @@ static int rpc_share_add(int argc, const char **argv)
DEBUG(1,("Sharename or path not specified on add\n"));
return rpc_share_usage(argc, argv);
}
- return run_rpc_command(NULL, PIPE_SRVSVC, 0,
+ return run_rpc_command(NULL, PI_SRVSVC, 0,
rpc_share_add_internals,
argc, argv);
}
@@ -1106,7 +1106,7 @@ static int rpc_share_delete(int argc, const char **argv)
DEBUG(1,("Sharename not specified on delete\n"));
return rpc_share_usage(argc, argv);
}
- return run_rpc_command(NULL, PIPE_SRVSVC, 0,
+ return run_rpc_command(NULL, PI_SRVSVC, 0,
rpc_share_del_internals,
argc, argv);
}
@@ -1196,7 +1196,7 @@ int net_rpc_share(int argc, const char **argv)
};
if (argc == 0)
- return run_rpc_command(NULL, PIPE_SRVSVC, 0,
+ return run_rpc_command(NULL, PI_SRVSVC, 0,
rpc_share_list_internals,
argc, argv);
@@ -1250,7 +1250,7 @@ static int rpc_file_close(int argc, const char **argv)
return(rpc_file_usage(argc, argv));
}
- return run_rpc_command(NULL, PIPE_SRVSVC, 0,
+ return run_rpc_command(NULL, PI_SRVSVC, 0,
rpc_file_close_internals,
argc, argv);
}
@@ -1341,7 +1341,7 @@ static int rpc_file_user(int argc, const char **argv)
return(rpc_file_usage(argc, argv));
}
- return run_rpc_command(NULL, PIPE_SRVSVC, 0,
+ return run_rpc_command(NULL, PI_SRVSVC, 0,
rpc_file_list_internals,
argc, argv);
}
@@ -1366,7 +1366,7 @@ int net_rpc_file(int argc, const char **argv)
};
if (argc == 0)
- return run_rpc_command(NULL, PIPE_SRVSVC, 0,
+ return run_rpc_command(NULL, PI_SRVSVC, 0,
rpc_file_list_internals,
argc, argv);
@@ -1421,7 +1421,7 @@ static NTSTATUS rpc_shutdown_abort_internals(const DOM_SID *domain_sid, struct c
static int rpc_shutdown_abort(int argc, const char **argv)
{
- return run_rpc_command(NULL, PIPE_WINREG, 0, rpc_shutdown_abort_internals,
+ return run_rpc_command(NULL, PI_WINREG, 0, rpc_shutdown_abort_internals,
argc, argv);
}
@@ -1511,7 +1511,7 @@ static NTSTATUS rpc_shutdown_internals(const DOM_SID *domain_sid, struct cli_sta
static int rpc_shutdown(int argc, const char **argv)
{
- return run_rpc_command(NULL, PIPE_WINREG, 0, rpc_shutdown_internals,
+ return run_rpc_command(NULL, PI_WINREG, 0, rpc_shutdown_internals,
argc, argv);
}
@@ -1602,7 +1602,7 @@ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid, struct cli
static int rpc_trustdom_add(int argc, const char **argv)
{
- return run_rpc_command(NULL, PIPE_SAMR, 0, rpc_trustdom_add_internals,
+ return run_rpc_command(NULL, PI_SAMR, 0, rpc_trustdom_add_internals,
argc, argv);
}
@@ -1718,7 +1718,7 @@ static int rpc_trustdom_establish(int argc, const char **argv)
* note: It is now used only to get unicode domain name
*/
- if (!cli_nt_session_open(cli, PIPE_WKSSVC)) {
+ if (!cli_nt_session_open(cli, PI_WKSSVC)) {
DEBUG(0, ("Couldn't not initialise wkssvc pipe\n"));
return -1;
}
@@ -1751,7 +1751,7 @@ static int rpc_trustdom_establish(int argc, const char **argv)
return -1;
}
- if (!cli_nt_session_open(cli, PIPE_LSARPC)) {
+ if (!cli_nt_session_open(cli, PI_LSARPC)) {
DEBUG(0, ("Could not initialise lsa pipe\n"));
cli_shutdown(cli);
return -1;
@@ -1929,7 +1929,7 @@ static int rpc_trustdom_list(int argc, const char **argv)
return -1;
};
- if (!cli_nt_session_open(cli, PIPE_LSARPC)) {
+ if (!cli_nt_session_open(cli, PI_LSARPC)) {
DEBUG(0, ("Could not initialise lsa pipe\n"));
return -1;
};
@@ -2008,7 +2008,7 @@ static int rpc_trustdom_list(int argc, const char **argv)
/*
* Open \PIPE\samr and get needed policy handles
*/
- if (!cli_nt_session_open(cli, PIPE_SAMR)) {
+ if (!cli_nt_session_open(cli, PI_SAMR)) {
DEBUG(0, ("Could not initialise samr pipe\n"));
return -1;
};
@@ -2080,7 +2080,7 @@ static int rpc_trustdom_list(int argc, const char **argv)
remote_cli = net_make_ipc_connection(NET_FLAGS_PDC | NET_FLAGS_ANONYMOUS);
if (remote_cli) {
/* query for domain's sid */
- if (run_rpc_command(remote_cli, PIPE_LSARPC, 0, rpc_query_domain_sid, argc, argv))
+ if (run_rpc_command(remote_cli, PI_LSARPC, 0, rpc_query_domain_sid, argc, argv))
d_printf("couldn't get domain's sid\n");
cli_shutdown(remote_cli);
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index b08095f1cc..c209886ef1 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -56,7 +56,7 @@ int net_rpc_join_ok(const char *domain)
return 1;
}
- if (!cli_nt_session_open(cli, PIPE_NETLOGON)) {
+ if (!cli_nt_session_open(cli, PI_NETLOGON)) {
DEBUG(0,("Error connecting to NETLOGON pipe\n"));
goto done;
}
@@ -150,7 +150,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
/* Fetch domain sid */
- if (!cli_nt_session_open(cli, PIPE_LSARPC)) {
+ if (!cli_nt_session_open(cli, PI_LSARPC)) {
DEBUG(0, ("Error connecting to SAM pipe\n"));
goto done;
}
@@ -170,7 +170,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
cli_nt_session_close(cli); /* Done with this pipe */
/* Create domain user */
- if (!cli_nt_session_open(cli, PIPE_SAMR)) {
+ if (!cli_nt_session_open(cli, PI_SAMR)) {
DEBUG(0, ("Error connecting to SAM pipe\n"));
goto done;
}
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index c040b3cca2..00e5dee0ce 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -156,7 +156,7 @@ int rpc_samdump(int argc, const char **argv)
return 1;
}
- if (!cli_nt_session_open(cli, PIPE_NETLOGON)) {
+ if (!cli_nt_session_open(cli, PI_NETLOGON)) {
DEBUG(0,("Error connecting to NETLOGON pipe\n"));
goto fail;
}
@@ -669,7 +669,7 @@ int rpc_vampire(int argc, const char **argv)
return 1;
}
- if (!cli_nt_session_open(cli, PIPE_NETLOGON)) {
+ if (!cli_nt_session_open(cli, PI_NETLOGON)) {
DEBUG(0,("Error connecting to NETLOGON pipe\n"));
goto fail;
}
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 4f9df90fa2..2e8317f05a 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -83,7 +83,7 @@ static BOOL cacls_open_policy_hnd(void)
if (!global_hack_cli) {
global_hack_cli = connect_one("IPC$");
- if (!cli_nt_session_open (global_hack_cli, PIPE_LSARPC)) {
+ if (!cli_nt_session_open (global_hack_cli, PI_LSARPC)) {
return False;
}
}