Bug 6883 - Add Printer fails with 0x000006f7 on Windows 7
Summary: Add Printer fails with 0x000006f7 on Windows 7
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: Printing (show other bugs)
Version: 3.4.3
Hardware: x86 Windows 7
: P3 regression
Target Milestone: ---
Assignee: Guenther Deschner
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-10 09:08 UTC by Justin Brinegar
Modified: 2010-01-07 18:40 UTC (History)
5 users (show)

See Also:


Attachments
log level 10 of a client experiencing symptom described (959.84 KB, text/plain)
2009-11-10 09:12 UTC, Justin Brinegar
no flags Details
First part of fixing bug 6883 (13.81 KB, patch)
2009-11-23 06:13 UTC, Guenther Deschner
no flags Details
First part of fixing bug 6883 (revised version) (34.24 KB, patch)
2009-11-24 06:05 UTC, Guenther Deschner
no flags Details
3-4: final version of the patch (36.01 KB, patch)
2009-11-25 04:36 UTC, Guenther Deschner
no flags Details
3-4-test version of the patch (incl. little/bigendian fixes) (49.17 KB, patch)
2009-11-30 08:48 UTC, Guenther Deschner
metze: review+
Details
remaining patch from master (37.14 KB, patch)
2009-12-09 05:14 UTC, Guenther Deschner
no flags Details
remaing patch for master (after much more testing) (69.19 KB, patch)
2009-12-11 08:08 UTC, Guenther Deschner
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Brinegar 2009-11-10 09:08:22 UTC
I'm migrating from Samba 3.0.24 to 3.4.3 to add support for Windows 7 on my print server.  I've kept the smb.conf essentially the same, changing only the directives corresponding to Kerberos authentication as changed in the 3.4 series.  Please see http://pastebin.com/m9c0409  Note that the LPRng backend isn't installed on this server, and Kerberos is working as expected...I am only testing samba's printing abilities.  I am using drivers from Windows 7 (as suggested by HP), and they uploaded to the server fine.  I am using "HP LaserJet 4250 PCL 5", though the error also occurs with the PCL 6 driver.

When I go to add a printer in Windows 7 (after configuring appropriate drivers, permissions, etc), I get an error: "Windows cannot connect to the printer.  Operation failed with error 0x000006f7" 

This error occurs for Windows 7 machines that are in my domain, and for Windows 7 machines that are not in my domain.  It doesn't seem to make a difference if UAC and the firewall are on or off.

To reproduce, navigate to the server, then try to add a printer (right click, connect).  The error occurs near the end of the process.

The operation succeeds when I try the same procedure on Windows XP.

The following is written to the Security event log (Event ID 6281):

"Code Integrity determined that the page hashes of an image file are not valid. The file could be improperly signed without page hashes or corrupt due to unauthorized modification. The invalid hashes could indicate a potential disk device error.

File Name:	\Device\HarddiskVolume2\Windows\System32\l3codeca.acm	"
Comment 1 Justin Brinegar 2009-11-10 09:12:40 UTC
Created attachment 4938 [details]
log level 10 of a client experiencing symptom described
Comment 2 Pontus Fuchs (dead mail) 2009-11-11 04:58:34 UTC
I did a similar update, 3.0.28 -> 3.4.3, and have the same problem. I also see the problem in Windows Vista clients.

If I remove the printer driver from the server I can install the printer using a locally driver.

I don't see Error 6281 in the Security event log.
Comment 3 PJ Waskiewicz 2009-11-19 00:23:15 UTC
I am also running into the same issue here.  This is really problematic, since I've not found any workarounds in either Win7 or Samba.  My configuration is:

Client: Win7 Ultimate 64-bit
Server: Fedora 11 64-bit, samba 3.4.3.

Same server configuration works fine with WinXP.

Any updates or suggestions on how to get around this would be awesome.
Comment 4 Guenther Deschner 2009-11-19 03:27:16 UTC
I am actively looking into this and I think I found the issue. Hopefully a patch is available soon. Stay tuned - and thanks for the patience.
Comment 5 PJ Waskiewicz 2009-11-19 03:33:12 UTC
That's great news.  I'd be happy to try and test any patch if you need additional user-base testing.
Comment 6 Guenther Deschner 2009-11-23 06:13:51 UTC
Created attachment 4980 [details]
First part of fixing bug 6883

This should fix sambas spoolss_EnumPrinterKey implementation which generated an incorrect list of printer keys.
Comment 7 Guenther Deschner 2009-11-24 06:05:47 UTC
Created attachment 4992 [details]
First part of fixing bug 6883 (revised version)
Comment 8 Guenther Deschner 2009-11-25 04:36:07 UTC
Created attachment 5003 [details]
3-4: final version of the patch

Ok, Metze, I merged the other bits to that patch. Ok now ?
Comment 9 Brian May 2009-11-26 16:33:28 UTC
Hello,

What version of Samba do I need to test this patch? I note that it doesn't seem to apply cleanly to Samba 3.4.3 in Debian :-(

Also, is this patch likely to have any implications for Windows XP? I am having some weird issues under XP now, I don't know what triggered it, and am wondering if this patch is likely to help, or if it is Windows 7 specific.

