Bug 2980 - FormAdd function of prnadmin.dll not working
Summary: FormAdd function of prnadmin.dll not working
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Printing (show other bugs)
Version: 3.0.13
Hardware: All Windows 2003
: P3 normal
Target Milestone: none
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-11 08:41 UTC by Guruswamy
Modified: 2005-09-27 09:02 UTC (History)
0 users

See Also:


Attachments
The samba log file (21.92 KB, text/plain)
2005-08-11 08:42 UTC, Guruswamy
no flags Details
The vb script file (286 bytes, text/plain)
2005-08-11 08:42 UTC, Guruswamy
no flags Details
The log file for the failed addform function (49.04 KB, text/plain)
2005-08-22 00:14 UTC, Guruswamy
no flags Details
The log file for sucessfully adding form using APW (34.49 KB, text/plain)
2005-08-22 00:18 UTC, Guruswamy
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guruswamy 2005-08-11 08:41:25 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
wizard.

I am attaching the script file and samba logs
Comment 1 Guruswamy 2005-08-11 08:42:08 UTC
Created attachment 1366 [details]
The samba log file
Comment 2 Guruswamy 2005-08-11 08:42:45 UTC
Created attachment 1367 [details]
The vb script file
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-08-12 10:26:11 UTC
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).
Comment 4 Guruswamy 2005-08-22 00:14:55 UTC
Created attachment 1393 [details]
The log file for the failed addform function

This is the log when creating a form using addform command failed
Comment 5 Guruswamy 2005-08-22 00:18:48 UTC
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.
Comment 6 Gerald (Jerry) Carter (dead mail address) 2005-09-27 08:59:35 UTC
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.
Comment 7 Gerald (Jerry) Carter (dead mail address) 2005-09-27 09:02:18 UTC
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.