diff options
author | Günther Deschner <gd@samba.org> | 2016-09-12 17:55:37 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2016-10-13 20:12:54 +0200 |
commit | 2014c088d32daf5efe93fd9843c7a395907b4499 (patch) | |
tree | e22aad0e9f46a583dd0b7de657bd8ff972651fd9 | |
parent | e0c9067b4a46147057ec3454bb4d0a9e27bc854e (diff) | |
download | samba-2014c088d32daf5efe93fd9843c7a395907b4499.tar.gz |
s3-spoolss: fix winreg_printer_ver_to_qword
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)
Autobuild-User(v4-3-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-3-test): Thu Oct 13 20:12:54 CEST 2016 on sn-devel-104
-rw-r--r-- | source3/rpc_client/cli_winreg_spoolss.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/rpc_client/cli_winreg_spoolss.c b/source3/rpc_client/cli_winreg_spoolss.c index ac4fe864df4..68ac05381b5 100644 --- 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)(v2 & 0xFFFF); + (uint64_t)(v4 & 0xFFFF); return WERR_OK; } |