[SCM] Samba Shared Repository - branch master updated

Simo Sorce idra at samba.org
Tue Jul 27 08:27:50 MDT 2010


The branch, master has been updated
       via  9168713... s3-spoolss: Fixed FILL_DRIVER_STRING leading to wrong results.
       via  90c1782... s3-spoolss: Avoid segfault, check drivername is actually not NULL.
       via  6cd2f2f... s3-spoolss: Fixed a possible segfault in winreg_get_printer.
       via  bb0226f... s3-spoolss: Correctly set the default values.
       via  b95d556... s3-printing: Added automatic migration of printing tdbs.
       via  924cc43... s3-spoolss: Move the standard mappings to spoolss.
       via  c3186f2... s3-lib: Make the standard_mapping parameter const.
       via  1be4545... s3-spoolss: Remove the program global current_user_info.
       via  d8c8142... s3-spoolss: Remove unused MAGIC_DISPLAY_FREQUENCY
       via  8fe6813... s4-torture: Enable tests with keynames including a slash.
       via  db2a777... s3-printing: Added automatic migration of printing tdbs.
       via  35e03ef... s3-printing: Move all tdb upgrade functions to a separate file.
       via  c18913a... s3-smbd: Convert reply_printqueue to use spoolss.
       via  3f68a39... Revert "s4-smbtorture: skip driverName and printerName DsSpooler tests for now."
       via  96c25cd... s3-spoolss: Create winprint print processor key.
       via  f5a2f8f... s3-printing: Removed unused function print_job_fd().
       via  21cd59e... s3-smbd: Use the right check to test if we can print.
       via  bdab6b1... s3-printing: Moved printing.c headers to include/printing.h.
       via  628f9be... s3-spoolss: Use WERROR for print_job_delete.
       via  95f587a... s3-printing: Removed unused printfsp.c.
       via  849cc65... s3-smbd: Migrated to new spoolss functions for printing.
       via  660506d... s3-printing: Handled case when smbd spools a file on behalf of spoolss.
       via  94ee35f... s3-printing: Made print_job_start more robust.
       via  4761498... s3-printing: Moved remaining prototypes to nt_printing.h.
       via  7c629bd... s3-printing: Remove unused printer registry key functions.
       via  ae405ee... s3-printing: Removed unused security descriptor functions.
       via  e2d3c0e... s3-printing: Removed unused nt_forms.
       via  c918cfd... s3-printing: Removed unsuded c_setprinter functions.
       via  d8ab3e5... s3-printing: Removed unused free_a_printer function.
       via  5c1f283... s3-printing: Removed unused mod_a_printer functions.
       via  4e45d5f... s3-printing: Removed unused get_a_printer functions.
       via  38d6274... s3-smbd: Added code to print via spoolss.
       via  8d44b11... s3-spoolss: Removed wrong comment.
       via  f6db369... s3-spoolss: Moved shared printing functions to nt_printing.h
       via  395dcbd... s3-spoolss: Removed the last free_a_printer() call in spoolss_nt.c.
       via  c26bfd2... s3-spoolss: Removed unused set_printer_dataex().
       via  6d6ce4d... s3-spoolss: Create and update DsSpooler values.
       via  3fe2f64... s3-spoolss: Use a temporary talloc context in update_printer.
       via  c52e019... s3-spoolss: Use the existing memory context for winreg_get_printer.
       via  c7ae6cb... s3-spoolss: Don't return the printer devicemode in spoolss_EnumJobs.
       via  48828ab... s3-spoolss: Fixed the driver unc strings for dependent files.
       via  a1fe2ed... s3-spoolss: Use winreg_delete_printer_key to delete printers.
       via  fdf669d... s3-spoolss: Get rid of get_server_name.
       via  44bc671... s3-printing: Converted printer publishing functions.
       via  d17d73f... s3-printing: Convert print_driver_in_use.
       via  017a305... s3-printing: Convert print_time_access_check.
       via  afc4a387.. s3-spoolss: Use spoolss_PrinterInfo2 in notify code.
       via  78b985a... s3-spoolss: Convert do_drv_upgrade_printer() to winreg functions.
       via  375bdfc... s3-spoolss: Removed construct_dev_mode() function.
       via  0d694e1... s3-spoolss: Use spoolss_PrinterInfo2 in construct_printer_driver_info_level.
       via  7f6f580... s3-spoolss: Use spoolss_PrinterInfo2 for job info.
       via  52b8f1f... s3-spoolss: Migrated driver functions to winreg.
       via  e517588... s3-spoolss: Set c_setprinter always to 0.
       via  90e96d3... s3-spoolss: Migrated spoolss_DeletePrinter to cleanup winreg keys.
       via  be6dc65... s3-spoolss: Migrated spoolss_GetPrinter and spoolss_EnumPrinters to winreg_update_printer.
       via  a2c51a8... s3-spoolss: Migrated spoolss_OpenPrinter to create defaults with winreg_create_printer.
       via  653364f... s3-spoolss: Removed unused function printer_info2_to_nt_printer_info2().
       via  665eba3... s3-spoolss: Removed unused function convert_printer_info().
       via  e2c9ad9... s3-spoolss: Migrated spoolss_AddPrinter and spoolss_SetPrinter.
       via  2a5dba5... s3-spoolss: Migrated spoolss_Forms to use the winreg changeid function.
       via  67bdaa5... s3-spoolss: Migrated spoolss_GetForm to the winreg function.
       via  a879bba... s3-spoolss: Migrated spoolss_SetForm to the winreg function.
       via  76f72fe... s3-spoolss: Migrated spoolss_DeleteForm to the winreg function.
       via  fad361a... s3-spoolss: Migrated spoolss_AddForm to the winreg function.
       via  2ae1796... s3-spoolss: Migrated spoolss_EnumForms to the winreg function.
       via  142431d... s3-spoolss: Migrated spoolss_DeletePrinterKey to the winreg functions.
       via  fb5529f... s3-spoolss: Migrated spoolss_DeletePrinterDataEx to the winreg functions.
       via  e210230... s3-spoolss: Migrated spoolss_EnumPrinterKey to the winreg functions.
       via  df35b34... s3-spoolss: Migrated spoolss_EnumPrinterDataEx to the winreg functions.
       via  795618a... s3-spoolss: Migrated spoolss_GetPrinterDataEx to the winreg functions.
       via  3d7e99e... s3-spoolss: Migrated spoolss_SetPrinterDataEx to the winreg functions.
       via  71be0ec... s3-registry: Redirect KEY_CONTROL_PRINTERS to KEY_WINNT_PRINTERS.
       via  65eb38b... s3-registry: Init all needed registry keys for printing.
       via  5604a78... s3-spoolss: Migrated NT_DEVICEMODE to spoolss_DeviceMode.
       via  104c419... s4-torture: Disable setting REG_BINARY printer data with size 0.
      from  6446c75... Fix several places where talloc_asprintf returns were unchecked.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 9168713774c02ba2f71d89379cc239a900ebeafe
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jul 27 12:27:54 2010 +0200

    s3-spoolss: Fixed FILL_DRIVER_STRING leading to wrong results.

