summaryrefslogtreecommitdiff
path: root/source3/printing/nt_printing.c
AgeCommit message (Collapse)AuthorFilesLines
2013-01-19printing: Free talloc_stackframe() on all exit pathsAndrew Bartlett1-0/+2
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-17printing: Create default architecture directories on init.Andreas Schneider1-0/+59
Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jan 17 20:36:17 CET 2013 on sn-devel-104
2013-01-07smbd: Fix calls to create_conn_struct_cwd to be correctly indented.Andrew Bartlett1-18/+18
These are whitespace changes only, left out of the previous commit to preserve clarity. Andrew Bartlett. Reviewed-by: Jeremy Allison <jra@samba.org>
2013-01-07smbd: Split create_conn_struct into a fn that does not change the working dirAndrew Bartlett1-3/+3
The python bindings do not want the current working directory changed during operations, so we provide two functions, one providing the original behaviour, and other providing the python bindings with just the memory allocation and initilisation stuff. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
2012-12-12s3-printing: Don't call talloc_free on an uninitialized pointer.Andreas Schneider1-1/+1
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell1-5/+5
They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-03s3-printing: Remove deprecated lp_printer_admin().Andreas Schneider1-11/+0
2012-06-12s3:printing: fix use of a non-existent word (existant)Michael Adam1-1/+1
2012-05-24s3:smbd/msdfs: let create_conn_struct() also fake the 'smbd_server_connection'Stefan Metzmacher1-3/+12
metze
2012-04-06build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett1-3/+3
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
2012-02-09s3-printing: Add new printers to registry.Björn Baumbach1-2/+17
This fixes bug #8554, #8612 and #8748. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Feb 9 16:39:04 CET 2012 on sn-devel-104
2012-01-23WERROR type variable being incorrectly checked with a NT_STATUS_IS_XDavid Disseldorp1-1/+1
type macro.
2012-01-20s3-spoolss: prefix print$ path on driver file deletionDavid Disseldorp1-44/+37
Driver file paths stored in the registry do not include the server path prefix. delete_driver_files() incorrectly assumes such a prefix. https://bugzilla.samba.org/show_bug.cgi?id=8697 Signed-off-by: Andreas Schneider <asn@samba.org>
2011-11-03s3-printing: fix typoBjörn Baumbach1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org>
2011-09-26s3: Remove the smbd_server_conn ref from create_conn_structVolker Lendecke1-3/+7
2011-07-28s3-spoolss: Use existing handle in printer_driver_files_in_use().Andreas Schneider1-11/+1
Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Jul 28 16:20:11 CEST 2011 on sn-devel-104
2011-07-28s3-spoolss: Use existing handle in printer_driver_in_use().Andreas Schneider1-14/+2
2011-07-20s3-auth Use the common auth_session_infoAndrew Bartlett1-10/+10
This patch finally has the same structure being used to describe the authorization data of a user across the whole codebase. This will allow of our session handling to be accomplished with common code. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth use auth_user_info not netr_SamInfo3 in auth3_session_infoAndrew Bartlett1-1/+1
This makes auth3_session_info identical to auth_session_info The logic to convert the info3 to a struct auth_user_info is essentially moved up the stack from the named pipe proxy in source3/rpc_server to create_local_token(). Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use *unix_token rather than utok in struct auth3_session_infoAndrew Bartlett1-2/+2
This brings this structure one step closer to the struct auth_session_info. A few SMB_ASSERT calls are added in some key places to ensure that this pointer is initialised, to make tracing any bugs here easier in future. NOTE: Many of the users of this structure should be reviewed, as unix and NT access checks are mixed in a way that should just be done using the NT ACL. This patch has not changed this behaviour however. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use struct auth3_session_info outside the auth subsystemAndrew Bartlett1-10/+10
This seperation between the structure used inside the auth modules and in the wider codebase allows for a gradual migration from struct auth_serversupplied_info -> struct auth_session_info (from auth.idl) The idea here is that we keep a clear seperation between the structure before and after the local groups, local user lookup and the session key modifications have been processed, as the lack of this seperation has caused issues in the past. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-07s3-printing: safe a ton of roundtrips by reusing existing winreg ↵Günther Deschner1-6/+27
binding_handles. Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: use winreg_internal functions.Günther Deschner1-9/+9
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: move spoolss_create_default_devmode/secdesc to init_spoolss.hGünther Deschner1-172/+0
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: move driver_info_ctr_to_info8 to init_spoolss.hGünther Deschner1-90/+0
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07s3-printing: move os2 related functions to printing/nt_printing_os2.c.Günther Deschner1-142/+0
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-05-18s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett1-1/+1
strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
2011-05-05s3-printing: run minimal_includes.pl.Günther Deschner1-5/+0
Guenther
2011-05-02s3-printing: avoid using pipes_struct when only session_info is needed.Günther Deschner1-12/+11
Guenther
2011-05-02s3-proto: move remaining spoolss protos to own header file.Günther Deschner1-0/+1
Guenther
2011-04-11s3-printing: Use become_user_by_session() function.Andreas Schneider1-3/+3
We create a fake connection here and don't have an vuid. So work with the session_info directly here. Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Apr 11 22:56:12 CEST 2011 on sn-devel-104
2011-03-30s3-includes: only include ntdomain.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner1-1/+0
Guenther
2011-03-30s3-messages: only include messages.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-auth: printing needs auth.hGünther Deschner1-0/+1
Guenther
2011-03-30s3: printing needs parts of smbd.Günther Deschner1-0/+1
Guenther
2011-03-30s3-passdb: use passdb headers where needed.Günther Deschner1-0/+1
Guenther
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