diff options
author | Gerald Carter <jerry@samba.org> | 2002-10-04 03:51:43 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-10-04 03:51:43 +0000 |
commit | 83e58265b5595f5268bbcbda1a078a81d6fd5a40 (patch) | |
tree | a70b9f8b36df2cc9e634c042e30c309b31046ad1 /source3/rpcclient | |
parent | a237fb349aba013aec8367d4a1b435b60b0c8458 (diff) | |
download | samba-83e58265b5595f5268bbcbda1a078a81d6fd5a40.tar.gz samba-83e58265b5595f5268bbcbda1a078a81d6fd5a40.tar.bz2 samba-83e58265b5595f5268bbcbda1a078a81d6fd5a40.zip |
merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
(This used to be commit 38c9e4299845fd77cc8629945ce2d259489f7437)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_dfs.c | 10 | ||||
-rw-r--r-- | source3/rpcclient/cmd_lsarpc.c | 29 | ||||
-rw-r--r-- | source3/rpcclient/cmd_netlogon.c | 10 | ||||
-rw-r--r-- | source3/rpcclient/cmd_reg.c | 20 | ||||
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 34 | ||||
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 48 | ||||
-rw-r--r-- | source3/rpcclient/cmd_srvsvc.c | 8 | ||||
-rw-r--r-- | source3/rpcclient/cmd_wkssvc.c | 2 | ||||
-rw-r--r-- | source3/rpcclient/rpcclient.c | 25 | ||||
-rw-r--r-- | source3/rpcclient/rpcclient.h | 2 | ||||
-rw-r--r-- | source3/rpcclient/samsync.c | 2 |
11 files changed, 99 insertions, 91 deletions
diff --git a/source3/rpcclient/cmd_dfs.c b/source3/rpcclient/cmd_dfs.c index 8a3c3e9db3..e3c4b77645 100644 --- a/source3/rpcclient/cmd_dfs.c +++ b/source3/rpcclient/cmd_dfs.c @@ -227,11 +227,11 @@ struct cmd_set dfs_commands[] = { { "DFS" }, - { "dfsexist", cmd_dfs_exist, PIPE_NETDFS, "Query DFS support", "" }, - { "dfsadd", cmd_dfs_add, PIPE_NETDFS, "Add a DFS share", "" }, - { "dfsremove", cmd_dfs_remove, PIPE_NETDFS, "Remove a DFS share", "" }, - { "dfsgetinfo", cmd_dfs_getinfo, PIPE_NETDFS, "Query DFS share info", "" }, - { "dfsenum", cmd_dfs_enum, PIPE_NETDFS, "Enumerate dfs shares", "" }, + { "dfsexist", cmd_dfs_exist, PI_NETDFS, "Query DFS support", "" }, + { "dfsadd", cmd_dfs_add, PI_NETDFS, "Add a DFS share", "" }, + { "dfsremove", cmd_dfs_remove, PI_NETDFS, "Remove a DFS share", "" }, + { "dfsgetinfo", cmd_dfs_getinfo, PI_NETDFS, "Query DFS share info", "" }, + { "dfsenum", cmd_dfs_enum, PI_NETDFS, "Enumerate dfs shares", "" }, { NULL } }; diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index ed68160658..af5bb2066b 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -524,22 +524,31 @@ static NTSTATUS cmd_lsa_query_secobj(struct cli_state *cli, return result; } + +static NTSTATUS cmd_lsa_dsrole_getprimarydominfo(struct cli_state *cli, + TALLOC_CTX *mem_ctx, int argc, + char **argv) +{ + return NT_STATUS_OK; +} + /* List of commands exported by this module */ struct cmd_set lsarpc_commands[] = { { "LSARPC" }, - { "lsaquery", cmd_lsa_query_info_policy, PIPE_LSARPC, "Query info policy", "" }, - { "lookupsids", cmd_lsa_lookup_sids, PIPE_LSARPC, "Convert SIDs to names", "" }, - { "lookupnames", cmd_lsa_lookup_names, PIPE_LSARPC, "Convert names to SIDs", "" }, - { "enumtrust", cmd_lsa_enum_trust_dom, PIPE_LSARPC, "Enumerate trusted domains", "Usage: [preferred max number] [enum context (0)]" }, - { "enumprivs", cmd_lsa_enum_privilege, PIPE_LSARPC, "Enumerate privileges", "" }, - { "getdispname", cmd_lsa_get_dispname, PIPE_LSARPC, "Get the privilege name", "" }, - { "lsaenumsid", cmd_lsa_enum_sids, PIPE_LSARPC, "Enumerate the LSA SIDS", "" }, - { "lsaenumprivsaccount", cmd_lsa_enum_privsaccounts, PIPE_LSARPC, "Enumerate the privileges of an SID", "" }, - { "lsalookupprivvalue", cmd_lsa_lookupprivvalue, PIPE_LSARPC, "Get a privilege value given its name", "" }, - { "lsaquerysecobj", cmd_lsa_query_secobj, PIPE_LSARPC, "Query LSA security object", "" }, + { "lsaquery", cmd_lsa_query_info_policy, PI_LSARPC, "Query info policy", "" }, + { "lookupsids", cmd_lsa_lookup_sids, PI_LSARPC, "Convert SIDs to names", "" }, + { "lookupnames", cmd_lsa_lookup_names, PI_LSARPC, "Convert names to SIDs", "" }, + { "enumtrust", cmd_lsa_enum_trust_dom, PI_LSARPC, "Enumerate trusted domains", "Usage: [preferred max number] [enum context (0)]" }, + { "enumprivs", cmd_lsa_enum_privilege, PI_LSARPC, "Enumerate privileges", "" }, + { "getdispname", cmd_lsa_get_dispname, PI_LSARPC, "Get the privilege name", "" }, + { "lsaenumsid", cmd_lsa_enum_sids, PI_LSARPC, "Enumerate the LSA SIDS", "" }, + { "lsaenumprivsaccount", cmd_lsa_enum_privsaccounts, PI_LSARPC, "Enumerate the privileges of an SID", "" }, + { "lsalookupprivvalue", cmd_lsa_lookupprivvalue, PI_LSARPC, "Get a privilege value given its name", "" }, + { "lsaquerysecobj", cmd_lsa_query_secobj, PI_LSARPC, "Query LSA security object", "" }, + { "lsarpcbind", cmd_lsa_dsrole_getprimarydominfo, PI_LSARPC_V2, "Test 2k UUID in rpc bind", "" }, { NULL } }; diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 98ba92e5a3..53a926d52b 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -332,11 +332,11 @@ struct cmd_set netlogon_commands[] = { { "NETLOGON" }, - { "logonctrl2", cmd_netlogon_logon_ctrl2, PIPE_NETLOGON, "Logon Control 2", "" }, - { "logonctrl", cmd_netlogon_logon_ctrl, PIPE_NETLOGON, "Logon Control", "" }, - { "samsync", cmd_netlogon_sam_sync, PIPE_NETLOGON, "Sam Synchronisation", "" }, - { "samdeltas", cmd_netlogon_sam_deltas, PIPE_NETLOGON, "Query Sam Deltas", "" }, - { "samlogon", cmd_netlogon_sam_logon, PIPE_NETLOGON, "Sam Logon", "" }, + { "logonctrl2", cmd_netlogon_logon_ctrl2, PI_NETLOGON, "Logon Control 2", "" }, + { "logonctrl", cmd_netlogon_logon_ctrl, PI_NETLOGON, "Logon Control", "" }, + { "samsync", cmd_netlogon_sam_sync, PI_NETLOGON, "Sam Synchronisation", "" }, + { "samdeltas", cmd_netlogon_sam_deltas, PI_NETLOGON, "Query Sam Deltas", "" }, + { "samlogon", cmd_netlogon_sam_logon, PI_NETLOGON, "Sam Logon", "" }, { NULL } }; diff --git a/source3/rpcclient/cmd_reg.c b/source3/rpcclient/cmd_reg.c index c089917f9b..e0a3201aa9 100644 --- a/source3/rpcclient/cmd_reg.c +++ b/source3/rpcclient/cmd_reg.c @@ -88,7 +88,7 @@ static void cmd_reg_enum(struct client_info *info) } /* open WINREG session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False; + res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; /* open registry receive a policy handle */ res = res ? do_reg_connect(smb_cli, full_keyname, key_name, @@ -247,7 +247,7 @@ static void cmd_reg_query_key(struct client_info *info) } /* open WINREG session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False; + res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; /* open registry receive a policy handle */ res = res ? do_reg_connect(smb_cli, full_keyname, key_name, @@ -410,7 +410,7 @@ static void cmd_reg_create_val(struct client_info *info) dump_data(10, (char *)value.buffer, value.buf_len); /* open WINREG session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False; + res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; /* open registry receive a policy handle */ res = res ? do_reg_connect(smb_cli, keyname, parent_name, @@ -489,7 +489,7 @@ static void cmd_reg_delete_val(struct client_info *info) } /* open WINREG session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False; + res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; /* open registry receive a policy handle */ res = res ? do_reg_connect(smb_cli, keyname, parent_name, @@ -564,7 +564,7 @@ static void cmd_reg_delete_key(struct client_info *info) } /* open WINREG session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False; + res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; /* open registry receive a policy handle */ res = res ? do_reg_connect(smb_cli, parent_name, key_name, @@ -653,7 +653,7 @@ static void cmd_reg_create_key(struct client_info *info) sam_access.mask = SEC_RIGHTS_READ; /* open WINREG session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False; + res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; /* open registry receive a policy handle */ res = res ? do_reg_connect(smb_cli, parent_key, parent_name, @@ -732,7 +732,7 @@ static void cmd_reg_test_key_sec(struct client_info *info) } /* open WINREG session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False; + res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; /* open registry receive a policy handle */ res = res ? do_reg_connect(smb_cli, full_keyname, key_name, @@ -827,7 +827,7 @@ static void cmd_reg_get_key_sec(struct client_info *info) } /* open WINREG session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_WINREG) : False; + res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; /* open registry receive a policy handle */ res = res ? do_reg_connect(smb_cli, full_keyname, key_name, @@ -973,10 +973,10 @@ struct cmd_set reg_commands[] = { { "REG" }, - { "shutdown", cmd_reg_shutdown, PIPE_WINREG, "Remote Shutdown", + { "shutdown", cmd_reg_shutdown, PI_WINREG, "Remote Shutdown", "[-m message] [-t timeout] [-r] [-f] (-r == reboot, -f == force)" }, - { "abortshutdown", cmd_reg_abort_shutdown, PIPE_WINREG, "Abort Shutdown", + { "abortshutdown", cmd_reg_abort_shutdown, PI_WINREG, "Abort Shutdown", "" }, /* { "regenum", cmd_reg_enum, "Registry Enumeration", diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index d9251f90bd..7cc6e24d70 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -1406,23 +1406,23 @@ struct cmd_set samr_commands[] = { { "SAMR" }, - { "queryuser", cmd_samr_query_user, PIPE_SAMR, "Query user info", "" }, - { "querygroup", cmd_samr_query_group, PIPE_SAMR, "Query group info", "" }, - { "queryusergroups", cmd_samr_query_usergroups, PIPE_SAMR, "Query user groups", "" }, - { "queryuseraliases", cmd_samr_query_useraliases, PIPE_SAMR, "Query user aliases", "" }, - { "querygroupmem", cmd_samr_query_groupmem, PIPE_SAMR, "Query group membership", "" }, - { "queryaliasmem", cmd_samr_query_aliasmem, PIPE_SAMR, "Query alias membership", "" }, - { "querydispinfo", cmd_samr_query_dispinfo, PIPE_SAMR, "Query display info", "" }, - { "querydominfo", cmd_samr_query_dominfo, PIPE_SAMR, "Query domain info", "" }, - { "enumdomgroups", cmd_samr_enum_dom_groups, PIPE_SAMR, "Enumerate domain groups", "" }, - { "enumalsgroups", cmd_samr_enum_als_groups, PIPE_SAMR, "Enumerate alias groups", "" }, - - { "createdomuser", cmd_samr_create_dom_user, PIPE_SAMR, "Create domain user", "" }, - { "samlookupnames", cmd_samr_lookup_names, PIPE_SAMR, "Look up names", "" }, - { "samlookuprids", cmd_samr_lookup_rids, PIPE_SAMR, "Look up names", "" }, - { "deletedomuser", cmd_samr_delete_dom_user, PIPE_SAMR, "Delete domain user", "" }, - { "samquerysecobj", cmd_samr_query_sec_obj, PIPE_SAMR, "Query SAMR security object", "" }, - { "getdompwinfo", cmd_samr_get_dom_pwinfo, PIPE_SAMR, "Retrieve domain password info", "" }, + { "queryuser", cmd_samr_query_user, PI_SAMR, "Query user info", "" }, + { "querygroup", cmd_samr_query_group, PI_SAMR, "Query group info", "" }, + { "queryusergroups", cmd_samr_query_usergroups, PI_SAMR, "Query user groups", "" }, + { "queryuseraliases", cmd_samr_query_useraliases, PI_SAMR, "Query user aliases", "" }, + { "querygroupmem", cmd_samr_query_groupmem, PI_SAMR, "Query group membership", "" }, + { "queryaliasmem", cmd_samr_query_aliasmem, PI_SAMR, "Query alias membership", "" }, + { "querydispinfo", cmd_samr_query_dispinfo, PI_SAMR, "Query display info", "" }, + { "querydominfo", cmd_samr_query_dominfo, PI_SAMR, "Query domain info", "" }, + { "enumdomgroups", cmd_samr_enum_dom_groups, PI_SAMR, "Enumerate domain groups", "" }, + { "enumalsgroups", cmd_samr_enum_als_groups, PI_SAMR, "Enumerate alias groups", "" }, + + { "createdomuser", cmd_samr_create_dom_user, PI_SAMR, "Create domain user", "" }, + { "samlookupnames", cmd_samr_lookup_names, PI_SAMR, "Look up names", "" }, + { "samlookuprids", cmd_samr_lookup_rids, PI_SAMR, "Look up names", "" }, + { "deletedomuser", cmd_samr_delete_dom_user, PI_SAMR, "Delete domain user", "" }, + { "samquerysecobj", cmd_samr_query_sec_obj, PI_SAMR, "Query SAMR security object", "" }, + { "getdompwinfo", cmd_samr_get_dom_pwinfo, PI_SAMR, "Retrieve domain password info", "" }, { NULL } }; diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 15648e4d1b..8d18aed168 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -1893,30 +1893,30 @@ struct cmd_set spoolss_commands[] = { { "SPOOLSS" }, - { "adddriver", cmd_spoolss_addprinterdriver, PIPE_SPOOLSS, "Add a print driver", "" }, - { "addprinter", cmd_spoolss_addprinterex, PIPE_SPOOLSS, "Add a printer", "" }, - { "deldriver", cmd_spoolss_deletedriver, PIPE_SPOOLSS, "Delete a printer driver", "" }, - { "enumdata", cmd_spoolss_not_implemented, PIPE_SPOOLSS, "Enumerate printer data (*)", "" }, - { "enumjobs", cmd_spoolss_enum_jobs, PIPE_SPOOLSS, "Enumerate print jobs", "" }, - { "enumports", cmd_spoolss_enum_ports, PIPE_SPOOLSS, "Enumerate printer ports", "" }, - { "enumdrivers", cmd_spoolss_enum_drivers, PIPE_SPOOLSS, "Enumerate installed printer drivers", "" }, - { "enumprinters", cmd_spoolss_enum_printers, PIPE_SPOOLSS, "Enumerate printers", "" }, - { "getdata", cmd_spoolss_not_implemented, PIPE_SPOOLSS, "Get print driver data (*)", "" }, - { "getdriver", cmd_spoolss_getdriver, PIPE_SPOOLSS, "Get print driver information", "" }, - { "getdriverdir", cmd_spoolss_getdriverdir, PIPE_SPOOLSS, "Get print driver upload directory", "" }, - { "getprinter", cmd_spoolss_getprinter, PIPE_SPOOLSS, "Get printer info", "" }, - { "getprintprocdir", cmd_spoolss_getprintprocdir, PIPE_SPOOLSS, "Get print processor directory", "" }, - { "openprinter", cmd_spoolss_open_printer_ex, PIPE_SPOOLSS, "Open printer handle", "" }, - { "setdriver", cmd_spoolss_setdriver, PIPE_SPOOLSS, "Set printer driver", "" }, - { "getprintprocdir", cmd_spoolss_getprintprocdir, PIPE_SPOOLSS, "Get print processor directory", "" }, - { "addform", cmd_spoolss_addform, PIPE_SPOOLSS, "Add form", "" }, - { "setform", cmd_spoolss_setform, PIPE_SPOOLSS, "Set form", "" }, - { "getform", cmd_spoolss_getform, PIPE_SPOOLSS, "Get form", "" }, - { "deleteform", cmd_spoolss_deleteform, PIPE_SPOOLSS, "Delete form", "" }, - { "enumforms", cmd_spoolss_enum_forms, PIPE_SPOOLSS, "Enumerate forms", "" }, - { "setprinter", cmd_spoolss_setprinter, PIPE_SPOOLSS, "Set printer comment", "" }, - { "setprinterdata", cmd_spoolss_setprinterdata, PIPE_SPOOLSS, "Set REG_SZ printer data", "" }, - { "rffpcnex", cmd_spoolss_rffpcnex, PIPE_SPOOLSS, "Rffpcnex test", "" }, + { "adddriver", cmd_spoolss_addprinterdriver, PI_SPOOLSS, "Add a print driver", "" }, + { "addprinter", cmd_spoolss_addprinterex, PI_SPOOLSS, "Add a printer", "" }, + { "deldriver", cmd_spoolss_deletedriver, PI_SPOOLSS, "Delete a printer driver", "" }, + { "enumdata", cmd_spoolss_not_implemented, PI_SPOOLSS, "Enumerate printer data (*)", "" }, + { "enumjobs", cmd_spoolss_enum_jobs, PI_SPOOLSS, "Enumerate print jobs", "" }, + { "enumports", cmd_spoolss_enum_ports, PI_SPOOLSS, "Enumerate printer ports", "" }, + { "enumdrivers", cmd_spoolss_enum_drivers, PI_SPOOLSS, "Enumerate installed printer drivers", "" }, + { "enumprinters", cmd_spoolss_enum_printers, PI_SPOOLSS, "Enumerate printers", "" }, + { "getdata", cmd_spoolss_not_implemented, PI_SPOOLSS, "Get print driver data (*)", "" }, + { "getdriver", cmd_spoolss_getdriver, PI_SPOOLSS, "Get print driver information", "" }, + { "getdriverdir", cmd_spoolss_getdriverdir, PI_SPOOLSS, "Get print driver upload directory", "" }, + { "getprinter", cmd_spoolss_getprinter, PI_SPOOLSS, "Get printer info", "" }, + { "getprintprocdir", cmd_spoolss_getprintprocdir, PI_SPOOLSS, "Get print processor directory", "" }, + { "openprinter", cmd_spoolss_open_printer_ex, PI_SPOOLSS, "Open printer handle", "" }, + { "setdriver", cmd_spoolss_setdriver, PI_SPOOLSS, "Set printer driver", "" }, + { "getprintprocdir", cmd_spoolss_getprintprocdir, PI_SPOOLSS, "Get print processor directory", "" }, + { "addform", cmd_spoolss_addform, PI_SPOOLSS, "Add form", "" }, + { "setform", cmd_spoolss_setform, PI_SPOOLSS, "Set form", "" }, + { "getform", cmd_spoolss_getform, PI_SPOOLSS, "Get form", "" }, + { "deleteform", cmd_spoolss_deleteform, PI_SPOOLSS, "Delete form", "" }, + { "enumforms", cmd_spoolss_enum_forms, PI_SPOOLSS, "Enumerate forms", "" }, + { "setprinter", cmd_spoolss_setprinter, PI_SPOOLSS, "Set printer comment", "" }, + { "setprinterdata", cmd_spoolss_setprinterdata, PI_SPOOLSS, "Set REG_SZ printer data", "" }, + { "rffpcnex", cmd_spoolss_rffpcnex, PI_SPOOLSS, "Rffpcnex test", "" }, { NULL } }; diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c index 8d416f8db0..282cbb3b99 100644 --- a/source3/rpcclient/cmd_srvsvc.c +++ b/source3/rpcclient/cmd_srvsvc.c @@ -353,10 +353,10 @@ struct cmd_set srvsvc_commands[] = { { "SRVSVC" }, - { "srvinfo", cmd_srvsvc_srv_query_info, PIPE_SRVSVC, "Server query info", "" }, - { "netshareenum", cmd_srvsvc_net_share_enum, PIPE_SRVSVC, "Enumerate shares", "" }, - { "netfileenum", cmd_srvsvc_net_file_enum, PIPE_SRVSVC, "Enumerate open files", "" }, - { "netremotetod", cmd_srvsvc_net_remote_tod, PIPE_SRVSVC, "Fetch remote time of day", "" }, + { "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", "" }, { NULL } }; diff --git a/source3/rpcclient/cmd_wkssvc.c b/source3/rpcclient/cmd_wkssvc.c index 79acf35943..bb118234c0 100644 --- a/source3/rpcclient/cmd_wkssvc.c +++ b/source3/rpcclient/cmd_wkssvc.c @@ -57,7 +57,7 @@ void cmd_wks_query_info(struct client_info *info) DEBUG(5, ("cmd_wks_query_info: smb_cli->fd:%d\n", smb_cli->fd)); /* open LSARPC session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_WKSSVC) : False; + res = res ? cli_nt_session_open(smb_cli, PI_WKSSVC) : False; /* send info level: receive requested info. hopefully. */ res = res ? do_wks_query_info(smb_cli, diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 880fdc599a..9c6cd3794b 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -204,7 +204,7 @@ static void fetch_machine_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; } @@ -377,18 +377,18 @@ static struct cmd_set rpcclient_commands[] = { { "GENERAL OPTIONS" }, - { "help", cmd_help, NULL, "Get help on commands", "[command]" }, - { "?", cmd_help, NULL, "Get help on commands", "[command]" }, - { "debuglevel", cmd_debuglevel, NULL, "Set debug level", "level" }, - { "list", cmd_listcommands, NULL, "List available commands on <pipe>", "pipe" }, - { "exit", cmd_quit, NULL, "Exit program", "" }, - { "quit", cmd_quit, NULL, "Exit program", "" }, + { "help", cmd_help, -1, "Get help on commands", "[command]" }, + { "?", cmd_help, -1, "Get help on commands", "[command]" }, + { "debuglevel", cmd_debuglevel, -1, "Set debug level", "level" }, + { "list", cmd_listcommands, -1, "List available commands on <pipe>", "pipe" }, + { "exit", cmd_quit, -1, "Exit program", "" }, + { "quit", cmd_quit, -1, "Exit program", "" }, { NULL } }; static struct cmd_set separator_command[] = { - { "---------------", NULL, NULL, "----------------------" }, + { "---------------", NULL, -1, "----------------------" }, { NULL } }; @@ -483,10 +483,9 @@ static NTSTATUS do_cmd(struct cli_state *cli, struct cmd_set *cmd_entry, /* Open pipe */ - if (cmd_entry->pipe) - if (!cli_nt_session_open(cli, cmd_entry->pipe)) { - DEBUG(0, ("Could not initialise %s\n", - cmd_entry->pipe)); + if (cmd_entry->pipe_idx != -1) + if (!cli_nt_session_open(cli, cmd_entry->pipe_idx)) { + DEBUG(0, ("Could not initialise pipe\n")); goto done; } @@ -496,7 +495,7 @@ static NTSTATUS do_cmd(struct cli_state *cli, struct cmd_set *cmd_entry, /* Cleanup */ - if (cmd_entry->pipe) + if (cmd_entry->pipe_idx != -1) cli_nt_session_close(cli); talloc_destroy(mem_ctx); diff --git a/source3/rpcclient/rpcclient.h b/source3/rpcclient/rpcclient.h index 72491373d6..ae5b5f3c4f 100644 --- a/source3/rpcclient/rpcclient.h +++ b/source3/rpcclient/rpcclient.h @@ -26,7 +26,7 @@ struct cmd_set { char *name; NTSTATUS (*fn)(struct cli_state*, TALLOC_CTX *mem_ctx, int argc, char **argv); - char *pipe; + int pipe_idx; char *description; char *usage; }; diff --git a/source3/rpcclient/samsync.c b/source3/rpcclient/samsync.c index 7124f9416a..fb07123b77 100644 --- a/source3/rpcclient/samsync.c +++ b/source3/rpcclient/samsync.c @@ -378,7 +378,7 @@ static NTSTATUS sam_sync(struct cli_state *cli, unsigned char trust_passwd[16], return result; } - if (!cli_nt_session_open (cli, PIPE_NETLOGON)) { + if (!cli_nt_session_open (cli, PI_NETLOGON)) { DEBUG(0, ("Could not initialize netlogon pipe!\n")); goto done; } |