The Samba-Bugzilla – Bug 2980
FormAdd function of prnadmin.dll not working
Last modified: 2005-09-27 09:02:18 UTC
I tried adding a form using vbscript from a windows2003 server onto a samba
server. However, I am getting Access denied error messages.
But I am able to add forms from the same server using the server properties GUI
I am attaching the script file and samba logs
Created attachment 1366 [details]
The samba log file
Created attachment 1367 [details]
The vb script file
This isn't a full level 10 debug log. But if I were to guess, the
access_denied is due to the fact that the requested access
is 0x00000000 in the OpenPrinter() call. My experience in the
past had made me assume this meant READ access, but perhaps
it means the same as SEC_RIGHT_MAXIMUM_ALLOWED (0x02000000).
Created attachment 1393 [details]
The log file for the failed addform function
This is the log when creating a form using addform command failed
Created attachment 1394 [details]
The log file for sucessfully adding form using APW
I am also enclosing the logs collected when a similar form was sucessfully
added using server properties wizard. It looks like policy handle granted when
addform is executed from a script was denied access. The NT user SID is same in
both the cases. However, I was unable to find the reasons. Please let me know
if I am doing something wrong.
It's a combination of a bug in our code and a bug
in your code. You should be able to add forms on
a server if you open the server handlek with admin access.
I'll fix that now.
actually I just double checked and teh code in srv_spoolss_nt.c
is correct. I just didn't remember. So it's just a bug in the
access you request in your code.