summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-11 12:17:27 +0100
committerGünther Deschner <gd@samba.org>2008-02-11 19:16:05 +0100
commit7b502954002dd9b4aa413dbf334aa25d5865656e (patch)
treec9dc36c73f7673f2d46407e6807496d98b7f2f64 /source3/rpcclient
parent419ab84b0188b81025d66637415047cc87986792 (diff)
downloadsamba-7b502954002dd9b4aa413dbf334aa25d5865656e.tar.gz
samba-7b502954002dd9b4aa413dbf334aa25d5865656e.tar.bz2
samba-7b502954002dd9b4aa413dbf334aa25d5865656e.zip
Use rpccli_lsa_LookupPrivDisplayName() in net and rpcclient.
Guenther (This used to be commit be932cbdfa51eefafe79a81fa393ffea1fa4e25e)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_lsarpc.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index a49dc38ad9..075ba6e118 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -22,6 +22,10 @@
#include "includes.h"
#include "rpcclient.h"
+static void init_lsa_String(struct lsa_String *name, const char *s)
+{
+ name->string = s;
+}
/* useful function to allow entering a name instead of a SID and
* looking it up automatically */
@@ -501,7 +505,8 @@ static NTSTATUS cmd_lsa_get_dispname(struct rpc_pipe_client *cli,
uint16 lang_id=0;
uint16 lang_id_sys=0;
uint16 lang_id_desc;
- fstring description;
+ struct lsa_String lsa_name;
+ struct lsa_StringLarge *description = NULL;
if (argc != 2) {
printf("Usage: %s privilege name\n", argv[0]);
@@ -515,13 +520,21 @@ static NTSTATUS cmd_lsa_get_dispname(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- result = rpccli_lsa_get_dispname(cli, mem_ctx, &pol, argv[1], lang_id, lang_id_sys, description, &lang_id_desc);
+ init_lsa_String(&lsa_name, argv[1]);
+
+ result = rpccli_lsa_LookupPrivDisplayName(cli, mem_ctx,
+ &pol,
+ &lsa_name,
+ lang_id,
+ lang_id_sys,
+ &description,
+ &lang_id_desc);
if (!NT_STATUS_IS_OK(result))
goto done;
/* Print results */
- printf("%s -> %s (language: 0x%x)\n", argv[1], description, lang_id_desc);
+ printf("%s -> %s (language: 0x%x)\n", argv[1], description->string, lang_id_desc);
rpccli_lsa_Close(cli, mem_ctx, &pol);
done:
@@ -983,11 +996,6 @@ static NTSTATUS cmd_lsa_query_trustdominfobysid(struct rpc_pipe_client *cli,
return result;
}
-static void init_lsa_String(struct lsa_String *name, const char *s)
-{
- name->string = s;
-}
-
static NTSTATUS cmd_lsa_query_trustdominfobyname(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx, int argc,
const char **argv)