commit 90c17828824401c7be065a7bbf706dcafef0fc31
Author: Simo Sorce <idra at samba.org>
Date:   Mon Jul 26 18:28:15 2010 -0400

    s3-spoolss: Avoid segfault, check drivername is actually not NULL.

commit 6cd2f2ff31768a40ca60112964b35bf040b2e6d8
Author: Simo Sorce <idra at samba.org>
Date:   Mon Jul 26 19:14:03 2010 +0200

    s3-spoolss: Fixed a possible segfault in winreg_get_printer.

commit bb0226f10ef86296af273ea0e9692b72d0ead4c2
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Jul 26 18:12:13 2010 +0200

    s3-spoolss: Correctly set the default values.

commit b95d5563ddff7aec15f4138be731578785dca7ec
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jun 15 13:37:44 2010 +0200

    s3-printing: Added automatic migration of printing tdbs.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 924cc43d1b8f8358f7c7aaef16b06437e39cd05b
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jun 30 10:40:24 2010 +0200

    s3-spoolss: Move the standard mappings to spoolss.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit c3186f22c5d501cc6afed7556579906d27763251
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jun 30 10:39:43 2010 +0200

    s3-lib: Make the standard_mapping parameter const.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 1be454538b2e4d242be90e43fab9eb09f0b07a57
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jun 30 10:25:08 2010 +0200

    s3-spoolss: Remove the program global current_user_info.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit d8c81423aa52f1810cafeefa186f7dd0590cb0de
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jun 29 15:05:00 2010 +0200

    s3-spoolss: Remove unused MAGIC_DISPLAY_FREQUENCY
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 8fe6813ca0e6ccbe4fed91425f82443f5cb166a4
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Jun 28 09:57:41 2010 +0200

    s4-torture: Enable tests with keynames including a slash.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit db2a777b0ee1e75fb6d11ad1240d7214a4e1dac4
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jun 15 13:37:44 2010 +0200

    s3-printing: Added automatic migration of printing tdbs.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 35e03ef5c22020e047bd05e61be6c46701a07702
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jun 15 11:48:12 2010 +0200

    s3-printing: Move all tdb upgrade functions to a separate file.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit c18913a2c216d9dd092f4efb3dfbad376fc29bb6
Author: Simo Sorce <ssorce at redhat.com>
Date:   Fri May 7 05:03:32 2010 -0400

    s3-smbd: Convert reply_printqueue to use spoolss.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 3f68a39458dddf7cfc67ce78248f3f1bdad18ba6
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jun 1 17:09:21 2010 +0200

    Revert "s4-smbtorture: skip driverName and printerName DsSpooler tests for now."
    
    This reverts commit 23eb2888d94b34822e4c49b1d62f4bd3fac43fcf.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 96c25cdad5e82a1aed77692796617532f663aca1
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jun 8 13:03:22 2010 +0200

    s3-spoolss: Create winprint print processor key.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit f5a2f8fa2b66d23eb2e99443f6d6bb85b6199b63
Author: Simo Sorce <ssorce at redhat.com>
Date:   Fri May 7 10:37:48 2010 -0400

    s3-printing: Removed unused function print_job_fd().
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 21cd59e7a5b319a8800c904d21f0d1e885acc7fb
Author: Simo Sorce <ssorce at redhat.com>
Date:   Fri May 7 07:35:23 2010 -0400

    s3-smbd: Use the right check to test if we can print.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit bdab6b10d25f536fe25c09b3821376e278395abc
Author: Simo Sorce <ssorce at redhat.com>
Date:   Fri May 7 08:01:13 2010 -0400

    s3-printing: Moved printing.c headers to include/printing.h.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 628f9bee05b96b806225f3494c05c3a86acb1a1f
Author: Simo Sorce <ssorce at redhat.com>
Date:   Wed May 5 08:56:46 2010 -0400

    s3-spoolss: Use WERROR for print_job_delete.
    
    And also check for PJOB_SMBD_SPOOLING in print_job_write.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 95f587a565543678da3beeff46167001b92bea79
Author: Simo Sorce <ssorce at redhat.com>
Date:   Fri May 7 07:45:25 2010 -0400

    s3-printing: Removed unused printfsp.c.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 849cc65654d20e7077621ead2429a82fcac35197
Author: Simo Sorce <ssorce at redhat.com>
Date:   Tue May 4 04:28:48 2010 -0400

    s3-smbd: Migrated to new spoolss functions for printing.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 660506d359d76700f6f6ae5b7e9c4d05fe505fb6
Author: Simo Sorce <ssorce at redhat.com>
Date:   Tue May 4 02:51:12 2010 -0400

    s3-printing: Handled case when smbd spools a file on behalf of spoolss.

commit 94ee35f9cc0880c267bee14047d559948eb14ede
Author: Simo Sorce <idra at samba.org>
Date:   Sat May 1 17:42:52 2010 -0400

    s3-printing: Made print_job_start more robust.
    
    Explicitly return ntstatus errors instead of relying on elusive errno.
    Split the function to make it easier to follow.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 4761498c9e40d8b00060d2949bfcff32c6cf7f99
