summaryrefslogtreecommitdiff
path: root/source3/printing/nt_printing.c
AgeCommit message (Collapse)AuthorFilesLines
2011-03-04s3-printing: follow force user/group for driver IODavid Disseldorp1-1/+46
Configuring force user/group settings for the print$ share currently has unexpected results, this is explained by how the driver upload/add process takes place. Consider the following example: [print$] path = /print-drv write list = $DRIVER_UPLOAD_USER force group = ntadmin - the client connects to the [print$] share and uploads all driver files to the /print-drv/W32X86 directory. - This is permitted, as /print-drv/W32X86 is owned by group ntadmin, and the "force group = ntadmin" takes effect for the [print$] session. - Once all files are uploaded, the client connects to the [ipc$] share and issues an AddPrinterDriverEx spoolss request. - In handling this request move_driver_to_download_area() is called, which attempts to create the directory /print-drv/W32X86/3 - The create directory fails, as it is done as the user connected to the [ipc$] share which does not have permission to write to the driver directory. The [print$] "force group = ntadmin" has no effect. This is a regression from previous behaviour prior to the commit: 783ab04 Convert move_driver_to_download_area to use create_conn_struct. https://bugzilla.samba.org/show_bug.cgi?id=7921 Signed-off-by: Andreas Schneider <asn@samba.org>
2011-03-02s3-printing: vfs_connect prior to driver/dfs IODavid Disseldorp1-0/+3
samba3.posix_s3.rpc.spoolss.driver fails with the xattr_tdb vfs module loaded as a part of make test. The (now checked) create_directory() call in move_driver_to_download_area() fails, uncovering another bug in the printer driver upload code path. move_driver_to_download_area() creates a new conn_struct for manipulating files in [print$]. The VFS layer is plumbed through with the call to create_conn_struct(), however SMB_VFS_CONNECT() is never called. Many vfs modules expect state stored at connect time with SMB_VFS_HANDLE_SET_DATA() to be available on any IO operation and fail if this is not the case. This fix adds a call to SMB_VFS_CONNECT() in create_conn_struct() prior to IO. https://bugzilla.samba.org/show_bug.cgi?id=7976 Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Mar 2 01:16:30 CET 2011 on sn-devel-104
2011-03-02s3-printing: clean up get_correct_cversion error pathsDavid Disseldorp1-18/+16
Remove an unneeded variable and simplify error paths.
2011-03-02s3-printing: fix move_driver_to_download_area() error pathsDavid Disseldorp1-68/+51
WERR_ACCESS_DENIED errors are mapped to WERR_UNKNOWN_PRINTER_DRIVER, resulting in incorrect error messages on Windows clients. move_driver_to_download_area() returns the same error status values to the caller via the *perr argument as well as the return value. The create_directory() call is not checked for error.
2011-02-28Fix some typesJelmer Vernooij1-1/+1
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Mon Feb 28 23:30:06 CET 2011 on sn-devel-104
2011-02-22s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_infoAndrew Bartlett1-24/+24
These variables, of type struct auth_serversupplied_info were poorly named when added into 2001, and in good consistant practice, this has extended all over the codebase in the years since. The structure is also not ideal for it's current purpose. Originally intended to convey the results of the authentication modules, it really describes all the essential attributes of a session. This rename will reduce the volume of a future patch to replaced these with a struct auth_session_info, with auth_serversupplied_info confined to the lower levels of the auth subsystem, and then eliminated. (The new structure will be the output of create_local_token(), and the change in struct definition will ensure that this is always run, populating local groups and privileges). Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-10s3-rpc_server: move services into individual directories.Günther Deschner1-1/+1
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Feb 10 22:13:17 CET 2011 on sn-devel-104
2011-02-10s3-auth Rename cryptic 'ptok' to security_tokenAndrew Bartlett1-3/+3
This will allow the auth_serversupplied_info struct to be migrated to auth_session_info easier. Adnrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-11-29s3-spoolss: Fix Bug #7641: handle win9x adddriver calls w/o config file.Günther Deschner1-2/+8
This turned cupsaddsmb to run into an infinite loop. Guenther
2010-11-10Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when ↵Jeremy Allison1-12/+17
adding new share via MMC Change the find_service() interface to not depend on fstring, and create a useable talloc-based interface. Jeremy.
2010-10-22Revert "Wrap security_token_has_privilege() with a check for ↵Jeremy Allison1-1/+1
lp_enable_privileges(). Needed" Not needed - privileges code prevents "enable privileges = no" from adding privileges anyway. This reverts commit a8b95686a7bde3f96f141b6938e24e101567ef54. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Oct 22 23:41:36 UTC 2010 on sn-devel-104
2010-10-22Wrap security_token_has_privilege() with a check for lp_enable_privileges(). ↵Jeremy Allison1-1/+1
Needed to maintain compatibility with smb.conf manpage. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Oct 22 18:15:48 UTC 2010 on sn-devel-104
2010-10-12libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett1-0/+1
This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-04s3: Fix a pointer errorVolker Lendecke1-1/+1
It is not universally guaranteed that an enum is represented as a uint32_t. This starts to be THE BUG (tm) in Samba. What can I do to explain this to people a bit better? It seems that the verbose explanations I put into the recent checkins fixing similar bugs are not clear enough. Anybody who does is not 100% clear about what this patch fixes please contact me directly so that we can talk it through on the phone to agree on a wording that everybody can understand. Thanks, Volker
2010-10-02s3-spoolss: Fixed print_access_check server_info.Andreas Schneider1-1/+1
2010-09-30s3-spoolss: Fix servername/printername handling which turns out to be very ↵Günther Deschner1-2/+2
important to get right. Guenther
2010-09-11s3-privs Convert from user_has_privileges() -> security_token_has_privilege()Andrew Bartlett1-2/+1
This new call is available in the merged privileges code, and takes an enum as the parameter, rather than a bitmask. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11s3-privs Further changes to remove SE_PRIVAndrew Bartlett1-1/+1
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-09s3-printing: Make auth_serversupplied_info const.Andreas Schneider1-6/+6
2010-08-31s3-printing: add debug to get_correct_cversion().Günther Deschner1-0/+1
Guenther
2010-08-08s3: Lift the smbd_messaging_context from check_published_printersVolker Lendecke1-1/+1
2010-08-08s3: Lift the smbd_messaging_context from nt_printer_removeVolker Lendecke1-2/+2
2010-08-08s3: Lift the smbd_messaging_context from print_time_access_checkVolker Lendecke1-2/+2
2010-08-08s3: Lift the smbd_messaging_context from print_access_checkVolker Lendecke1-2/+3
2010-08-08s3: Lift the smbd_messaging_context from printer_driver_files_in_useVolker Lendecke1-4/+3
2010-08-08s3: Lift the smbd_messaging_context from printer_driver_in_useVolker Lendecke1-9/+7
2010-08-08s3: Lift the smbd_messaging_context from winreg_del_driver_listVolker Lendecke1-0/+1
2010-08-08s3: Lift the smbd_messaging_context from winreg_get_driverVolker Lendecke1-0/+4
2010-08-08s3: Lift the smbd_messaging_context from winreg_delete_printer_keyVolker Lendecke1-1/+3
2010-08-08s3: Lift the smbd_messaging_context from winreg_get_printer_secdescVolker Lendecke1-0/+1
2010-08-08s3: Lift the smbd_messaging_context from winreg_get_printerVolker Lendecke1-1/+3
2010-08-06s3-netlogon: remove global include of netlogon.h.Günther Deschner1-0/+1
This reduces precompiled headers by another 4 MB and also slightly speeds up the build. Guenther
2010-08-05s3-secrets: only include secrets.h when needed.Günther Deschner1-0/+1
Guenther
2010-08-05s3-printing: move AD related printing components to an own file.Günther Deschner1-440/+0
Guenther
2010-08-03s3-spoolss: remove duplicate (and incorrect) header.Günther Deschner1-1/+0
Guenther
2010-07-31s3-build: avoid to globally include printing and spoolss headers.Günther Deschner1-1/+2
This shrinks precompiled headers by 3MB and will slightly speed up any build. Guenther
2010-07-27s3-printing: Added automatic migration of printing tdbs.Andreas Schneider1-85/+0
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-spoolss: Move the standard mappings to spoolss.Andreas Schneider1-14/+0
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Added automatic migration of printing tdbs.Andreas Schneider1-0/+5
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Move all tdb upgrade functions to a separate file.Andreas Schneider1-391/+4
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Remove unused printer registry key functions.Andreas Schneider1-494/+0
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Removed unused security descriptor functions.Andreas Schneider1-306/+0
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Removed unused nt_forms.Andreas Schneider1-362/+0
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Removed unsuded c_setprinter functions.Andreas Schneider1-66/+0
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Removed unused free_a_printer function.Andreas Schneider1-26/+0
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Removed unused mod_a_printer functions.Andreas Schneider1-313/+0
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Removed unused get_a_printer functions.Andreas Schneider1-523/+0
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-spoolss: Use winreg_delete_printer_key to delete printers.Simo Sorce1-32/+11
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-spoolss: Get rid of get_server_name.Simo Sorce1-9/+0
This function was useless the structure is public and used everywhere. Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27s3-printing: Converted printer publishing functions.Simo Sorce1-107/+202
Use spoolss_PrintInfo2 and winreg calls. Signed-off-by: Jim McDonough <jmcd@samba.org>