Thanks
Comment 10 Mikhail Zuskov (dead mail address) 2009-11-28 19:04:54 UTC
i've applied this patch on 3.4.3 running on Solaris 10 |(sparc)
The 0x000006f7 error is gone, but now i'm getting 0x00000002 error on 32-bit Vista en Win7 clients. On 64-bit clients - it is 0x0000000d error.
WinXP client can load the drivers without any problems.
All clients are freshly installed with latest service pack and patch level.
Tested with Oce Native Family PS v.4.4 and HP universal print driver for Windows PS v.5.0
It is also not possible to upload the drivers from Vista or Win7 clients. You can go through the procedure, but when you click on finish, close printer properties and open it again - no driver installed...
I'll upload logs in a few minutes...
Comment 11 Mikhail Zuskov (dead mail address) 2009-11-28 19:37:13 UTC
the level 10 log is to big, so i've put it in my homedir:
log level 10 of a 32-bits Vista client trying to connect to a samba printer:
http://www.few.vu.nl/~mzouskov/samba/tarakan-vista.d10.connect_to_printer.log

Adding printer drivers from 32-bit Vista client did went well. If i connect from XP client, it gets the drivers. If i connect from Vista client - error 0x00000002...
Comment 12 Guenther Deschner 2009-11-30 07:35:52 UTC
Ok, this is an endianness problem that we have addressed in master but not yet in the v3-4-test patch. Fixed patch coming soon.
Comment 13 Guenther Deschner 2009-11-30 08:48:05 UTC
Created attachment 5026 [details]
3-4-test version of the patch (incl. little/bigendian fixes)
Comment 14 Stefan Metzmacher 2009-11-30 08:52:12 UTC
Comment on attachment 5026 [details]
3-4-test version of the patch (incl. little/bigendian fixes)

looks good
Comment 15 Guenther Deschner 2009-11-30 08:54:35 UTC
Karolin, please push to v3-4-test. (this is v3-4-test only).

Unfortunately this only the first step on resolving this bug, so please leave it open.
Comment 16 Karolin Seeger 2009-11-30 09:11:01 UTC
(In reply to comment #15)
> Karolin, please push to v3-4-test. (this is v3-4-test only).
> 
> Unfortunately this only the first step on resolving this bug, so please leave
> it open.
> 

Done.
Comment 17 Mikhail Zuskov (dead mail address) 2009-12-01 04:33:46 UTC
applied the latest patch o the clean samba 3.4.3 tree...
the new patch doesn't seem to work either. the same 0x00000002 pops up error under Vista. WinXP client gets the drivers.
d10 log file: http://www.few.vu.nl/~mzouskov/samba/tarakan-vista.d10.1_dec.log

One other observation:
sins we've enabled 3.4.2 on our file servers(all Solaris 10 sparc) users complaining about bad performance, e.g. windows profiles (located in homedirs) being loaded too long etc. perhaps this should be reported as a separated bug.
After applying the latest patch on the test server, the test server seems to be noticeably slower than for example running 3.3.4 or 3.3.9.
Comment 18 Guenther Deschner 2009-12-09 05:14:59 UTC
Created attachment 5068 [details]
remaining patch from master

This should resolve the enum_printer_key issues.
Comment 19 Guenther Deschner 2009-12-09 05:16:48 UTC
this is a blocker.
Comment 20 Guenther Deschner 2009-12-11 08:08:57 UTC
Created attachment 5082 [details]
remaing patch for master (after much more testing)
Comment 21 Stefan Metzmacher 2009-12-14 03:31:39 UTC
Comment on attachment 5082 [details]
remaing patch for master (after much more testing)

looks good
Comment 22 Guenther Deschner 2009-12-14 03:42:31 UTC
Karolin, please add the last patch to v3-4-test.
Comment 23 Karolin Seeger 2009-12-14 03:56:10 UTC
(In reply to comment #22)
> Karolin, please add the last patch to v3-4-test.
> 

Done.
Comment 24 Mikhail Zuskov (dead mail address) 2009-12-18 09:12:19 UTC
x86 WinXP, Vista en Win7 clients seem to be able to get printer drivers from samba 3.4.3 PDC running on on Solaris 10 after applying the last patch.
Unfortunately i'm not able to even see the printer properties on x64 clients not connect to them. error 0x0000000d is all i receive...
Comment 25 Guenther Deschner 2010-01-05 16:17:48 UTC
(In reply to comment #24)
> x86 WinXP, Vista en Win7 clients seem to be able to get printer drivers from
> samba 3.4.3 PDC running on on Solaris 10 after applying the last patch.

great, so we made progress here.

> Unfortunately i'm not able to even see the printer properties on x64 clients
> not connect to them. error 0x0000000d is all i receive...

yeah, see bug #6888. 64bit clients do not work yet.
Comment 26 Jeremy Allison 2010-01-05 16:29:46 UTC
Hurrah - this is ok for 3.4.4 (IMHO) so long as we add a release note saying 64-bit clients don't currently work for AddPrinter and will be fixed for 3.5.0.
Jeremy.
Comment 27 Guenther Deschner 2010-01-07 18:40:27 UTC
Closing as fixed with 3.4.4

Please reopen if still an issue.