Author: Andreas Schneider <asn at samba.org>
Date:   Tue May 11 11:14:55 2010 +0200

    s3-printing: Moved remaining prototypes to nt_printing.h.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 7c629bda2f86271b709292dbc5a9e811e438a902
Author: Andreas Schneider <asn at samba.org>
Date:   Tue May 11 11:07:36 2010 +0200

    s3-printing: Remove unused printer registry key functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit ae405eed4fa1857e90f240671c539088be51d562
Author: Andreas Schneider <asn at samba.org>
Date:   Tue May 11 11:02:59 2010 +0200

    s3-printing: Removed unused security descriptor functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit e2d3c0efa9a972d76279c3f834784525de1439b0
Author: Andreas Schneider <asn at samba.org>
Date:   Tue May 11 10:55:20 2010 +0200

    s3-printing: Removed unused nt_forms.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit c918cfdedec5730b0851fd8132986f26b40a3cdc
Author: Andreas Schneider <asn at samba.org>
Date:   Tue May 11 10:52:11 2010 +0200

    s3-printing: Removed unsuded c_setprinter functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit d8ab3e52dc717cbfd82b02c00426e98001acc764
Author: Andreas Schneider <asn at samba.org>
Date:   Tue May 11 10:49:46 2010 +0200

    s3-printing: Removed unused free_a_printer function.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 5c1f28374712c1e23d794670a9cd91052e99f34e
Author: Andreas Schneider <asn at samba.org>
Date:   Tue May 11 10:49:03 2010 +0200

    s3-printing: Removed unused mod_a_printer functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 4e45d5f8244fae0e26a6d0592a092f2a9c791666
Author: Andreas Schneider <asn at samba.org>
Date:   Tue May 11 10:46:10 2010 +0200

    s3-printing: Removed unused get_a_printer functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 38d6274864ebb4d31333946379496d67745cd3c5
Author: Simo Sorce <idra at samba.org>
Date:   Wed Apr 28 18:55:20 2010 -0400

    s3-smbd: Added code to print via spoolss.

commit 8d44b11c6bf90f4698e472b46d4f47a136b960ba
Author: Andreas Schneider <asn at samba.org>
Date:   Mon May 10 16:46:34 2010 +0200

    s3-spoolss: Removed wrong comment.
    
    This doesn't reflect the current implementation.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit f6db3694edc947ca46d52f3627844127525b262c
Author: Andreas Schneider <asn at samba.org>
Date:   Mon May 10 16:41:10 2010 +0200

    s3-spoolss: Moved shared printing functions to nt_printing.h
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 395dcbd111fd531324eb3e77940756e448a22024
Author: Andreas Schneider <asn at samba.org>
Date:   Mon May 10 16:44:47 2010 +0200

    s3-spoolss: Removed the last free_a_printer() call in spoolss_nt.c.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit c26bfd228de962b70ba744fd9dc9ca62ecca1470
Author: Simo Sorce <ssorce at redhat.com>
Date:   Fri May 7 09:42:55 2010 -0400

    s3-spoolss: Removed unused set_printer_dataex().
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 6d6ce4d1adbcb59231ec81fdc757d14f51a18534
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 30 10:35:08 2010 +0200

    s3-spoolss: Create and update DsSpooler values.

commit 3fe2f6443d3ad623360701fcb09ed8913da6baa3
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 30 10:14:09 2010 +0200

    s3-spoolss: Use a temporary talloc context in update_printer.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit c52e019ae10ba01f97851c0d4578a64209633a41
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Apr 29 14:07:10 2010 +0200

    s3-spoolss: Use the existing memory context for winreg_get_printer.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit c7ae6cb0464ed505fc0d44bb5095bb897c11d458
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Apr 28 22:46:22 2010 +0200

    s3-spoolss: Don't return the printer devicemode in spoolss_EnumJobs.
    
    Jobs have their own DeviceMode, see print_job_devmode().
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 48828ab154160489586fd07e442739db35103fca
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Apr 28 12:41:23 2010 +0200

    s3-spoolss: Fixed the driver unc strings for dependent files.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit a1fe2ed68aef71083dc6a9938440e32e5a0cf63c
Author: Simo Sorce <idra at samba.org>
Date:   Mon Apr 26 18:50:44 2010 -0400

    s3-spoolss: Use winreg_delete_printer_key to delete printers.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit fdf669d37744487a7671b1d90541dbc21a41aeb6
Author: Simo Sorce <idra at samba.org>
Date:   Mon Apr 26 18:33:20 2010 -0400

    s3-spoolss: Get rid of get_server_name.
    
    This function was useless the structure is public and used everywhere.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 44bc6714b0c5f40eb73def532b3074a4b19f6df4
Author: Simo Sorce <idra at samba.org>
Date:   Mon Apr 26 17:34:24 2010 -0400

    s3-printing: Converted printer publishing functions.
    
    Use spoolss_PrintInfo2 and winreg calls.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit d17d73f4be6938b942f1eed875c6dd629d8bec88
Author: Simo Sorce <idra at samba.org>
Date:   Mon Apr 26 14:46:33 2010 -0400

    s3-printing: Convert print_driver_in_use.
    
    Use spoolss_PrintInfo2 and winreg calls.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 017a305fede73b3f61517f38dec2bf706e2648df
Author: Simo Sorce <idra at samba.org>
Date:   Mon Apr 26 13:51:33 2010 -0400

    s3-printing: Convert print_time_access_check.
    
    use spoolss_PrintInfo2 and winreg calls
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit afc4a387628e00376a118fbd9aeeec0694201e6f
Author: Simo Sorce <idra at samba.org>
Date:   Mon Apr 26 13:08:32 2010 -0400

    s3-spoolss: Use spoolss_PrinterInfo2 in notify code.

