summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
2013-04-12autoconf: build in NTDB.Rusty Russell1-98/+136
I previously added -DDISABLE_NTDB to FLAGS, but lib/param/util.c doesn't seem to be compiled with that flag, so it's really not a good solution. So instead, compile in ntdb for the autoconf build. This means: 1) Add -DHAVE_CCAN to cflags. 2) Remove pyntdb from autoconf objects (which is what tdb does) 3) Remove -DDISABLE_NTDB 4) Add ntdb utility objects 5) Link in ntdb everywhere we link in tdb. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-12Remove dependency on detection of HAVE_DIRFD for use of fdopendir().Jeremy Allison1-3/+1
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): Fri Apr 12 16:21:10 CEST 2013 on sn-devel-104
2013-04-12Remove the "Ugly hack" that was the second use of dirfd().Jeremy Allison1-13/+5
The destructor does all the resource deallocation needed. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-12In the struct smb_Dir destructor, use the fsp back pointer to release resources.Jeremy Allison1-10/+13
Removes one use of dirfd(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-12Maintain a back-pointer to the fsp in struct smb_Dir when opening with ↵Jeremy Allison1-1/+5
FDOPENDIR. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-12libsmbclient: Use async cli_full_connection in python connection setupVolker Lendecke1-2/+9
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): Fri Apr 12 03:07:10 CEST 2013 on sn-devel-104
2013-04-11libsmbclient: Make cli_full_connection asyncVolker Lendecke2-50/+199
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Make cli_tree_connect asyncVolker Lendecke1-14/+109
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Make cli_raw_tcon asyncVolker Lendecke1-15/+83
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Streamline cli_openx a bitVolker Lendecke1-3/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Use tevent_req_poll_ntstatus in cli_openxVolker Lendecke1-2/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Streamline cli_tcon_andx a bitVolker Lendecke1-3/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Use tevent_req_poll_ntstatus in cli_tcon_andxVolker Lendecke1-2/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Make cli_start_connection asyncVolker Lendecke1-18/+102
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Remove unused cli_connect_sockVolker Lendecke1-32/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Add async cli_connect_nbVolker Lendecke1-24/+94
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Avoid a talloc_strdup in cli_connect_nbVolker Lendecke1-4/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Make cli_connect_sock asyncVolker Lendecke1-40/+126
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Remove unused sync wrappersVolker Lendecke1-201/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Add async cli_session_setupVolker Lendecke2-42/+223
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Remove unused cli_session_setup_ntlmssp()Volker Lendecke1-29/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Add async cli_session_setup_ntlmsspVolker Lendecke1-24/+146
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Factor out cli_session_setup_get_accountVolker Lendecke1-9/+17
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Slightly simplify cli_session_setup_spnegoVolker Lendecke1-3/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Factor out cli_session_setup_get_principalVolker Lendecke1-36/+49
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11libsmbclient: Avoid a data copyVolker Lendecke1-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>
2013-04-11libsmbclient: Fix a leak on talloc_tos()Volker Lendecke1-1/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11Remove unneeded initializations (we already talloc_zero).Jeremy Allison1-5/+0
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Remove the use of dirfd inside the vfs_dirsort.c.Jeremy Allison1-9/+23
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Convert mtime from a time_t to a struct timespec.Jeremy Allison1-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>
2013-04-11Check SMB_VFS_NEXT_OPENDIR return in dirsort_opendir().Jeremy Allison1-0/+5
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Clean error paths in opendir and fd_opendir by only setting handle data on ↵Jeremy Allison1-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>
2013-04-11Protect open_and_sort_dir() from the directory changing size.Jeremy Allison1-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>
2013-04-11Use an index i rather than re-using a state variable.Jeremy Allison1-5/+3
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Protect against early error in SMB_VFS_NEXT_READDIR.Jeremy Allison1-0/+4
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Change source3/modules/vfs_dirsort.c from MALLOC -> TALLOC.Jeremy Allison1-14/+8
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-10s3:smbd: do not access data behind req->buf+req->buflen in ↵Ralph Wuerthner1-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
2013-04-10s3:smbd: convert srvstr_pull_req_talloc() into a functionRalph Wuerthner3-9/+14
Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-10s3:smbd: do not access data behind req->buf+req->buflen in ↵Ralph Wuerthner1-3/+10
srvstr_get_path_req_wcard() Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-10build: Remove extra space in shebangAndrew Bartlett1-1/+1
Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-10vfs_fake_perms: Fix bug 9775, segfault for "artificial" conn_structsVolker Lendecke1-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
2013-04-09vfs_fake_perms: Slightly streamline codeVolker Lendecke1-2/+2
Don't initialize a variable directly set Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-09vfs_fake_perms: Slightly streamline codeVolker Lendecke1-16/+21
Do an early error return Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-09s3-netlogon: enumerate UPN suffixes from PASSDB when availableAlexander Bokovoy1-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
2013-04-09PASSDB: add support to set and enumerate UPN suffixes associated with our forestAlexander Bokovoy3-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>
2013-04-09s3-waf: filter out ldapsam internal init functionsAlexander Bokovoy1-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>
2013-04-09winbindd: Avoid a fd leak when we can not forkVolker Lendecke1-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
2013-04-09pylibsmb: Avoid a segfault if no credentials are passed to libsmb.Conn()Volker Lendecke1-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
2013-04-09BUG 9766: Cache name_to_sid/sid_to_name correctly.Andreas Schneider1-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
2013-04-09BUG 9139: Fix the username map optimization.Andreas Schneider1-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>