summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
2013-01-24Fix bug #9586 - smbd[29175]: disk_free: sys_popen() failed" message logged ↵Jeremy Allison1-1/+1
in /var/log/message many times. Ensure when reading lines from an interruptible pipe source we ignore EINTR. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jan 24 10:45:48 CET 2013 on sn-devel-104
2013-01-23smbd: Fix a NULL vs false return errorVolker Lendecke1-1/+1
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-23waf: Fix pdb_ldap which cannot be built as a module.Andreas Schneider1-2/+4
The module has two init functions, pdb_ldap_init() and pdb_ldapsam_init(). As a shared module only one can be found until we create a symlink. Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jan 23 10:51:59 CET 2013 on sn-devel-104
2013-01-22s3-winbind: fix the build of idmap_ldap.Günther Deschner1-1/+2
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Jan 22 14:43:40 CET 2013 on sn-devel-104
2013-01-21BUG 9474: Downgrade v4 printer driver requests to v3.Günther Deschner1-1/+8
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jan 21 16:11:02 CET 2013 on sn-devel-104
2013-01-21BUG 9574: Fix a possible null pointer dereference in spoolss.Andreas Schneider1-1/+2
If the the client enumerates the printers and didn't specify a servername we have a null pointer dereference, so the process serving the connection crashes. Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Jan 21 13:30:11 CET 2013 on sn-devel-104
2013-01-19Fix warnings with mismatched sizes in arguments to DEBUG statements.Jeremy Allison1-8/+8
This can cause compile errors on 32-bit systems. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jan 19 12:14:13 CET 2013 on sn-devel-104
2013-01-19printing: Free talloc_stackframe() on all exit pathsAndrew Bartlett1-0/+2
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-18smbtorture: Satisfy a linker dependencyVolker Lendecke1-1/+8
Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-18winbind: Handle child requests in a tevent_fdVolker Lendecke1-105/+65
This enables the use of standard tevent_loop_once in the child, which now also uses epoll where available. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-18winbind: Introduce "struct child_handler_state"Volker Lendecke1-22/+30
This will make the next patch simpler. child_handler_state contains the information that the handler for the parent fde needs to pass to process_child_request Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-18winbind: Use standard tevent_context_initVolker Lendecke3-7/+34
This makes winbind use epoll instead of poll Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-18BUG 9378: Add extra attributes for AD printer publishing.David Disseldorp1-1/+85
Currently attempting to publish a printer in AD fails with "Object class violation", due to a number of missing attributes in the LDAP request. Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jan 18 17:27:35 CET 2013 on sn-devel-104
2013-01-18printing: Remove invalid free from error path.David Disseldorp1-1/+0
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-18Remove locking across the lifetime of the copychunk call.Jeremy Allison1-116/+1
Previous commit handles this around each read/write call. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Jan 18 01:47:01 CET 2013 on sn-devel-104
2013-01-18Move copychunk locking to be local to the read/write calls.Jeremy Allison1-0/+42
Eliminates the need to hold locks across the entire lifetime of the call. Next commit will remove these. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-18Add additional copychunk checks.Jeremy Allison1-0/+22
For printer, ipc$ connections, and directory handles. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-18Move handle checking code to copychunk_check_handles().Jeremy Allison1-21/+37
Planning to add extra checks to ensure we don't attempt copychunk on printer or IPC$ handles. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@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-17s3-spoolss: use configurable spoolss architecture in ↵Günther Deschner1-1/+5
compose_spoolss_server_path(). Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Thu Jan 17 18:53:47 CET 2013 on sn-devel-104
2013-01-17spoolss: make spoolss deal with ndr64 SetForm by using proper container object.Günther Deschner2-5/+14
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-17spoolss: make spoolss deal with ndr64 AddForm by using proper container object.Günther Deschner3-12/+20
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-17spoolss: make spoolss deal with ndr64 ULONG_PTR of devmode_ptr and secdesc_ptr.Günther Deschner3-6/+4
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-17smb2_ioctl: copychunk request max output validationDavid Disseldorp1-0/+12
Check that the copychunk ioctl request maximum output specified by the client is large enough to hold copychunk response data. Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jan 17 00:59:44 CET 2013 on sn-devel-104
2013-01-16smb2_ioctl: track copychunk response output stateDavid Disseldorp1-16/+38
Treat the response data independent to the status. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16smb2_ioctl: copychunk CHECK_READ and CHECK_WRITEDavid Disseldorp1-0/+25
[MS-SMB2] 3.3.5.15.6 Handling a Server-Side Data Copy Request, specifies that the copychunk destination file handle be granted FILE_WRITE_DATA and FILE_READ_DATA access. FILE_READ_DATA access must also be granted on the copychunk source file, which may be done implicitly with execute permission. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16smb2_ioctl: only pass through to VFS on a valid fspDavid Disseldorp1-13/+17
A null fsp is dereferenced on VFS call. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16smb2_ioctl: perform locking around copychunk requestsDavid Disseldorp1-17/+137
For each chunk in a copychunk request, take a read and write lock on the source and destination files respectively. Also change the resume key format to use a combination of the persistent and volatile handles. Thanks to Metze for his help on this. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16smbd: split out file_fsp_get from file_fsp_smb2David Disseldorp2-10/+27
Obtain the files_struct from smb2req, persistent_id and volatile_id. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16smb2_ioctl: remove ioctl error response assumptionsDavid Disseldorp1-17/+57
MS-SMB2 3.3.4.4 documents cases where a ntstatus indicating an error should not be considered a failure. In such a case the output data buffer should be sent to the client rather than an error response packet. Add a new fsctl copy_chunk test to confirm field limits are sent back in response to an oversize chunk request. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16smb2_ioctl: add support for FSCTL_SRV_COPYCHUNKDavid Disseldorp1-4/+231
SMB2 clients can issue FSCTL_SRV_COPYCHUNK requests in order to copy data between files on the server side only, rather than reading data then writing back from the client. FSCTL_SRV_COPYCHUNK is used by default for Explorer SMB2 file copies on Windows Server 2012. 2.2.32.1 SRV_COPYCHUNK_RESPONSE in [MS-SMB2] describes the requirement for the server to provide maximum copychunk request size limits in ioctl responses carrying STATUS_INVALID_PARAMETER. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16s3-vfs: add copy_chunk vfs hooksDavid Disseldorp6-3/+292
copy_chunk copies n bytes from a source file at a specific offset to a destination file at a given offset. This interface will be used in handling smb2 FSCTL_SRV_COPYCHUNK ioctl requests. Use a pread/pwrite loop in vfs_default, so that requests referring to the same src and dest file are possible. Provide send and receive hooks for copy chunk VFS interface, allowing asynchronous behaviour. Check whether the request source offset + length exceeds the current size. Return STATUS_INVALID_VIEW_SIZE under such a condition, matching Windows server behaviour. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16smb2_ioctl: add FSCTL_SRV_REQUEST_RESUME_KEY supportDavid Disseldorp3-2/+49
Use existing ioctl IDL infrastructure for marshalling. Support for this ioctl is a prerequisite for FSCTL_SRV_COPYCHUNK handling. The client-opaque resume key is constructed using the server side dev/inode file identifier. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16smb2_ioctl: split ioctl handler code on device typeDavid Disseldorp8-355/+684
Add per device type ioctl handler source files for FSCTL_DFS, FSCTL_FILESYSTEM, FSCTL_NAMED_PIPE and FSCTL_NETWORK_FILESYSTEM. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16smb2_ioctl: split ioctl handlers into separate funtionsDavid Disseldorp1-154/+173
Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16build(waf): fix the abi_match for the pdb libraryMichael Adam1-1/+1
The global wildcard match is automatically added by the parsing code if the global match list is empty. Specifying an explicit '*' as the only global match lets the parsing code add a second '*' to the local list, which is an error tolerated on my linux by ld (the GNU linker), but not by the stricter GNU ELF linker "gold". Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Wed Jan 16 21:31:00 CET 2013 on sn-devel-104
2013-01-16spoolss: Make OpenPrinterEx work with NDR64 by using UserInfo Container.Günther Deschner2-10/+12
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-15test: dbwrap_tool requires --persistent for the registry nowVolker Lendecke2-2/+2
Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Jan 15 16:31:35 CET 2013 on sn-devel-104
2013-01-15s3:dbwrap_tool: add --persistent switch and mode for non-persistent DBsMichael Adam1-12/+45
This changes the default for dbwrap_tool to open a DB as non-persistent. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-01-15smbd: Fix bug 9544, part 2Volker Lendecke1-0/+80
Plug in async pwrite Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jan 15 00:55:51 CET 2013 on sn-devel-104
2013-01-14smbd: Fix bug 9544, part 1Volker Lendecke1-3/+3
Adapt the sync function names Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-14smbd: Always compile vfs_commitVolker Lendecke2-0/+2
There's no reason not to Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-14configure: Fix bug 9546, aio_suspend detection on FreeBSDVolker Lendecke2-2/+2
NULL is not defined without some includes Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-14samr: Make use of posix_openptVolker Lendecke3-2/+6
Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-14samr: Split up an assignment from an if conditionVolker Lendecke1-1/+2
Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-11winbind: Fix some missing NULL checksVolker Lendecke1-24/+29
Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jan 11 18:55:41 CET 2013 on sn-devel-104
2013-01-11winbind: Fix error check in unpack_tdc_domainsVolker Lendecke1-2/+5
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-11dbwrap: Use INCOMPATIBLE_HASH for dbwrap_watchers.tdbVolker Lendecke1-3/+4
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-10swat: move russian swat files alongside ja and trAndrew Bartlett11-85/+0
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-10passdb: Add discard_const_p() to pdb_samba_dsdbAndrew Bartlett1-2/+2
Reviewed-by: Stefan Metzmacher <metze@samba.org>