commit 78b985ac3e38bbbb42545a722096bf53ee2821eb
Author: Simo Sorce <idra at samba.org>
Date:   Mon Apr 26 11:56:00 2010 -0400

    s3-spoolss: Convert do_drv_upgrade_printer() to winreg functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 375bdfc7f89d8941c006bc2afb058176d81027e3
Author: Simo Sorce <idra at samba.org>
Date:   Mon Apr 26 10:24:46 2010 -0400

    s3-spoolss: Removed construct_dev_mode() function.
    
    Replace it with spoolss_create_default_devmode() or
    copy_devicemode() where needed.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 0d694e1261975bdc565b673e38001c67f9ca239a
Author: Simo Sorce <idra at samba.org>
Date:   Mon Apr 26 09:30:10 2010 -0400

    s3-spoolss: Use spoolss_PrinterInfo2 in construct_printer_driver_info_level.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 7f6f5806ff4bd97b22b77e011f22402f5583acb5
Author: Simo Sorce <idra at samba.org>
Date:   Fri Apr 23 17:58:10 2010 -0400

    s3-spoolss: Use spoolss_PrinterInfo2 for job info.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 52b8f1f4710f1e3482031a76fd2191388289967f
Author: Simo Sorce <idra at samba.org>
Date:   Wed Apr 14 20:48:00 2010 -0400

    s3-spoolss: Migrated driver functions to winreg.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit e517588a2073986ccd0edd76f9e3c865146bf1f4
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Apr 26 11:52:19 2010 +0200

    s3-spoolss: Set c_setprinter always to 0.
    
    This value is only used for the well known printers list which Samba
    doesn't implement.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 90e96d3ee20caf4aa58ea87a3afc5013f31d0ae4
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Apr 22 23:52:33 2010 +0200

    s3-spoolss: Migrated spoolss_DeletePrinter to cleanup winreg keys.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit be6dc65b9e1b96872a10d3622b345d6be35872ef
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Apr 26 11:53:25 2010 +0200

    s3-spoolss: Migrated spoolss_GetPrinter and spoolss_EnumPrinters to winreg_update_printer.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit a2c51a88cca77accdcd6660bdbdeccad63b8ee6a
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Apr 22 10:59:27 2010 +0200

    s3-spoolss: Migrated spoolss_OpenPrinter to create defaults with winreg_create_printer.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 653364f5a38fb6ec7c6ede38b62b2b15200b9f77
Author: Andreas Schneider <asn at samba.org>
Date:   Fri May 7 10:38:54 2010 +0200

    s3-spoolss: Removed unused function printer_info2_to_nt_printer_info2().
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 665eba334e96ee120f036e693c2a36167deaede2
Author: Andreas Schneider <asn at samba.org>
Date:   Fri May 7 10:38:17 2010 +0200

    s3-spoolss: Removed unused function convert_printer_info().
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit e2c9ad93cb914186b89e2055f1bed3cceee1f768
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 16 11:35:05 2010 +0200

    s3-spoolss: Migrated spoolss_AddPrinter and spoolss_SetPrinter.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 2a5dba555520bf99a9545e1c7296075baf92cbea
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Apr 15 15:20:42 2010 +0200

    s3-spoolss: Migrated spoolss_Forms to use the winreg changeid function.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 67bdaa561608eca2f8ae500c6c6590630aa79094
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Apr 1 12:46:22 2010 +0200

    s3-spoolss: Migrated spoolss_GetForm to the winreg function.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit a879bba0acc8682949a2ca38e23f354baa6f96d1
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Apr 1 11:53:01 2010 +0200

    s3-spoolss: Migrated spoolss_SetForm to the winreg function.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 76f72fe5157cb6dd37f1beaa0ff6473bd67c6b0f
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Mar 31 15:31:53 2010 +0200

    s3-spoolss: Migrated spoolss_DeleteForm to the winreg function.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit fad361aa8a050e99ac64c3aae6ee292d2a538c80
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Mar 31 14:48:27 2010 +0200

    s3-spoolss: Migrated spoolss_AddForm to the winreg function.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 2ae1796b090b793397f4082a996b8e430172d365
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Mar 31 13:04:30 2010 +0200

    s3-spoolss: Migrated spoolss_EnumForms to the winreg function.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 142431d09774da4004ed7fae7f0891f7ba62f8f9
Author: Andreas Schneider <asn at redhat.com>
Date:   Fri Mar 26 13:22:57 2010 +0100

    s3-spoolss: Migrated spoolss_DeletePrinterKey to the winreg functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit fb5529f6230526701df5506836f93ca9b03e43e8
Author: Andreas Schneider <asn at redhat.com>
Date:   Mon Mar 15 12:30:32 2010 +0100

    s3-spoolss: Migrated spoolss_DeletePrinterDataEx to the winreg functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit e210230587bc129e7136b436242d7b9ae781d13d
Author: Andreas Schneider <asn at redhat.com>
Date:   Wed Mar 17 16:38:52 2010 +0100

    s3-spoolss: Migrated spoolss_EnumPrinterKey to the winreg functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit df35b343dbb10ef5b248265e0b23ea0711ecce46
Author: Andreas Schneider <asn at redhat.com>
Date:   Mon Mar 15 14:01:01 2010 +0100

    s3-spoolss: Migrated spoolss_EnumPrinterDataEx to the winreg functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 795618a59284e5ce44ec6de60eccdfafecfbbc99
Author: Andreas Schneider <asn at redhat.com>
Date:   Mon Mar 15 12:28:09 2010 +0100

    s3-spoolss: Migrated spoolss_GetPrinterDataEx to the winreg functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 3d7e99e2c3247f1d6303196485f86d2ab05ec8c8
Author: Andreas Schneider <asn at redhat.com>
Date:   Mon Mar 15 12:20:31 2010 +0100

    s3-spoolss: Migrated spoolss_SetPrinterDataEx to the winreg functions.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 71be0ec140c6e5cd3315fd20f6c8795fa0aaca63
