[Samba] Questions about some Ethereal/log output and spoolss

Ken Jorissen Ken.Jorissen at stellent.com
Sun Dec 7 21:07:28 GMT 2003


My user observable errors seem to now be gone but I am seeing some behavior that may need to be looked at. There are error messages in Ethereal and in the logs like "_spoolss_getprinterdataex: Invalid keyname [DsDriver]". First I'll give the brief history and then more details below.


I started a new install on FreeBSD 5.1 using samba 2.2.8. I compiled with CUPS (1.1.19). Printer is HP PhotoSmart 7550 with executable style installer so the driver was installed manually through rpcclient. I worried about the "printer data" since the docs only said that rpcclient may set it. I tried to set the device mode by connecting as root from a client and calling up the properties dialog. However, I got a protection fault from both Win2k and XPPro boxes. I then proceeded trying newer versions of Samba and got to 3.0.1.rc1. Then I tried "default devmode = yes" and was finnaly able to set the device mode. After that I got a few page faults when bringing up the properties dialog but now can't reproduce the error. But I still see some odd things in Ethereal and the logs...


Shortened Ethereal output:
----
GetPrinterDataEx request, DsDriver/printStaplingSupported
GetPrinterDataEx reply, DsDriver/printStaplingSupported, File not found (pathname error)
GetPrinterDataEx request, DsDriver/printPagesPerMinute
GetPrinterDataEx reply, DsDriver/printPagesPerMinute, File not found (pathname error)
GetPrinterDataEx request, DsDriver/printMaxResolutionSupported
GetPrinterDataEx reply, DsDriver/printMaxResolutionSupported, File not found (pathname error)
GetPrinterDataEx request, DsDriver/printMediaReady
GetPrinterDataEx reply, DsDriver/printMediaReady, File not found (pathname error)
GetPrinterDataEx request, DsDriver/printColor
GetPrinterDataEx reply, DsDriver/printColor, File not found (pathname error)
GetPrinterDataEx request, DsDriver/printDuplexSupported
GetPrinterDataEx reply, DsDriver/printDuplexSupported, File not found (pathname error)
GetPrinterDataEx request, DsDriver/printStaplingSupported
GetPrinterDataEx reply, DsDriver/printStaplingSupported, File not found (pathname error)
GetPrinterDataEx request, DsDriver/printPagesPerMinute
GetPrinterDataEx reply, DsDriver/printPagesPerMinute, File not found (pathname error)
GetPrinterDataEx request, DsDriver/printMaxResolutionSupported
GetPrinterDataEx reply, DsDriver/printMaxResolutionSupported, File not found (pathname error)
GetPrinterDataEx request, DsDriver/printMediaReady
GetPrinterDataEx reply, DsDriver/printMediaReady, File not found (pathname error)
----

Here is the log from one of the above exchanges:
----
[2003/12/07 12:00:52, 4] rpc_server/srv_pipe.c:api_rpcTNP(1502)
  api_rpcTNP: spoolss op 0x4e - api_rpcTNP: rpc command: SPOOLSS_GETPRINTERDATAE
X
[2003/12/07 12:00:52, 6] rpc_server/srv_pipe.c:api_rpcTNP(1528)
  api_rpc_cmds[42].fn == 0x810ea90
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_debug(82)
  000000 spoolss_io_q_getprinterdataex
[2003/12/07 12:00:52, 6] rpc_parse/parse_prs.c:prs_debug(82)
      000000 smb_io_pol_hnd printer handle
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint32(635)
          0000 data1: 00000000
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint32(635)
          0004 data2: 00000053
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint16(606)
          0008 data3: 0000
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint16(606)
          000a data4: 0000
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint8s(722)
          000c data5: d2 6a d3 3f c6 7a 01 00
[2003/12/07 12:00:52, 6] rpc_parse/parse_prs.c:prs_debug(82)
      000014 smb_io_unistr2 keyname
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint32(635)
          0014 uni_max_len: 00000009
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint32(635)
          0018 offset     : 00000000
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint32(635)
          001c uni_str_len: 00000009
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:dbg_rw_punival(807)
          0020 buffer     : D.s.D.r.i.v.e.r...
