The Samba-Bugzilla – Attachment 10702 Details for
Bug 11085
Fix and enhance rpcclient output
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for rpcclient binary
0001-rpcclient-Fix-and-enhance-rpcclient-output.patch (text/plain), 2.12 KB, created by
Robin Hack
on 2015-01-30 12:31:04 UTC
(
hide
)
Description:
Patch for rpcclient binary
Filename:
MIME Type:
Creator:
Robin Hack
Created:
2015-01-30 12:31:04 UTC
Size:
2.12 KB
patch
obsolete
>From 53afdaea2b70c77dc1a15fd571a74247476eb4d1 Mon Sep 17 00:00:00 2001 >From: Robin Hack <hack.robin@gmail.com> >Date: Fri, 30 Jan 2015 13:18:20 +0100 >Subject: [PATCH] rpcclient: Fix and enhance rpcclient output > >When rpcclient is called like: >$ rpcclient -c "getdata . Osversion" >at end of output is added one nonsense line >OsVersion: Osversion: > >This patch removes this line and adds more human friendly ouput: >OsMajor: num >OsMinor: num >OsBuild: num > >for OsVersion query. > >For OsVersionEx two more lines are added: >OsMajor: num >OsMinor: num >OsBuild: num >ServicePackMajor: num >ServicePackMinor: num > >Signed-off-by: Robin Hack <hack.robin@gmail.com> >Signed-off-by: Robin Hack <rhack@redhat.com> >--- > source3/rpcclient/cmd_spoolss.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c >index c2b1e3d..e2b9fc4 100644 >--- a/source3/rpcclient/cmd_spoolss.c >+++ b/source3/rpcclient/cmd_spoolss.c >@@ -863,13 +863,17 @@ static void display_printer_data(const char *v, > } > TALLOC_FREE(hex); > putchar('\n'); >+ putchar('\n'); > > if (strequal(v, "OsVersion")) { > struct spoolss_OSVersion os; > ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &os, > (ndr_pull_flags_fn_t)ndr_pull_spoolss_OSVersion); > if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { >- printf("%s: OsVersion:\n", v); >+ // add output here; >+ printf("OsMajor: %u\n", os.major); >+ printf("OsMinor: %u\n", os.minor); >+ printf("OsBuild: %u\n", os.build); > NDR_PRINT_DEBUG(spoolss_OSVersion, &os); > } > } >@@ -878,7 +882,11 @@ static void display_printer_data(const char *v, > ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &os, > (ndr_pull_flags_fn_t)ndr_pull_spoolss_OSVersionEx); > if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { >- printf("%s: OsVersionEx:\n", v); >+ printf("OsMajor: %u\n", os.major); >+ printf("OsMinor: %u\n", os.minor); >+ printf("OsBuild: %u\n", os.build); >+ printf("ServicePackMajor: %u\n", os.service_pack_major); >+ printf("ServicePackMinor: %u\n", os.service_pack_minor); > NDR_PRINT_DEBUG(spoolss_OSVersionEx, &os); > } > } >-- >1.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
asn
:
review+
ddiss
:
review+
gd
:
review+
Actions:
View
Attachments on
bug 11085
: 10702