Don't check NT permissions when printing from lanman.
authorTim Potter <tpot@samba.org>
Thu, 6 Jul 2000 07:10:32 +0000 (07:10 +0000)
committerTim Potter <tpot@samba.org>
Thu, 6 Jul 2000 07:10:32 +0000 (07:10 +0000)
(This used to be commit e84607eedf3be454f8f709c70cafc5ded4ea951d)

source3/printing/nt_printing.c
source3/smbd/lanman.c

index 3a6ab9256bd297815504ba314f6da403c592686a..e666c1d6a72947aac22c6c7821e14f277e9848d8 100644 (file)
@@ -1678,6 +1678,14 @@ BOOL print_access_check(struct current_user *user, int snum,
        BOOL result;
        char *pname;
        int i;
        BOOL result;
        char *pname;
        int i;
+       
+       /* If the user is NULL then we are being called by the lanman
+          printing system.  Let the lower level printing permissions
+          handle this. */
+
+       if (user == NULL) {
+               return True;
+       }
 
        /* Get printer name */
 
 
        /* Get printer name */
 
index bf635b88b108455acc0cc2960c80f93674f56daf..82f0c25fa8629ff8e42e2bfddaa98e66827e9c7f 100644 (file)
@@ -1773,13 +1773,13 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param
        
        switch (function) {
        case 81:                /* delete */ 
        
        switch (function) {
        case 81:                /* delete */ 
-               if (print_job_delete(jobid, vuid)) errcode = NERR_Success;
+               if (print_job_delete(NULL, jobid)) errcode = NERR_Success;
                break;
        case 82:                /* pause */
                break;
        case 82:                /* pause */
-               if (print_job_pause(jobid, vuid)) errcode = NERR_Success;
+               if (print_job_pause(NULL, jobid)) errcode = NERR_Success;
                break;
        case 83:                /* resume */
                break;
        case 83:                /* resume */
-               if (print_job_resume(jobid, vuid)) errcode = NERR_Success;
+               if (print_job_resume(NULL, jobid)) errcode = NERR_Success;
                break;
        }
        
                break;
        }
        
@@ -1822,13 +1822,13 @@ static BOOL api_WPrintQueuePurge(connection_struct *conn,uint16 vuid, char *para
 
        switch (function) {
        case 74: /* Pause queue */
 
        switch (function) {
        case 74: /* Pause queue */
-               if (print_queue_pause(snum, vuid)) errcode = NERR_Success;
+               if (print_queue_pause(NULL, snum)) errcode = NERR_Success;
                break;
        case 75: /* Resume queue */
                break;
        case 75: /* Resume queue */
-               if (print_queue_resume(snum, vuid)) errcode = NERR_Success;
+               if (print_queue_resume(NULL, snum)) errcode = NERR_Success;
                break;
        case 103: /* Purge */
                break;
        case 103: /* Purge */
-               if (print_queue_purge(snum, vuid)) errcode = NERR_Success;
+               if (print_queue_purge(NULL, snum)) errcode = NERR_Success;
                break;
        }
 
                break;
        }