]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
merge from 2.2
authorGerald Carter <jerry@samba.org>
Mon, 13 Aug 2001 21:30:27 +0000 (21:30 +0000)
committerGerald Carter <jerry@samba.org>
Mon, 13 Aug 2001 21:30:27 +0000 (21:30 +0000)
source/param/loadparm.c
source/rpc_server/srv_spoolss_nt.c

index b004265261da19b814a393a970bbcf22f9bca92f..992083df72566adc04035be0e2a8d2454b3d755c 100644 (file)
@@ -380,6 +380,7 @@ typedef struct
        BOOL bBlockingLocks;
        BOOL bInheritPerms;
        BOOL bMSDfsRoot;
+       BOOL bUseClientDriver;
 
        char dummy[3];          /* for alignment */
 }
@@ -494,6 +495,7 @@ static service sDefault = {
        True,                   /* bBlockingLocks */
        False,                  /* bInheritPerms */
        False,                  /* bMSDfsRoot */
+       False,                  /* bUseClientDriver */
 
        ""                      /* dummy */
 };
@@ -839,6 +841,7 @@ static struct parm_struct parm_table[] = {
        
        {"printer name", P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, FLAG_PRINT},
        {"printer", P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, 0},
+       {"use client driver", P_BOOL, P_LOCAL, &sDefault.bUseClientDriver, NULL, NULL, FLAG_PRINT},
        {"printer driver", P_STRING, P_LOCAL, &sDefault.szPrinterDriver, NULL, NULL, FLAG_PRINT},
        {"printer driver file", P_STRING, P_LOCAL, &sDefault.szDriverFile, NULL, NULL, FLAG_PRINT},
        {"printer driver location", P_STRING, P_LOCAL, &sDefault.szPrinterDriverLocation, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL},
@@ -1671,6 +1674,7 @@ FN_LOCAL_BOOL(lp_dos_filetime_resolution, bDosFiletimeResolution)
 FN_LOCAL_BOOL(lp_fake_dir_create_times, bFakeDirCreateTimes)
 FN_LOCAL_BOOL(lp_blocking_locks, bBlockingLocks)
 FN_LOCAL_BOOL(lp_inherit_perms, bInheritPerms)
+FN_LOCAL_BOOL(lp_use_client_driver, bUseClientDriver)
 FN_LOCAL_INTEGER(lp_create_mask, iCreate_mask)
 FN_LOCAL_INTEGER(lp_force_create_mode, iCreate_force_mode)
 FN_LOCAL_INTEGER(lp_security_mask, iSecurity_mask)
index 023c9a1203a87dd74dbba8a57068c03aa6215fb6..0710f05870065f0788b4b4f7c208505682bea4f8 100644 (file)
@@ -811,6 +811,18 @@ uint32 _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u,
                if (printer_default->access_required == 0x0)
                        printer_default->access_required = PRINTER_ACCESS_USE;
 
+               /*
+                * If we are not serving the printer driver for this printer,
+                * map PRINTER_ACCESS_ADMINISTER to PRINTER_ACCESS_USE.  This
+                * will keep NT clients happy  --jerry  
+                */
+                
+               if (lp_use_client_driver(snum) 
+                       && (printer_default->access_required & PRINTER_ACCESS_ADMINISTER))
+               {
+                       printer_default->access_required = PRINTER_ACCESS_USE;
+               }
+
                if (!print_access_check(&user, snum, printer_default->access_required)) {
                        DEBUG(3, ("access DENIED for printer open\n"));
                        close_printer_handle(p, handle);