Author: Andreas Schneider <asn at samba.org>
Date:   Wed May 26 11:27:28 2010 +0200

    s3-registry: Redirect KEY_CONTROL_PRINTERS to KEY_WINNT_PRINTERS.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 65eb38bc00a723052d8ac371cb2cf7fd68e0954b
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Apr 8 11:26:40 2010 +0200

    s3-registry: Init all needed registry keys for printing.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 5604a78f0919f77fdf041989e3e2e0f61da80fd9
Author: Simo Sorce <idra at samba.org>
Date:   Thu Apr 22 16:53:15 2010 -0400

    s3-spoolss: Migrated NT_DEVICEMODE to spoolss_DeviceMode.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

commit 104c419345a42a9a02ae25df482f449dc41a6380
Author: Andreas Schneider <asn at redhat.com>
Date:   Fri Mar 26 14:40:05 2010 +0100

    s4-torture: Disable setting REG_BINARY printer data with size 0.
    
    Signed-off-by: Jim McDonough <jmcd at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/Makefile.in                     |    8 +-
 source3/include/nt_printing.h           |  119 +-
 source3/include/printing.h              |   46 +-
 source3/include/proto.h                 |  136 +--
 source3/include/smb.h                   |   24 +-
 source3/lib/util_seaccess.c             |    2 +-
 source3/modules/onefs_open.c            |    4 +-
 source3/printing/nt_printing.c          | 3659 +++----------------------------
 source3/printing/nt_printing_migrate.c  |  646 ++++++
 source3/printing/nt_printing_migrate.h  |   26 +
 source3/printing/nt_printing_tdb.c      |  460 ++++
 source3/printing/nt_printing_tdb.h      |   28 +
 source3/printing/printfsp.c             |  147 --
 source3/printing/printing.c             |  493 +++--
 source3/printing/printspoolss.c         |  333 +++
 source3/registry/reg_backend_db.c       |    3 +
 source3/registry/reg_backend_printing.c | 1059 +---------
 source3/registry/reg_init_full.c        |    6 +-
 source3/rpc_server/srv_spoolss_nt.c     | 2895 ++++++++++++-------------
 source3/rpc_server/srv_spoolss_util.c   |   78 +-
 source3/smbd/close.c                    |    4 +-
 source3/smbd/fileio.c                   |   18 +-
 source3/smbd/open.c                     |    5 +-
 source3/smbd/process.c                  |   28 +-
 source3/smbd/reply.c                    |  119 +-
 source3/smbd/server_reload.c            |   29 +-
 source3/smbd/smb2_create.c              |    8 +-
 source3/wscript_build                   |    8 +-
 source4/torture/rpc/spoolss.c           |   22 +-
 29 files changed, 3910 insertions(+), 6503 deletions(-)
 create mode 100644 source3/printing/nt_printing_migrate.c
 create mode 100644 source3/printing/nt_printing_migrate.h
 create mode 100644 source3/printing/nt_printing_tdb.c
 create mode 100644 source3/printing/nt_printing_tdb.h
 delete mode 100644 source3/printing/printfsp.c
 create mode 100644 source3/printing/printspoolss.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 37dce45..1b641a4 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -811,7 +811,8 @@ SMBD_OBJ_SRV = smbd/server_reload.o \
 	       smbd/vfs.o smbd/perfcount.o smbd/statcache.o smbd/seal.o \
                smbd/posix_acls.o lib/sysacls.o \
 	       smbd/process.o smbd/service.o smbd/error.o \
-	       printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
+	       printing/printspoolss.o \
+	       lib/sysquotas.o lib/sysquotas_linux.o \
 	       lib/sysquotas_xfs.o lib/sysquotas_4A.o \
 	       smbd/fake_file.o \
 	       smbd/quotas.o smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
@@ -859,7 +860,10 @@ PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \
                printing/print_iprint.o printing/print_standard.o
 
 PRINTBASE_OBJ = printing/notify.o printing/printing_db.o
-PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ)
+PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o \
+		   printing/nt_printing_tdb.o printing/nt_printing_migrate.o \
+		   librpc/gen_ndr/ndr_ntprinting.o ../librpc/ndr/ndr_ntprinting.o \
+		   $(PRINTBASE_OBJ)
 
 SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN)
 
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 0241a54..199236b 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -22,6 +22,9 @@
 #ifndef NT_PRINTING_H_
 #define NT_PRINTING_H_
 
