summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* libsmbclient: Remove unused cli_session_setup_ntlmssp()Volker Lendecke2013-04-111-29/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Add async cli_session_setup_ntlmsspVolker Lendecke2013-04-111-24/+146
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Factor out cli_session_setup_get_accountVolker Lendecke2013-04-111-9/+17
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Slightly simplify cli_session_setup_spnegoVolker Lendecke2013-04-111-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Factor out cli_session_setup_get_principalVolker Lendecke2013-04-111-36/+49
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Avoid a data copyVolker Lendecke2013-04-111-9/+5
| | | | | | | | spnego_parse_negTokenInit does a asn_load of that blob, which does a data copy itself. So we don't have to had it a copy as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Fix a leak on talloc_tos()Volker Lendecke2013-04-111-1/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Remove unneeded initializations (we already talloc_zero).Jeremy Allison2013-04-111-5/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Remove the use of dirfd inside the vfs_dirsort.c.Jeremy Allison2013-04-111-9/+23
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Convert mtime from a time_t to a struct timespec.Jeremy Allison2013-04-111-15/+26
| | | | | | | | In preparation for removing the dirfd and using fsp_stat() and VFS_STAT functions. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Check SMB_VFS_NEXT_OPENDIR return in dirsort_opendir().Jeremy Allison2013-04-111-0/+5
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Clean error paths in opendir and fd_opendir by only setting handle data on ↵Jeremy Allison2013-04-111-10/+13
| | | | | | | | | | success. Pass extra struct dirsort_privates * to open_and_sort_dir() function to avoid it having to re-read the handle data. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Protect open_and_sort_dir() from the directory changing size.Jeremy Allison2013-04-111-9/+15
| | | | | | | | Otherwise there could be an error between initial count, allocation and re-read. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Use an index i rather than re-using a state variable.Jeremy Allison2013-04-111-5/+3
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Protect against early error in SMB_VFS_NEXT_READDIR.Jeremy Allison2013-04-111-0/+4
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Change source3/modules/vfs_dirsort.c from MALLOC -> TALLOC.Jeremy Allison2013-04-111-14/+8
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:smbd: do not access data behind req->buf+req->buflen in ↵Ralph Wuerthner2013-04-101-1/+7
| | | | | | | | | | srvstr_pull_req_talloc() Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Apr 10 02:03:13 CEST 2013 on sn-devel-104
* s3:smbd: convert srvstr_pull_req_talloc() into a functionRalph Wuerthner2013-04-103-9/+14
| | | | | Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: do not access data behind req->buf+req->buflen in ↵Ralph Wuerthner2013-04-101-3/+10
| | | | | | | srvstr_get_path_req_wcard() Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* build: Remove extra space in shebangAndrew Bartlett2013-04-101-1/+1
| | | | Reviewed-by: Michael Adam <obnox@samba.org>
* vfs_fake_perms: Fix bug 9775, segfault for "artificial" conn_structsVolker Lendecke2013-04-101-4/+29
| | | | | | | | 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 Apr 10 00:12:06 CEST 2013 on sn-devel-104
* vfs_fake_perms: Slightly streamline codeVolker Lendecke2013-04-091-2/+2
| | | | | | | Don't initialize a variable directly set Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_fake_perms: Slightly streamline codeVolker Lendecke2013-04-091-16/+21
| | | | | | | Do an early error return Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-netlogon: enumerate UPN suffixes from PASSDB when availableAlexander Bokovoy2013-04-091-12/+94
| | | | | | | | | | | | | | | | Optionally append list of UPN suffixes if PDB module returns non-empty one. Refactor fill_forest_trust_array() in source3 to allow reuse of the code between _netr_DsRGetForestTrustInformation() and _netr_GetForestTrustInformation() Implement a special case of _netr_DsRGetForestTrustInformation in smbd when trusted_domain_name is NULL (covered by test_DsrEnumerateDomainTrusts() in rpc.netlogon torture tests, see comment in source4/torture/rpc/netlogon.c). Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Apr 9 22:19:34 CEST 2013 on sn-devel-104
* PASSDB: add support to set and enumerate UPN suffixes associated with our forestAlexander Bokovoy2013-04-093-1/+55
| | | | | | | | | | | | | | | | Samba PDC may manage a forest containing DNS domains in addition to the primary one. Information about them is advertised via netr_DsRGetForestTrustInformation when trusted_domain_name is NULL, according to MS-NRPC and MS-LSAD, and via netr_GetForestTrustInformation. This changeset only expands PASSDB API; how suffixes are maintained is left to specific PDB modules. Set function is added so that suffixes could be managed through 'net' and other Samba utilities, if possible. One possible implementation is available for ipasam module in FreeIPA: http://git.fedorahosted.org/cgit/freeipa.git/commit/?id=cc56723151c9ebf58d891e85617319d861af14a4 Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-waf: filter out ldapsam internal init functionsAlexander Bokovoy2013-04-091-0/+1
| | | | | | | | | | | pdb_ldapsam_init* functions (init and init_common) are used in pdb_ipa.c and pdb_nds.c which are always linked together with pdb_ldap.c where pdb_ldapsam_init* functions reside. Tested with both ldapsam integrated (into libpdb) and as a separate module. Reviewed-by: Andreas Schneider <asn@samba.org>
* winbindd: Avoid a fd leak when we can not forkVolker Lendecke2013-04-091-0/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jim McDonough <jmcd@samba.org> Autobuild-User(master): Jim McDonough <jmcd@samba.org> Autobuild-Date(master): Tue Apr 9 20:27:27 CEST 2013 on sn-devel-104
* pylibsmb: Avoid a segfault if no credentials are passed to libsmb.Conn()Volker Lendecke2013-04-091-5/+5
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Richard Sharpe <sharpe@samba.org> Autobuild-Date(master): Tue Apr 9 18:30:06 CEST 2013 on sn-devel-104
* BUG 9766: Cache name_to_sid/sid_to_name correctly.Andreas Schneider2013-04-091-0/+21
| | | | | | | | | | | | | If there is no domain_name specified we still need to set to for caching else we will not find the entry later if we lookup the entry with the domain_name. Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Apr 9 16:32:44 CEST 2013 on sn-devel-104
* BUG 9139: Fix the username map optimization.Andreas Schneider2013-04-091-4/+8
| | | | | | | | | | | | | | | | | | If we successfully map a user. We call set_last_from_to(user_in, unixname); in the while loop reading the map file. After a successfull map we don't stop and continue the loop to check all other mappings in the username mapfile. But when we hit the end of the file and leave the loop we call: set_last_from_to(user_in, user_in); This overwrites the successful mapping, and the next time we call map_username() we skip the username and no mapping is done. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* BUG 9699: Fix adding case sensitive spn.Andreas Schneider2013-04-031-12/+2
| | | | | | | | | | | | We should be able to define the case of the spn cause it is important for some services like nfs. 'net ads keytab add "nfs"' should not result in an uppercase spn. 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): Wed Apr 3 23:57:32 CEST 2013 on sn-devel-104
* libsmbclient: Fix cli_session_setup_guest_sendVolker Lendecke2013-04-031-1/+1
| | | | | | | | | | | | | | This worked fine so far, but for the wrong reason: We only ever called this through the sync wrapper. The tevent_req_nterror in the NT_STATUS_OK case does not call tevent_req_finish. So the tevent_loop_poll did call into the core send/receive smb code. This is a fix for the case when smb1cli_req_chain_submit fails for some reason. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Apr 3 18:39:30 CEST 2013 on sn-devel-104
* s3:wscript: change --with-dmapi to default=auto to match the autoconf buildStefan Metzmacher2013-04-031-1/+1
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Apr 3 11:45:12 CEST 2013 on sn-devel-104
* s3:modules: fix the build of vfs_notify_fam (bug #9545)Stefan Metzmacher2013-04-032-0/+34
| | | | | | | This adds the --with-fam option and configure checks. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:lib/server_mutex: open mutex.tdb with CLEAR_IF_FIRSTStefan Metzmacher2013-04-031-1/+4
| | | | | | | /var/lock/samba is typically on tpmfs. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:lib/gencache: place gencache.tdb into /var/cache/sambaStefan Metzmacher2013-04-031-1/+1
| | | | | | | | | /var/lock/samba is located on tmpfs on newer systems, but we want to keep things like the server affinity cache across reboots. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* Ensure EA value is allocated on the right context.Jeremy Allison2013-04-021-1/+2
| | | | | | | | | | Ensure we free on error condition (tidyup, not a leak). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Apr 2 21:54:33 CEST 2013 on sn-devel-104
* Final fix for bug #9130 - Certain xattrs cause Windows error 0x800700FFJeremy Allison2013-04-021-1/+1
| | | | | | | | | | The spec lies when it says that NextEntryOffset is the only value considered when finding the next EA. We were adding 4 more extra pad bytes than needed (i.e. if the next entry already was on a 4 byte boundary, then we were adding 4 additional pad bytes). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
* Ensure we don't return uninitialized memory in the pad bytes.Jeremy Allison2013-04-021-1/+7
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
* Fix bug #9130 - Certain xattrs cause Windows error 0x800700FFJeremy Allison2013-04-021-0/+9
| | | | | | | Ensure we never return any zero-length EA's. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
* Change estimate_ea_size() to correctly estimate the EA size over SMB2.Jeremy Allison2013-04-021-0/+20
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
* Modify fill_ea_chained_buffer() to be able to do size calculation only, no ↵Jeremy Allison2013-04-021-12/+15
| | | | | | | marshalling. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
* Ensure we can never return an uninitialized EA list.Jeremy Allison2013-04-021-1/+2
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
* BUG 9758: Don't leak the epm_Map policy handle.Andreas Schneider2013-04-021-0/+4
| | | | | | | Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Tue Apr 2 17:16:56 CEST 2013 on sn-devel-104
* epm: Increase debug level for already registered endpoints.Andreas Schneider2013-04-021-1/+1
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* Fix bad SMB2 opcode reading in server.Jeremy Allison2013-04-021-5/+5
| | | | | | | | | | | | SMB2 opcodes are 16-bit values. We should *never* be reading them with IVAL(inhdr, SMB2_HDR_OPCODE), it should always be SVAL(inhdr, SMB2_HDR_OPCODE). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Richard Sharpe <sharpe@samba.org> Autobuild-Date(master): Tue Apr 2 07:28:48 CEST 2013 on sn-devel-104
* Optimization suggested by Volker. Don't do a stat system call on normal read ↵Jeremy Allison2013-03-281-15/+15
| | | | | | | | | | | | path. Only do it if we need it in the sendfile() path. 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 Mar 28 17:51:22 CET 2013 on sn-devel-104
* Call smb_panic when we try to exit the server uncleanly. This gives us the ↵Richard Sharpe2013-03-271-7/+1
| | | | | | | | | | normal traceback and memory dump, but also runs the normal panic action. Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Mar 27 22:58:37 CET 2013 on sn-devel-104
* smbd: Remove an optimization that became unnecessaryVolker Lendecke2013-03-261-7/+6
| | | | | | | | | | | | | After we only collect nonlocal vnns in idx_state.vnns now, at this point we *know* we have something to send to a remote node. The previous code avoided the call to notify_push_remote_blob with an if-statement that has now become unnecessary. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Mar 26 13:16:39 CET 2013 on sn-devel-104
* smbd: We don't collect our own vnn anymoreVolker Lendecke2013-03-261-3/+0
| | | | | | | | notify_trigger_index_parser will not anymore add ourselves into the vnn list that it collects. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>