summaryrefslogtreecommitdiff
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* s3fs-smbd: Move housekeeping to the background process.Andreas Schneider2012-10-021-0/+9
| | | | | | | | | | | | | | | | | | | | If you add 200 printers using lpadmin. Then you wait for the printcap cache to expire. As soon as this expires we notify all deamons that they should reload the printers. This mean we need to create the default registry keys for each printer. If you do e.g. a 'smbclient -L' during that time you will get a lot of timeouts. This lets the housekeeping function of the printcap cache do the task of creating the default registry keys in background queue process. When it is done with the task it will tell all smbd childs to reload the printers and the 200 printers appear. (cherry picked from commit aa6a7a97803b1106d2200c889a2260f81059c450) Signed-off-by: Andreas Schneider <asn@samba.org> Fix bug #9231 - NT_STATUS_IO_TIMEOUT during slow import of printers into registry.
* Fix service control for non-internal services.Vladimir Marek2012-10-021-4/+0
| | | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> (cherry picked from commit a4e8869f7c93f30dd7014ff83d6d2f2b5afc2d64) Signed-off-by: Andreas Schneider <asn@samba.org> Fix bug #9192 - svcctl list option prohibits smbd to start.
* s3-winbindd: Adjust error code loop logic in rpc_trusted_domains().Günther Deschner2012-10-021-1/+1
| | | | | | | | | Guenther Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Sat Sep 29 00:34:04 CEST 2012 on sn-devel-104 Fix bug #9185 - Winbind cannot resolve AD DC in a different subnet.
* s3-lsa: Flesh out the returned info in _lsa_EnumTrustedDomainsEx().Günther Deschner2012-10-021-0/+5
| | | | Guenther
* s3-winbindd: Allow DNS resolution of trusted domains if DNS name is avaliableSumit Bose2012-10-023-25/+58
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* build: Fix build on systems without ldap development headersAndrew Bartlett2012-10-011-0/+1
| | | | | | | | Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Sep 14 22:53:30 CEST 2012 on sn-devel-104 The last 2 patches address bug #9228 - libpdb/pdb_ldap/idmap_ldap build dependencies cleanup (for 4.0RC2).
* s3: make smbldaphelper subsystem an internal libraryAlexander Bokovoy2012-10-013-11/+10
| | | | | | | | | | | | | | | | | Break pdb_ldap -> smbldaphelper -> pdb -> pdb_ldap loop by making smbldaphelp intentionally underlinked internal library. It means that libsmbldaphelp is not usable unless its user is also linked to libpdb (that is the case for both its users, idmap_ldap and pdb_ldap, already) but gives us a break of the circular dependency in case pdb_ldap statically linked into pdb (default). This should solve case when idmap_ldap and pdb_ldap are dynamically loaded modules Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Fri Sep 14 01:02:21 CEST 2012 on sn-devel-104
* s3-smbd: Don't segfault if user specified ports out for range.Andreas Schneider2012-09-281-7/+9
| | | | | | | | | | | | | Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Sep 26 16:28:44 CEST 2012 on sn-devel-104 (cherry picked from commit 50d324b7e070de4672eff3fb6231923e6dca807a) Signed-off-by: Andreas Schneider <asn@samba.org> Fix bug #9218 - Samba panics if a user specifies an invalid port number. Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-0-test): Fri Sep 28 11:02:16 CEST 2012 on sn-devel-104
* Fix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free.Jeremy Allison2012-09-281-0/+4
| | | | | | | | | Not the correct fix for the specific issue, but a general fix to make sure this can never happen again. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Sep 26 04:07:57 CEST 2012 on sn-devel-104 (cherry picked from commit 83f60672e1b3069e6b1b90b376460da895e37df3)
* s3:smbd:smb2: initialize variable in vfs_default_durable_reconnect()Michael Adam2012-09-281-1/+1
| | | | | | | Found by Ambi's state-of-the-art compiler! (cherry picked from commit 93bee9b3e31b398b9becc7be7804025d4066359b) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: remove struct member smbd_smb2_request.cancelled - it was only ↵Michael Adam2012-09-286-8/+0
| | | | | | written (cherry picked from commit 88d051f7f18ff88ec5385fdc798f051659134bd3) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_lock: let smbd_smb2_create_cancel() trigger NT_STATUS_CANCELEDStefan Metzmacher2012-09-281-14/+2
| | | | | | | | | Instead of violating the tevent_req layers. metze (cherry picked from commit 603f9bfa4cf7910e1c1cae1a8d0741a6d0874baa) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_lock: smbd_smb2_notify_recv() can already return NT_STATUS_CANCELEDStefan Metzmacher2012-09-281-18/+0
| | | | | | | | | That's why we can remove the code that violates the tevent_req layers. metze (cherry picked from commit 65a81060093cf9d7c0ebf8d6e160625bdc87baab) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_notify: make use of tevent_req_defer_callback() instead of custom ↵Stefan Metzmacher2012-09-281-34/+1
| | | | | | | | | tevent_immediate metze (cherry picked from commit 882cee0acb9c1e2105a005f0ea90691197a696c7) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_notify: don't call tevent_req_done() from smbd_smb2_notify_cancel()Stefan Metzmacher2012-09-281-2/+1
| | | | | | | | | | smbd_notify_cancel_by_smbreq() will already trigger this via smbd_smb2_notify_reply() and smbd_smb2_notify_reply_trigger(). metze (cherry picked from commit 1f0dfd42f16c388abc7054a7b615d2e81031472b) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_lock: let smbd_smb2_lock_cancel() trigger NT_STATUS_CANCELEDStefan Metzmacher2012-09-281-26/+3
| | | | | | | | | Instead of violating the tevent_req layers. metze (cherry picked from commit 1f8e4732c5870043fbbc22c772404b5380f808f0) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_server: avoid segfault in smbd_smb2_request_pending_queue()Stefan Metzmacher2012-09-281-2/+6
| | | | | | | | | | | | | | | Because we should not call smbd_smb2_request_error() on an request that is still running. If the subreq implementes a cancel function, this should take care of triggering smbd_smb2_request_error. metze Signed-off-by: Michael Adam <obnox@samba.org> (cherry picked from commit 9249871f40aab021d62d3154f8ca286b52f5ef76) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd:smb2: simplify smbd_smb2_request_validate() and ↵Michael Adam2012-09-282-51/+3
| | | | | | | | | | | | | | smbd_smb2_request_dispatch() removes unnneccary checks/assignments for compound_related and next_status and duplicate setting of error status. And remove (now) unused next_status from struct smbd_smb2_request. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 1ae6f9c62629f8513bbe93a56775b3c64ff06832) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd:smb2: add check for session_status for compound requests (cherry ↵Michael Adam2012-09-281-3/+3
| | | | | | picked from commit 27d38b5c27bd96d5124c175d946718bf0836b8f4) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_server: do the req->next_status check before the signing checksStefan Metzmacher2012-09-281-15/+15
| | | | | | | | | | | Windows 2012 returns NT_STATUS_INVALID_PARAMETER to the smb2.compound.invalid1 test if that uses signing (instead of NT_STATUS_ACCESS_DENIED). metze (cherry picked from commit 4384485f82aac109bf4c4c31075e313e54b4c076) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_server: reset req->last_session_id and req->last_tid after using itStefan Metzmacher2012-09-281-0/+4
| | | | | | | | | | | | | | | | | If we can find a valid session or tcon we'll set it after the lookup, but it need to make sure to reset it if we don't find the session. This fixes a problem where a compound unrelated request between related requests doesn't reset the session. If we have 3 requests in a compound chain, request 3 should never use the id's cached from request 1. It should only every inherit handles from request 2. metze (cherry picked from commit 2552b6632372b35cbd7b788c4e00091dfe520a41) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Compound requests should continue processing.Ira Cooper2012-09-281-3/+2
| | | | | | | | | This patch addresses #9173. Signed-off-by: Michael Adam <obnox@samba.org> (cherry picked from commit 75951946193c874b6db30c1b9c8722264c3ce656) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3-spoolss: Fix builtin forms order to match Windows again.Andreas Schneider2012-09-281-120/+118
| | | | | | | | | | | Thanks to mamachine@gmail.com. (cherry picked from commit 24fc5b46f2b33f94bf79fc375432609697aaa45e) Signed-off-by: Andreas Schneider <asn@samba.org> Fix bug #8632 - printing regression: form sizes seem broken, cannot print letter size correctly.
* s3: For read-only shares, filter out write bits from conn->access_maskVolker Lendecke2012-09-281-0/+7
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 54e5590cc1267e9c886bc9abd37d8a8eb33cf3f6) The last 2 patches address bug #9217 - CreateFile with FILE_DIRECTORY_FILE can create directories on read-only shares.
* s3: Fix rejecting mkdir on read-only sharesVolker Lendecke2012-09-281-1/+1
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 6351ed1ec4b93ef1d7b79bab0b92536d74693d2a)
* panic action is defined as GLOBAL_VAR(szPanicAction) not ↵Matthieu Patou2012-09-281-1/+0
| | | | | | | | | | | | GLOBAL_VAR(panic_action) Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 18 06:12:00 CEST 2012 on sn-devel-104 (cherry picked from commit 2a7484eb7286a6896826ad1ed15aa7b1760a451c) Fix bug #9199 - fix usage of panic action.
* s3:printing only do printing_subsystem_update when printing is enabledChristian Ambach2012-09-281-1/+4
| | | | | | | no point in calling this if printing was disabled and no spoolss service was started this hurts CTDB clusters as the smbds on the cluster nodes will fight for the single record in the TDB This fixes Bug 9197 - Disabling printing still makes smbd create and access printer_list.tdb
* s3:smb2_server: fix usage of invalid memory in smb2_signing_check_pdu()Stefan Metzmacher2012-09-281-1/+1
| | | | | | | | | | | metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Sep 20 07:18:31 CEST 2012 on sn-devel-104 (cherry picked from commit bc77745cfaf502e24575dab9ae323643d94760e3) Fix bug #9193 - s3:smb2_server: fix usage of invalid memory in smb2_signing_check_pdu().
* Fix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask in ↵Jeremy Allison2012-09-281-0/+7
| | | | | | | blob. If we aren't already granted DELETE access, check if we have DELETE_CHILD in the containing directory.
* source3/script: fix installman.sh after the last build-manpages-nogit changeMichael Adam2012-09-271-2/+2
| | | | | | | | | | | | | | | commit cfdab79729e8507a7504b0224c60454d3bc40ffc Author: Michael Adam <obnox@samba.org> Date: Wed Sep 12 15:46:35 2012 +0200 release-scripts: let build-manpages-nogit store generated docs under ./bin/docs not under ./docs Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 1a945686a6770a0ac17bded73201368f10c65bc9)
* quota: add supprt for gfs2Björn Jacke2012-09-271-0/+2
| | | | | | | | | | | gfs2 uses the same generic quota interface as xfs and it has the same base block/quota block size ratio and seems to work nice with the xfs quota module. (People using gfs should be aware that quota reporting is lagging quite a bit on gfs. If you copy a file on a gfs volume the quota values are being updated with a delay of 30s here with kernel 3.5. This reporting can lead to data corruption if a client thinks he can write but actually he suddently can't.) (cherry picked from commit 0b57d1c07520f4995412f224945324fef29f5989)
* s3:smbd: release the share mode lock before calling exit_server() (bug #9191)Stefan Metzmacher2012-09-271-0/+2
| | | | | | | | | | metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Sep 21 22:36:57 CEST 2012 on sn-devel-104 Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-0-test): Thu Sep 27 10:41:27 CEST 2012 on sn-devel-104
* s3: make ldapsam-related functions a smbldaphelper subsystemAlexander Bokovoy2012-09-233-4/+7
| | | | | | | | | | | | | | Since these functions are used in pdb_ldap and idmap_ldap, and pdb_ldap might be statically linked to libpdb (default), it is better to keep them as separate subsystem to avoid polluting libpdb namespace. This is first step in refactoring libpdb. Right now I cannot move these functions into proper libsmbldaphelper as it uses more of libpdb-included functions and linking pdb_ldap against libsmbldaphelper library would have created a loop if pdb_ldap is included into libpdb. Fix bug #9157 - libpdb/pdb_ldap/idmap_ldap build dependencies cleanup.
* Sigh :-(. Removing optimization prematurely is the root of all evil :-(.Jeremy Allison2012-09-233-0/+15
| | | | | | | | | | | | | | | | | | | Sorry for the mistake, but the LastDir singleton cache in vfs_ChDir() actually plays an important role. When we're processing a stream of SMB1/SMB2/SMB3 requests we don't want to add a chdir()/getcwd() system call pair on every request if they're all on the same connection and dealing with the same base path. I did some testing with a program that times 1,000,000 chdir() requests vs. 1,000,000 strcmp requests and it's a penalty of 10x doing the system calls. Just because it's old code, doesn't mean it's bad :-(. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 13 21:31:42 CEST 2012 on sn-devel-104 Fix bug #9161 - We should re-add the vfs_Chdir() cache I removed.
* s3:vfs_gpfs: fix buildChristian Ambach2012-09-231-5/+5
| | | | | | | | after recent VFS changes (cherry picked from commit 7a6182962966e5edb42728c8d0a4d471a69c83d7) The last 5 patches address bug #162 - Illumos/Solaris Build is Broken using --with-acl.
* s3: fix the aix acl moduleBjörn Jacke2012-09-231-9/+9
| | | | | This was not adopted to the recent VFS acl structure changes. (cherry picked from commit 35632eec8e3b0dcfecffde814a790cc4f444dd97)
* s3: fix the tru64 acl moduleBjörn Jacke2012-09-231-5/+5
| | | | | This was not adopted to the recent VFS acl structure changes. (cherry picked from commit 9222f0f9280485c2751ecfdb96421da25e6e5344)
* s3: fix the hpux acl moduleBjörn Jacke2012-09-231-5/+5
| | | | | | | | This was not adopted to the recent VFS acl structure changes. Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Fri Sep 14 12:23:23 CEST 2012 on sn-devel-104 (cherry picked from commit 1aa281ecb0f45c97d78161fd1308be8655295f1f)
* s3: Fix the vfs_solarisacl module to compile.Ira Cooper2012-09-231-5/+5
| | | | This got broken with the recent VFS acl structure changes.
* s3:build: rewrite autogen.sh to be called from any directoryMichael Adam2012-09-121-5/+20
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* In vfs modules, don't use 'conn->origpath' when we really mean 'conn->cwd'.Jeremy Allison2012-09-124-10/+10
| | | | | | | | This allows VFS modules to work even when we've changed directory under the connect path in order to do root-safe calls. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Sep 12 23:45:23 CEST 2012 on sn-devel-104
* Move cached cwd onto conn struct.Jeremy Allison2012-09-123-1/+17
| | | | | This enables us to make VFS modules safe for use in root called code when we've changed directory under conn->connectpath.
* Remove ancient "optimization" global LastDir.Jeremy Allison2012-09-123-18/+3
|
* Avoid overriding default ccache for ads operations.Simo Sorce2012-09-128-14/+102
| | | | | | | | | | | | | | | | | | | | | | | | Avoid overriding default ccache for ads operations. Nowadays various samba components may need to use GSSAPI and a default cred cache to perform their tasks. This code was completely overriding the whole process default ccache name, thus altering the current credentials and sometimes hijacking them (or getting preemptively hijaked). By using gss_krb5_import_cred we can instead use a private ccache (necessary sometimes to use a different set of credentials fromt he default cifs/fqdn@realm one, for example when contacting foreign DCs using trust credentials) that does not affect the rest of the process. For the kerberos versions which don't have gss_krb5_import_cred we fallback to temp override of KRB5CCNAME and gss_acquire_cred. Signed-off-by: Alexander Bokovoy <ab@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Wed Sep 12 21:18:09 CEST 2012 on sn-devel-104
* s3: remove unneeded noquota.c fileBjörn Jacke2012-09-121-38/+0
| | | | | Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Wed Sep 12 16:50:50 CEST 2012 on sn-devel-104
* s3-rap: Open printers with the right access mask.Andreas Schneider2012-09-121-3/+3
| | | | | Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Sep 12 14:05:42 CEST 2012 on sn-devel-104
* s3-pdb: filter out more symbols only used in ldapsam internalsAlexander Bokovoy2012-09-122-2/+1
|
* smbd: Add extra VFS hooks to get the posix ACL as a blobAndrew Bartlett2012-09-126-0/+202
| | | | | | | | | | | This will allow us to hash this, rather than the NT ACL it maps to. This will in turn allow us to know if the NT ACL is valid even if we have to change the mapping code. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 12 07:06:01 CEST 2012 on sn-devel-104
* smbd: Remove pre-allocation of ACL array in sys_acl_init()Andrew Bartlett2012-09-125-18/+15
| | | | | | | | Instead, this is just handled with realloc in sys_acl_create_entry() This allows us to remove the size element from the SMB_ACL_T. Andrew Bartlett
* smbd-posix_acls: Use a IDL union to store the ACL entryAndrew Bartlett2012-09-122-13/+11
| | | | | | | This is a clearer, long-term-stable structure we can hash without risking it changing. Andrew Bartlett