summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* vfs: add [GET/SET]_COMPRESSION hooksDavid Disseldorp2013-11-226-1/+163
| | | | | | | | | | | | | | | The VFS interfaces are sychronous, as the operations only modify meta-data. These hooks are dependent on support for transparent compression by the underlying filesystem - vfs_default returns INVALID_DEVICE_REQUEST. Support for other filesystems providing transparent comression, such as Btrfs and ZFS, can be added in future. The get_compression function takes fsp and smb_fname arguments. The smb_fname argument is needed due to the current dosmode() code-path. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest/s3: run smb2.ioctl against FS specific shareDavid Disseldorp2013-11-221-0/+4
| | | | | | | | Run the smb2.ioctl tests against the filesystem specific share. This adds ~12s to the selftest runtime on my SSD+Btrfs setup. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Rename the profile enums with a SAMBA_ prefix to avoid conflict with system ↵Jeremy Allison2013-11-228-38/+38
| | | | | | | | | files. WRITE_FLUSH is defined in fs.h in Linux. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* lib/param: Consolidate code to enable smb signing on the server, always ↵Andrew Bartlett2013-11-221-12/+9
| | | | | | | | | | | | | | | enable on AD DC This uses the code from the source4/ SMB server (the NTVFS smb server) in common, to force SMB Signing to be on when we are an AD DC. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Nov 22 13:13:05 CET 2013 on sn-devel-104
* s3-winbind: Pass the group name to fillup_pw_field().Andreas Schneider2013-11-221-30/+43
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=2191 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Nov 22 02:04:54 CET 2013 on sn-devel-104
* s3-lib: Add grpname to talloc_sub_specified().Andreas Schneider2013-11-217-16/+56
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=2191 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* spoolss: accept XPS_PASS datatype used by Windows 8Arvid Requate2013-11-211-1/+7
| | | | | | | | | | | The new v4 driver model used in Windows 8 declares print jobs intended to bypass the XPS processing layer by setting datatype to "XPS_PASS" instead of "RAW". BUG: https://bugzilla.samba.org/show_bug.cgi?id=10267 Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* testparm: don't warn for TCP_NODELAY in socket options.Michael Adam2013-11-201-3/+3
| | | | | | | TCP_NODELAY is set by default, so we should not warn. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* testparm: Warnings should not cause failureMartin Schwenke2013-11-201-4/+0
| | | | | | | | | | | | | Remove the return code of 1 associated with some warnings. Warnings should not cause failure. If any of these cases should cause a failure then they should be changed to errors. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Nov 20 12:19:59 CET 2013 on sn-devel-104
* debug: remove unused sys_adminlogDavid Disseldorp2013-11-202-28/+0
| | | | | | | | | | printing.c was the last user of this syslog wrapper. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Nov 20 10:19:32 CET 2013 on sn-devel-104
* printing: use DEBUG instead of sys_adminlogDavid Disseldorp2013-11-201-24/+12
| | | | | | | | sys_adminlog() is another syslog wrapper. Use DEBUG(0, ...) instead, which offers the same syslog(LOG_ERR) behaviour. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* printing: fix double space in debug statementDavid Disseldorp2013-11-201-1/+1
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* loadparm: use lp_printername ctx param instead of tosDavid Disseldorp2013-11-201-1/+1
| | | | | | | | | | lp_printername() takes a TALLOC_CTX argument, but proceeds to use talloc_tos() in a subsequent lp__printername call. Fix it to use the parameter - most callers use talloc_tos() as the argument, the others have a temporary context around. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* messaging: use local talloc ctx instead of talloc_tosDavid Disseldorp2013-11-201-4/+4
| | | | | | | | | messaging_tdb_send() allocates a stackframe and stores it in a local variable, subsequent allocations should use the variable instead of calling talloc_tos(). Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* printing: return WERROR from print_access_checkDavid Disseldorp2013-11-204-67/+58
| | | | | | | | | | print_access_check() currently returns a bool based on whether access is granted or denied. Errno is set on failure, but none of the callers use it. This change converts print_access_check() to return a WERROR. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* smbd: Fix a talloc hierarchy problem in msg_channelVolker Lendecke2013-11-201-1/+1
| | | | | | | | | | | | | When tearing down a watch_send with an open tevent_immediate, we talloc_free the msg_channel while the tevent_immediate still references it. Don't make the tevent_immediate outlive the msg_channel. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10250 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 20 00:13:51 CET 2013 on sn-devel-104
* netapi: Add support for info level 502 in NetShareAdd.Hans Leidekker2013-11-194-1/+71
| | | | | | | | Signed-off-by: Hans Leidekker <hans@meelstraat.net> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Nov 19 21:48:17 CET 2013 on sn-devel-104
* torture3: Use tevent_req_nterror properlyVolker Lendecke2013-11-191-4/+2
| | | | | | | | | | | Might be minor, but the less example of wrong API use we have the better it is. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Nov 19 04:05:08 CET 2013 on sn-devel-104
* printing: always store sytem job-ID in queue stateDavid Disseldorp2013-11-181-21/+22
| | | | | | | | | | | | | | | | | | | Print jobs have multiple identifiers: the regular spoolss jobid, which is allocated by spoolss on job submission, and the system jobid, which is assigned by the printing back-end. Currently these identifiers are incorrectly mixed in print job queue tracking. Fix this by ensuring that only the system jobid is stored in the print queue state structure. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10271 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Nov 18 18:03:41 CET 2013 on sn-devel-104
* spoolss: return the spoolss job ID in notificationsDavid Disseldorp2013-11-183-7/+28
| | | | | | | | | | | | | | | | | Print job notifications currently carry the system print job identifier from the queue structure. Instead, the spoolss job identifier should be resolved and returned. Print clients can use notification job-ids in subsequent spoolss SetJob requests. Returning an incorrect identifier can result in the failure of such requests, e.g. spoolss_SetJob(SPOOLSS_JOB_CONTROL_DELETE). BUG: https://bugzilla.samba.org/show_bug.cgi?id=10271 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s3-libnet: Use a const char for realm.Andreas Schneider2013-11-151-1/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Nov 15 23:11:54 CET 2013 on sn-devel-104
* s3-vfs: Make glfs_set_preopened() static.Andreas Schneider2013-11-151-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-vfs: Remove unused variable in vfs_glusterfs.Andreas Schneider2013-11-151-1/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-libsmb: Fix scanf format in parse_ace().Andreas Schneider2013-11-151-3/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-utils: Fix scanf format in sharesec.Andreas Schneider2013-11-151-3/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-utils: Fix scanf format in smbacls.Andreas Schneider2013-11-151-3/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-libsmb: Use the right macro to set uint16_t attr.Andreas Schneider2013-11-151-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Make centry_start staticChristof Schmitt2013-11-152-2/+2
| | | | | | | | | | centry_start is only used in winbindd_cache.c Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Fri Nov 15 18:05:41 CET 2013 on sn-devel-104
* s3-client: smbclient shows no error if deleting a directory with del failedJeremy Allison2013-11-143-4/+28
| | | | | | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10260 In SMB1 the server filters by attribute requested, in SMB2 there is no attribute sent. Emulate this on the client to provide the same ABI to callers. In SMB1 the server returns NT_STATUS_NO_SUCH_FILE if FindFirst finds no files. Emulate this on the client. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Nov 14 21:23:07 CET 2013 on sn-devel-104
* s3-lib: smbclient shows no error if deleting a directory with del failedJeremy Allison2013-11-144-27/+43
| | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10260 Move dir_check_ftype() to util.c Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-smbd: smbclient shows no error if deleting a directory with del failedJeremy Allison2013-11-143-5/+5
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10260 Remove unneeded conn argument to dir_check_ftype(). Move to correct uint32_t types. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autorid: Correctly init range_index for "delete range"Volker Lendecke2013-11-141-0/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Nov 14 15:55:54 CET 2013 on sn-devel-104
* s3-winbindd: Fix #10264, cache_traverse_validate_fn failure for NDR cache ↵Günther Deschner2013-11-131-1/+2
| | | | | | | | | | | | | | | | entries. We need to increase the keysize limit for NDR queries. A wbint_LookupSids query for just 20 sids already hits the older limit. Guenther https://bugzilla.samba.org/show_bug.cgi?id=10264 Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Nov 13 19:33:46 CET 2013 on sn-devel-104
* rpcclient: fix output of lsalookupsids for sids of type DOMAINMichael Adam2013-11-131-3/+10
| | | | | | | For domain sids, don't print NAME\*unknown* but print NAME instead. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libsmb: Fix CID 242665 Out-of-bounds accessVolker Lendecke2013-11-131-3/+7
| | | | | | | | | | | Coverity is confused by the dual-use of "pss" as an array of size 1. This is not strictly a bug here, but it is admittedly a small subtlety. It should fix a whole bunch of Coverity issues. Normally I would resist to change our code in response to a deficient static checker, but here I would vote for this compromise. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-vfs: Fix stream_depot vfs module on btrfs.Andreas Schneider2013-11-121-6/+4
| | | | | | | | | | | | Checking if the directory is empty using 'nlink == 2' only checks if there are no subdirectories. It doesn't indicate if there are files in the directory. However checking link count for no subdirectories is wrong and applications shouldn't rely on it, see: https://lkml.org/lkml/2012/2/1/756 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* Revert "s3-vfs: Fix stream_depot vfs module on btrfs."David Disseldorp2013-11-121-8/+8
| | | | | | | | | | | | | | | | This reverts commit 29f12e7d5960906935e3af1405e9759a07d64750. The wrong patch was pushed, according to Andreas: I sent a second version cause the first was not complete. I've discussed with Volker after I sent the patch and then sent a new patch which a) also does the right thin in the unlink case b) only tried to remove the server is the deletion of the file was successful. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-libnetjoin: Fix Bug #10262: use upper-case realm when composing default upn.Günther Deschner2013-11-121-1/+16
| | | | | | | | | | | | | | | In case we are about to generate a keytab during the join make sure the default upn we create is usable with kinit -k. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10262 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): Tue Nov 12 16:39:03 CET 2013 on sn-devel-104
* smbd: Fix CID 1035365 Buffer not null terminatedVolker Lendecke2013-11-111-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Fix CID 1035366 Buffer not null terminatedVolker Lendecke2013-11-111-4/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Use fstring in conn_tdb.cVolker Lendecke2013-11-111-2/+2
| | | | | | | It might be legacy, but as long as we have it, we can make use of it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Use fstring in conn_tdb.hVolker Lendecke2013-11-111-3/+3
| | | | | | | It might be legacy, but as long as we have it, we can make use of it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Fix CID 1035478 Negative array index readVolker Lendecke2013-11-111-6/+19
| | | | | | | lp_parm_enum can return -1. Add error checking. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* libsmb: Fix CID 241313 Array compared against 0Volker Lendecke2013-11-111-4/+2
| | | | | | | userinfo->passwrd is not a pointer, no point in checking for !=NULL Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Fix CID 1035434 Same on both sidesVolker Lendecke2013-11-111-1/+1
| | | | | | | Looks scary, but the only effect of this bug is too many UNLOCK messages Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* libsmb: Fix CID 1127343 Dead default in switchVolker Lendecke2013-11-111-2/+0
| | | | | | | We have checked sec_channel_type a few lines above already Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* netapi: Fix CID 1127344 Uninitialized scalar variableVolker Lendecke2013-11-111-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* net: Fix CID 1035403 Unchecked return valueVolker Lendecke2013-11-111-1/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* smbd: Fix DEBUG in do_break_to_noneVolker Lendecke2013-11-111-8/+6
| | | | | | | | | The name of this function has changed, but the DEBUG statements have not been adapted. This is the case in a lot of our code. With __func__ this problem goes away: __func__ is C99, and we also use it already. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3-vfs: Fix stream_depot vfs module on btrfs.Andreas Schneider2013-11-081-8/+8
| | | | | | | | | | | | Checking if the directory is empty using 'nlink == 2' only checks if there are no subdirectories. It doesn't indicate if there are files in the directory. However checking link count for no subdirectories is wrong and applications shouldn't rely on it, see: https://lkml.org/lkml/2012/2/1/756 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>