The Samba-Bugzilla – Attachment 415 Details for
Bug 1112
access-value is missing in modul printerdata.py
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Also fix printerdata_ex object
printerdata.py.patch (text/plain), 1.79 KB, created by
Tim Potter
on 2004-02-20 14:04:34 UTC
(
hide
)
Description:
Also fix printerdata_ex object
Filename:
MIME Type:
Creator:
Tim Potter
Created:
2004-02-20 14:04:34 UTC
Size:
1.79 KB
patch
obsolete
>diff -u -r1.3 printerdata.py >--- python/samba/printerdata.py 19 Sep 2002 00:14:01 -0000 1.3 >+++ python/samba/printerdata.py 20 Feb 2004 22:02:46 -0000 >@@ -15,8 +15,10 @@ > from samba import spoolss > > class printerdata: >- def __init__(self, host, creds = {}): >- self.hnd = spoolss.openprinter(host, creds = creds) >+ def __init__(self, host, creds = {}, access = 0x02000000): >+ # For read access, use MAXIMUM_ALLOWED_ACCESS = 0x02000000 >+ # For write access, use PRINTER_ACCESS_ADMINISTER = 0x00000004 >+ self.hnd = spoolss.openprinter(host, creds = creds, access = access) > > def keys(self): > return self.hnd.enumprinterdata().keys() >@@ -30,10 +32,14 @@ > "data": value}) > > class printerdata_ex: >- def __init__(self, host): >+ def __init__(self, host, creds = {}, access = 0x02000000): >+ # For read access, use MAXIMUM_ALLOWED_ACCESS = 0x02000000 >+ # For write access, use PRINTER_ACCESS_ADMINISTER = 0x00000004 > self.host = host > self.top_level_keys = ["PrinterDriverData", "DsSpooler", "DsDriver", > "DsUser"] >+ self.creds = creds >+ self.access = access > > def keys(self): > return self.top_level_keys >@@ -45,8 +51,8 @@ > return 0 > > class printerdata_ex_subkey: >- def __init__(self, host, key): >- self.hnd = spoolss.openprinter(host) >+ def __init__(self, host, key, creds, access): >+ self.hnd = spoolss.openprinter(host, creds, access) > self.key = key > > def keys(self): >@@ -56,4 +62,4 @@ > return self.hnd.getprinterdataex(self.key, key)['data'] > > def __getitem__(self, key): >- return self.printerdata_ex_subkey(self.host, key) >+ return self.printerdata_ex_subkey(self.host, key, creds, access)
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
Actions:
View
Attachments on
bug 1112
:
414
| 415