+#include "client.h"
+#include "../librpc/gen_ndr/srv_spoolss.h"
+
 /* container for a single registry key */
 
 typedef struct {
@@ -36,47 +39,6 @@ typedef struct {
 	NT_PRINTER_KEY	*keys;
 } NT_PRINTER_DATA;
 
-typedef struct ntdevicemode
-{
-	fstring	devicename;
-	fstring	formname;
-
-	uint16	specversion;
-	uint16	driverversion;
-	uint16	size;
-	uint16	driverextra;
-	uint16	orientation;
-	uint16	papersize;
-	uint16	paperlength;
-	uint16	paperwidth;
-	uint16	scale;
-	uint16	copies;
-	uint16	defaultsource;
-	uint16	printquality;
-	uint16	color;
-	uint16	duplex;
-	uint16	yresolution;
-	uint16	ttoption;
-	uint16	collate;
-	uint16	logpixels;
-
-	uint32	fields;
-	uint32	bitsperpel;
-	uint32	pelswidth;
-	uint32	pelsheight;
-	uint32	displayflags;
-	uint32	displayfrequency;
-	uint32	icmmethod;
-	uint32	icmintent;
-	uint32	mediatype;
-	uint32	dithertype;
-	uint32	reserved1;
-	uint32	reserved2;
-	uint32	panningwidth;
-	uint32	panningheight;
-	uint8 	*nt_dev_private;
-} NT_DEVICEMODE;
-
 typedef struct nt_printer_info_level_2
 {
 	uint32 attributes;
@@ -94,7 +56,7 @@ typedef struct nt_printer_info_level_2
 	fstring drivername;
 	char comment[1024];
 	fstring location;
-	NT_DEVICEMODE *devmode;
+	struct spoolss_DeviceMode *devmode;
 	fstring sepfile;
 	fstring printprocessor;
 	fstring datatype;
@@ -230,12 +192,12 @@ typedef struct _Printer{
 		fstring machine;
 		fstring user;
 	} client;
-	
+
 	/* devmode sent in the OpenPrinter() call */
-	NT_DEVICEMODE	*nt_devmode;
-	
-	/* cache the printer info */
-	NT_PRINTER_INFO_LEVEL *printer_info;
+	struct spoolss_DeviceMode *devmode;
+
+	/* TODO cache the printer info2 structure */
+	struct spoolss_PrinterInfo2 *info2;
 	
 } Printer_entry;
 
@@ -261,4 +223,67 @@ struct print_architecture_table_node {
 	int	version;
 };
 
+bool nt_printing_init(struct messaging_context *msg_ctx);
+
+WERROR spoolss_create_default_devmode(TALLOC_CTX *mem_ctx,
+				      const char *devicename,
+				      struct spoolss_DeviceMode **devmode);
+
+WERROR spoolss_create_default_secdesc(TALLOC_CTX *mem_ctx,
+				      struct spoolss_security_descriptor **secdesc);
+
+WERROR spoolss_map_to_os2_driver(TALLOC_CTX *mem_ctx, const char **pdrivername);
+
+const char *get_short_archi(const char *long_archi);
+
+bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token,
+		      struct spoolss_SetPrinterInfo2 *info2,
+		      const char *remote_machine);
+
+bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
+			int access_type);
+
+WERROR nt_printer_publish(TALLOC_CTX *mem_ctx,
+			  struct auth_serversupplied_info *server_info,
+			  struct spoolss_PrinterInfo2 *pinfo2,
+			  int action);
+
+bool is_printer_published(TALLOC_CTX *mem_ctx,
+			  struct auth_serversupplied_info *server_info,
+			  char *servername, char *printer, struct GUID *guid,
+			  struct spoolss_PrinterInfo2 **info2);
+
+WERROR check_published_printers(void);
+
+bool driver_info_ctr_to_info8(struct spoolss_AddDriverInfoCtr *r,
+			      struct spoolss_DriverInfo8 *_info8);
+
+bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
+			   struct auth_serversupplied_info *server_info,
+			   const struct spoolss_DriverInfo8 *r);
+bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
+				 struct auth_serversupplied_info *server_info,
+				 struct spoolss_DriverInfo8 *r);
+bool delete_driver_files(struct auth_serversupplied_info *server_info,
+			 const struct spoolss_DriverInfo8 *r);
+
+WERROR move_driver_to_download_area(struct pipes_struct *p,
+				    struct spoolss_AddDriverInfoCtr *r,
+				    WERROR *perr);
+
+WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
+			      struct pipes_struct *rpc_pipe,
+			      struct spoolss_AddDriverInfoCtr *r);
+
+void map_printer_permissions(struct security_descriptor *sd);
+
+void map_job_permissions(struct security_descriptor *sd);
+
+bool print_time_access_check(struct auth_serversupplied_info *server_info,
+			     const char *servicename);
+
+void nt_printer_remove(TALLOC_CTX *mem_ctx,
+			struct auth_serversupplied_info *server_info,
+			const char *printer);
+
 #endif /* NT_PRINTING_H_ */
diff --git a/source3/include/printing.h b/source3/include/printing.h
index d91917b..eb277c9 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -40,7 +40,7 @@ struct printjob {
 	fstring jobname; /* the job name given to us by the client */
 	fstring user; /* the user who started the job */
 	fstring queuename; /* service number of printer for this job */
-	NT_DEVICEMODE *nt_devmode;
+	struct spoolss_DeviceMode *devmode;
 };
 
 /* Information for print interfaces */
@@ -100,4 +100,48 @@ struct tdb_print_db {
 
 #define NOTIFY_PID_LIST_KEY "NOTIFY_PID_LIST"
 
+NTSTATUS print_spool_open(files_struct *fsp,
+			  const char *fname,
+			  uint16_t current_vuid);
+
+int print_spool_write(files_struct *fsp, const char *data, uint32_t size,
+		      SMB_OFF_T offset, uint32_t *written);
+
+void print_spool_end(files_struct *fsp, enum file_close_type close_type);
+
+void print_spool_terminate(struct connection_struct *conn,
+			   struct print_file_data *print_file);
+
+/* The following definitions come from printing/printing.c  */
+
+int unpack_pjob( uint8 *buf, int buflen, struct printjob *pjob );
+uint32 sysjob_to_jobid(int unix_jobid);
+void pjob_delete(const char* sharename, uint32 jobid);
+bool print_notify_register_pid(int snum);
+bool print_notify_deregister_pid(int snum);
+bool print_job_exists(const char* sharename, uint32 jobid);
+char *print_job_fname(const char* sharename, uint32 jobid);
+struct spoolss_DeviceMode *print_job_devmode(const char* sharename, uint32 jobid);
+bool print_job_set_name(const char *sharename, uint32 jobid, const char *name);
+bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t jobid, char **name);
+WERROR print_job_delete(struct auth_serversupplied_info *server_info,
+			int snum, uint32 jobid);
+bool print_job_pause(struct auth_serversupplied_info *server_info, int snum,
+		     uint32 jobid, WERROR *errcode);
+bool print_job_resume(struct auth_serversupplied_info *server_info, int snum,
+		      uint32 jobid, WERROR *errcode);
+ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size);
+int print_queue_length(int snum, print_status_struct *pstatus);
+WERROR print_job_start(struct auth_serversupplied_info *server_info,
+		       int snum, const char *docname, const char *filename,
+		       struct spoolss_DeviceMode *devmode, uint32_t *_jobid);
+void print_job_endpage(int snum, uint32 jobid);
+NTSTATUS print_job_end(int snum, uint32 jobid, enum file_close_type close_type);
+int print_queue_status(int snum,
+		       print_queue_struct **ppqueue,
+		       print_status_struct *status);
+WERROR print_queue_pause(struct auth_serversupplied_info *server_info, int snum);
+WERROR print_queue_resume(struct auth_serversupplied_info *server_info, int snum);
+WERROR print_queue_purge(struct auth_serversupplied_info *server_info, int snum);
+
 #endif /* PRINTING_H_ */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 16110f2..8dbe758 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1339,7 +1339,7 @@ bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **
 
 void se_map_generic(uint32 *access_mask, const struct generic_mapping *mapping);
 void security_acl_map_generic(struct security_acl *sa, const struct generic_mapping *mapping);
