git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a23ff4c
)
s3-spoolss: fix winreg_printer_ver_to_qword
author
Günther Deschner
<gd@samba.org>
Mon, 12 Sep 2016 15:55:37 +0000
(17:55 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Thu, 13 Oct 2016 14:55:39 +0000
(16:55 +0200)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12285
We were reporting the OS minor number as the driver version number in all
GetDriver/EnumDriver calls.
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
a9a1a16cc8b87a84cdfa049ebd26bf4eac1b3618
)
source3/rpc_client/cli_winreg_spoolss.c
patch
|
blob
|
history
diff --git
a/source3/rpc_client/cli_winreg_spoolss.c
b/source3/rpc_client/cli_winreg_spoolss.c
index ac4fe864df439b3aaffef775fb9b414da3f149a1..68ac05381b5126dd4b488bca0a6fca2f94ff732a 100644
(file)
--- a/
source3/rpc_client/cli_winreg_spoolss.c
+++ b/
source3/rpc_client/cli_winreg_spoolss.c
@@
-529,8
+529,9
@@
static WERROR winreg_printer_write_ver(TALLOC_CTX *mem_ctx,
NTSTATUS status;
char *str;
- /* FIXME: check format is right,
- * this needs to be something like: 6.1.7600.16385 */
+ /*
+ * this needs to be something like: 6.1.7600.16385
+ */
str = talloc_asprintf(mem_ctx, "%u.%u.%u.%u",
(unsigned)((data >> 48) & 0xFFFF),
(unsigned)((data >> 32) & 0xFFFF),
@@
-574,7
+575,7
@@
static WERROR winreg_printer_ver_to_dword(const char *str, uint64_t *data)
*data = ((uint64_t)(v1 & 0xFFFF) << 48) +
((uint64_t)(v2 & 0xFFFF) << 32) +
((uint64_t)(v3 & 0xFFFF) << 16) +
- (uint64_t)(v
2
& 0xFFFF);
+ (uint64_t)(v
4
& 0xFFFF);
return WERR_OK;
}