[2003/12/07 12:00:52, 6] rpc_parse/parse_prs.c:prs_debug(82)
      000034 smb_io_unistr2 valuename
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint32(635)
          0034 uni_max_len: 0000001c
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint32(635)
          0038 offset     : 00000000
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint32(635)
          003c uni_str_len: 0000001c
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:dbg_rw_punival(807)
          0040 buffer     : p.r.i.n.t.M.a.x.R.e.s.o.l.u.t.i.o.n.S.u.p.p.o.r.t.e.
d...
[2003/12/07 12:00:52, 5] rpc_parse/parse_prs.c:prs_uint32(635)
      0078 size: 00000004
[2003/12/07 12:00:52, 4] rpc_server/srv_lsa_hnd.c:find_policy_by_hnd_internal(16
2)
  Found policy hnd[0] [000] 00 00 00 00 53 00 00 00  00 00 00 00 D2 6A D3 3F  ..
..S... .....j.?
  [010] C6 7A 01 00                                       .z..
[2003/12/07 12:00:52, 4] rpc_server/srv_spoolss_nt.c:_spoolss_getprinterdataex(8
676)
  _spoolss_getprinterdataex
[2003/12/07 12:00:52, 10] rpc_server/srv_spoolss_nt.c:_spoolss_getprinterdataex(
8682)
  _spoolss_getprinterdataex: key => [DsDriver], value => [printMaxResolutionSupp
orted]
[2003/12/07 12:00:52, 4] rpc_server/srv_lsa_hnd.c:find_policy_by_hnd_internal(16
2)
  Found policy hnd[0] [000] 00 00 00 00 53 00 00 00  00 00 00 00 D2 6A D3 3F  ..
..S... .....j.?
  [010] C6 7A 01 00                                       .z..
[2003/12/07 12:00:52, 4] rpc_server/srv_spoolss_nt.c:get_printer_snum(430)
  short name:photosmart7550
[2003/12/07 12:00:52, 10] printing/nt_printing.c:get_a_printer(3930)
  get_a_printer: [photosmart7550] level 2
[2003/12/07 12:00:52, 10] printing/nt_printing.c:add_new_printer_key(2365)
  add_new_printer_key: Inserted new data key [PrinterDriverData]
[2003/12/07 12:00:52, 10] printing/nt_printing.c:add_new_printer_key(2365)
  add_new_printer_key: Inserted new data key [DsSpooler]
[2003/12/07 12:00:52, 10] printing/nt_printing.c:get_a_printer(3957)
  get_a_printer: using cached copy of printer_info_2
[2003/12/07 12:00:52, 10] printing/nt_printing.c:get_a_printer(4005)
  get_a_printer: [photosmart7550] level 2 returning WERR_OK
[2003/12/07 12:00:52, 4] rpc_server/srv_spoolss_nt.c:_spoolss_getprinterdataex(8
718)
  _spoolss_getprinterdataex: Invalid keyname [DsDriver]
----
The above is one section of 12 that are very similar.

Just in case someone asks, here is smb.conf (yes, it's insecure)...
smb.conf:
----
[global]
log level = 10
map to guest = bad user
workgroup = ISI
server string = Nugget Samba Server
hosts allow = 192.168.1. 127.
load printers = yes
printing = cups
;  guest account = pcguest
log file = /var/log/log.%m
max log size = 50
security = user
encrypt passwords = yes
socket options = TCP_NODELAY
domain master = yes
preferred master = yes
wins support = yes
dns proxy = no

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writeable = no
printable = yes
default devmode = yes

[print$]
comment = Printer Drivers
path = /usr/local/share/samba/drivers
browseable = no
guest ok = yes
read only = yes
write list = root

[public]
path = /u01
public = yes
only guest = yes
writeable = yes
printable = no
----

Since no one else has asked about this and I don't see info on it anywhere leads me to believe that something is odd here. Thoughts?

Also, if anyone has more details on the "printer data" it would be wonderful. Are there two groupings of data set by the properties dialog and one covers printer data and the other covers the device mode? The current model that I have of this doesn't explain some of the odd iterations that I had while trying to get this to work. For a while I had an XP Pro client connected to print$ as root and it could access the properties dialog while a Windows 2000 box also connected as root couldn't. I didn't capture logs of that unfortunately. But I am wondering if the XP client was more tolerant of missing "printer data" and if I eventually set it. 

Thanks,
Ken


More information about the samba mailing list