-void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping);
+void se_map_standard(uint32 *access_mask, const struct standard_mapping *mapping);
 NTSTATUS se_access_check(const struct security_descriptor *sd, const NT_USER_TOKEN *token,
 		     uint32 acc_desired, uint32 *acc_granted);
 
@@ -4719,139 +4719,19 @@ void notify_printer_port(int snum, const char *port_name);
 void notify_printer_location(int snum, const char *location);
 void notify_printer_byname( const char *printername, uint32 change, const char *value );
 
-/* The following definitions come from printing/nt_printing.c  */
-
-bool nt_printing_init(struct messaging_context *msg_ctx);
-uint32 update_c_setprinter(bool initialize);
-uint32 get_c_setprinter(void);
-int get_builtin_ntforms(nt_forms_struct **list);
-bool get_a_builtin_ntform_by_string(const char *form_name, nt_forms_struct *form);
-int get_ntforms(nt_forms_struct **list);
-int write_ntforms(nt_forms_struct **list, int number);
-bool add_a_form(nt_forms_struct **list, struct spoolss_AddFormInfo1 *form, int *count);
-bool delete_a_form(nt_forms_struct **list, const char *del_name, int *count, WERROR *ret);
-void update_a_form(nt_forms_struct **list, struct spoolss_AddFormInfo1 *form, int count);
-int get_ntdrivers(fstring **list, const char *architecture, uint32 version);
-const char *get_short_archi(const char *long_archi);
-WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
-			      struct pipes_struct *rpc_pipe,
-			      struct spoolss_AddDriverInfoCtr *r);
-WERROR move_driver_to_download_area(struct pipes_struct *p,
-				    struct spoolss_AddDriverInfoCtr *r,
-				    WERROR *perr);
-int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen);
-uint32 del_a_printer(const char *sharename);
-NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename);
-void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr);
-int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen);
-WERROR spoolss_create_default_devmode(TALLOC_CTX *mem_ctx,
-				      const char *devicename,
-				      struct spoolss_DeviceMode **devmode);
-WERROR spoolss_create_default_secdesc(TALLOC_CTX *mem_ctx,
-				      struct spoolss_security_descriptor **secdesc);
-WERROR spoolss_map_to_os2_driver(TALLOC_CTX *mem_ctx, const char **pdrivername);
-int add_new_printer_key( NT_PRINTER_DATA *data, const char *name );
-int delete_printer_key( NT_PRINTER_DATA *data, const char *name );
-int lookup_printerkey( NT_PRINTER_DATA *data, const char *name );
-int get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subkeys );
-WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action);
-WERROR check_published_printers(void);
-bool is_printer_published(Printer_entry *print_hnd, int snum, 
-			  struct GUID *guid);
-WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action);
-WERROR check_published_printers(void);
-bool is_printer_published(Printer_entry *print_hnd, int snum, 
-			  struct GUID *guid);
-WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key );
-WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value );
-WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value, 
-                           uint32 type, uint8 *data, int real_len );
-struct regval_blob* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value );
-WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL *printer, uint32 level);
-WERROR get_a_printer( Printer_entry *print_hnd,
-			NT_PRINTER_INFO_LEVEL **pp_printer,
-			uint32 level,
-			const char *sharename);
-WERROR get_a_printer_search( Printer_entry *print_hnd,
-			NT_PRINTER_INFO_LEVEL **pp_printer,
-			uint32 level,
-			const char *sharename);
-uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level);
-bool driver_info_ctr_to_info8(struct spoolss_AddDriverInfoCtr *r,
-			      struct spoolss_DriverInfo8 *_info8);
-uint32_t add_a_printer_driver(TALLOC_CTX *mem_ctx,
-			      struct spoolss_AddDriverInfoCtr *r,
-			      char **driver_name,
-			      uint32_t *version);
-WERROR get_a_printer_driver(TALLOC_CTX *mem_ctx,
-			    struct spoolss_DriverInfo8 **driver_p,
-			    const char *drivername, const char *architecture,
-			    uint32_t version);
-uint32_t free_a_printer_driver(struct spoolss_DriverInfo8 *driver);
-bool printer_driver_in_use(const struct spoolss_DriverInfo8 *r);
-bool printer_driver_files_in_use(TALLOC_CTX *mem_ctx,
-				 struct spoolss_DriverInfo8 *r);
-WERROR delete_printer_driver(struct pipes_struct *rpc_pipe,
-			     const struct spoolss_DriverInfo8 *r,
-			     uint32 version, bool delete_files );
-WERROR nt_printing_setsec(const char *sharename, struct sec_desc_buf *secdesc_ctr);
-bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, struct sec_desc_buf **secdesc_ctr);
-void map_printer_permissions(struct security_descriptor *sd);
-void map_job_permissions(struct security_descriptor *sd);
-bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
-			int access_type);
-bool print_time_access_check(const char *servicename);
-char* get_server_name( Printer_entry *printer );
-
 /* The following definitions come from printing/pcap.c  */
 
 void pcap_cache_reload(void);
 bool pcap_printername_ok(const char *printername);
 
-/* The following definitions come from printing/printfsp.c  */
-
-NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn,
-			const char *fname,
-			uint16_t current_vuid, files_struct *fsp);
-void print_fsp_end(files_struct *fsp, enum file_close_type close_type);
-SMB_OFF_T printfile_offset(files_struct *fsp, SMB_OFF_T offset);
-
 /* The following definitions come from printing/printing.c  */
 
 uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
 bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
+void rap_jobid_delete(const char* sharename, uint32 jobid);
 bool print_backend_init(struct messaging_context *msg_ctx);
-void printing_end(void);
-int unpack_pjob( uint8 *buf, int buflen, struct printjob *pjob );
-uint32 sysjob_to_jobid(int unix_jobid);
-void pjob_delete(const char* sharename, uint32 jobid);
 void start_background_queue(void);
-bool print_notify_register_pid(int snum);
-bool print_notify_deregister_pid(int snum);
-bool print_job_exists(const char* sharename, uint32 jobid);
-int print_job_fd(const char* sharename, uint32 jobid);
-char *print_job_fname(const char* sharename, uint32 jobid);
-NT_DEVICEMODE *print_job_devmode(const char* sharename, uint32 jobid);
-bool print_job_set_name(const char *sharename, uint32 jobid, const char *name);
-bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t jobid, char **name);
-bool print_job_delete(struct auth_serversupplied_info *server_info, int snum,
-		      uint32 jobid, WERROR *errcode);
-bool print_job_pause(struct auth_serversupplied_info *server_info, int snum,
-		     uint32 jobid, WERROR *errcode);
-bool print_job_resume(struct auth_serversupplied_info *server_info, int snum,
-		      uint32 jobid, WERROR *errcode);
-ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size);
-int print_queue_length(int snum, print_status_struct *pstatus);
-uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
-		       const char *jobname, NT_DEVICEMODE *nt_devmode );
-void print_job_endpage(int snum, uint32 jobid);
-bool print_job_end(int snum, uint32 jobid, enum file_close_type close_type);
-int print_queue_status(int snum, 
-		       print_queue_struct **ppqueue,
-		       print_status_struct *status);
-WERROR print_queue_pause(struct auth_serversupplied_info *server_info, int snum);
-WERROR print_queue_resume(struct auth_serversupplied_info *server_info, int snum);
-WERROR print_queue_purge(struct auth_serversupplied_info *server_info, int snum);
+void printing_end(void);
 
 /* The following definitions come from printing/printing_db.c  */
 
@@ -5144,15 +5024,6 @@ void reset_all_printerdata(struct messaging_context *msg,
 			   uint32_t msg_type,
 			   struct server_id server_id,
 			   DATA_BLOB *data);
-bool convert_devicemode(const char *printername,
-			const struct spoolss_DeviceMode *devmode,
-			NT_DEVICEMODE **pp_nt_devmode);
-WERROR set_printer_dataex(NT_PRINTER_INFO_LEVEL *printer,
-			  const char *key, const char *value,
-			  uint32_t type, uint8_t *data, int real_len);
-struct spoolss_DeviceMode *construct_dev_mode(TALLOC_CTX *mem_ctx,
-					      const char *servicename);
-bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer);
 
 /* The following definitions come from rpc_server/srv_srvsvc_nt.c  */
 
@@ -5580,6 +5451,7 @@ void reply_transs(struct smb_request *req);
 
 /* The following definitions come from smbd/lanman.c  */
 
+time_t spoolss_Time_to_time_t(const struct spoolss_Time *r);
 void api_reply(connection_struct *conn, uint16 vuid,
 	       struct smb_request *req,
 	       char *data, char *params,
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 507aeac..5266192 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -338,6 +338,11 @@ struct notify_change_buf {
 };
 
 struct print_file_data {
+	char *svcname;
+	char *docname;
+	char *filename;
+	struct policy_handle handle;
+	uint32_t jobid;
 	uint16 rap_jobid;
 };
 
@@ -630,8 +635,23 @@ typedef struct {
 
 /* Extra fields above "LPQ_PRINTING" are used to map extra NT status codes. */
 
-enum {LPQ_QUEUED=0,LPQ_PAUSED,LPQ_SPOOLING,LPQ_PRINTING,LPQ_ERROR,LPQ_DELETING,
-      LPQ_OFFLINE,LPQ_PAPEROUT,LPQ_PRINTED,LPQ_DELETED,LPQ_BLOCKED,LPQ_USER_INTERVENTION};
+enum {
+	LPQ_QUEUED = 0,
+	LPQ_PAUSED,
+	LPQ_SPOOLING,
+	LPQ_PRINTING,
+	LPQ_ERROR,
+	LPQ_DELETING,
+	LPQ_OFFLINE,
+	LPQ_PAPEROUT,
+	LPQ_PRINTED,
+	LPQ_DELETED,
+	LPQ_BLOCKED,
+	LPQ_USER_INTERVENTION,
+
+	/* smbd is dooing the file spooling before passing control to spoolss */
+	PJOB_SMBD_SPOOLING
+};
 
 typedef struct _print_queue_struct {
 	int job;		/* normally the UNIX jobid -- see note in 
diff --git a/source3/lib/util_seaccess.c b/source3/lib/util_seaccess.c
index e5562b5..b81db43 100644
--- a/source3/lib/util_seaccess.c
+++ b/source3/lib/util_seaccess.c
@@ -82,7 +82,7 @@ void security_acl_map_generic(struct security_acl *sa,
    objects.  Each type of object has its own mapping of standard to object
    specific access rights. */
 
-void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping)
+void se_map_standard(uint32 *access_mask, const struct standard_mapping *mapping)
 {
 	uint32 old_mask = *access_mask;
 
diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index ac3c5b2..c2f2979 100644
--- a/source3/modules/onefs_open.c
+++ b/source3/modules/onefs_open.c
@@ -483,8 +483,8 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
 		DEBUG(10, ("onefs_open_file_ntcreate: printer open fname=%s\n",
 			   smb_fname_str_dbg(smb_fname)));
 
-		return print_fsp_open(req, conn, smb_fname->base_name,
-				      req->vuid, fsp);
+		return print_spool_open(fsp, smb_fname->base_name,
+					req->vuid);
 	}
 
 	if (!parent_dirname(talloc_tos(), smb_fname->base_name, &parent_dir,
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 9ed6461..1186c67 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -22,25 +22,14 @@
 #include "includes.h"


-- 
Samba Shared Repository


More information about the samba-cvs mailing list