1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

80776 Commits

Author SHA1 Message Date
Alexander Bokovoy
c1444c3839 s3-autoconf: fix typo after migrating DNS resolver code to lib/addns 2012-05-23 17:51:51 +03:00
Alexander Bokovoy
77a6c81347 wafsamba: ensure TO_LIST does not fail with empty string 2012-05-23 17:51:50 +03:00
Alexander Bokovoy
744f9910c8 libcli/dns: make 'clidns' private library out of DNS code in WAF build
After consolidating DNS resolver code to lib/addns, there is one piece
that still needs to be moved into a common DNS resolver library: DNS_HOSTS_FILE
subsystem. Unfortunately, direct move would require lib/addns to depend on
libcli/util/{ntstatus.h,werror.h} (provided by errors subsystem).

In addition, moving libcli/dns/* code to lib/addns/ would make conflicting
the dns_tkey_record struct. The conflict comes from source4/dns_server/ and is due
to use of IDL to define the struct. lib/addns/ library also provides its own definition
so we either need to keep them in sync (rewrite code in lib/addns/ a bit) or
depend on generated IDL headers.

Thus, making a private library and subsystem clidns is an intermediate step
that allows to buy some time fore refactoring.
2012-05-23 17:51:50 +03:00
Alexander Bokovoy
2ddf89a2bc Introduce system MIT krb5 build with --with-system-mitkrb5 option.
System MIT krb5 build also enabled by specifying --without-ad-dc

When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level
configure in WAF build we are trying to detect and use system-wide MIT krb5
libraries. As result, Samba 4 DC functionality will be disabled due to the fact
that it is currently impossible to implement embedded KDC server with MIT krb5.

Thus, --with-system-mitkrb5/--without-ad-dc build will only produce
  * Samba 4 client libraries and their Python bindings
  * Samba 3 server (smbd, nmbd, winbindd from source3/)
  * Samba 3 client libraries

In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture.
This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
2012-05-23 17:51:50 +03:00
Alexander Bokovoy
2fc96e6955 s4: samba-tool is usable without export-keytab command, make sure it does not break
When export_keytab is not compiled in (pure client-side Samba 4 build as with
system MIT krb5), export-keytab command of samba-tool will not be available.
Make sure it is not provided but its absence does not break the Python tool.
2012-05-23 17:51:50 +03:00
Alexander Bokovoy
ec989e7c40 auth-credentials: Support using pre-fetched ccache when obtaining kerberos credentials
When credentials API is used by a client-side program that already as fetched required
tickets into a ccache, we need to skip re-initializing ccache. This is used in FreeIPA
when Samba 4 Python bindings are run after mod_auth_kerb has obtained user tickets
already.
2012-05-23 17:51:50 +03:00
Alexander Bokovoy
2d9a0d8d0c s3-passdb: add unixid_from_uid/unixid_from_gid/unixid_from_both API
struct unixid is defined in idmap.idl and therefore to use it one
would need generated headers from librpc/gen_ndr. Not all of these
files are installed and available as public headers. Also, they
pull in some support headers which requires them to be available
via specific locations like <librpc/gen_ndr/*> or <libcli/util>.

Instead of pulling the headers to get structure and enum definitions,
introduce three simple helpers to fill in 'struct unixid' based on
the type of id. This is sufficient for PASSDB users and does not
require exposing generated headers or code.
2012-05-23 17:51:50 +03:00
Alexander Bokovoy
f32d43763d dns: fix comments and make s4/libcli/resolve dns resolver working
After migrating to use libaddns, reply_to_addrs() needed to change the
way answers are iterated through. Originally libroken implementation
gave all answers as separate records with last one being explicitly NULL.
libaddns unmarshalling code gives all non-NULL answers and should be
iterated with explicit reply->num_answers in use.
2012-05-23 17:51:49 +03:00
Alexander Bokovoy
1feb31246d lib/krb5_wrap: implement krb5_cc_get_lifetime for MIT Kerberos
In case krb5_cc_get_lifetime is not available, iterate over
existing tickets in the keytab, find the one marked as TKT_FLAG_INITIAL,
and use its lifetime. This is how it is implemented in Heimdal and
how it was suggested to be done by MIT Kerberos developers.
2012-05-23 17:51:49 +03:00
Simo Sorce
ad945bc68f gensec_gssapi: Make it possible to build with MIT krb5
We need to ifdef out some minor things here because there is no available API
to set these options in MIT.
The realm and canonicalize options should be not interesting in the client
case. Same for the send_to_kdc hacks.
Also the OLD DES3 enctype is not at all interesting. I am not aware that
Windows will ever use DES3 and no modern implementation relies on that enctype
anymore as it has been fully deprecated long ago, so we can simply ignore it.
2012-05-23 17:51:49 +03:00
Simo Sorce
302abe6190 auth and s4-rpc_server: Do not use features we currently can't implement with MIT Kerbros build 2012-05-23 17:51:49 +03:00
Simo Sorce
c54fe86a63 s4-resolve: Remove dependency on libroken
Use available native samba resolver functions
2012-05-23 17:51:49 +03:00
Simo Sorce
a8ee6f2ca5 addns: Make ads_dns_lookup_srv pulic 2012-05-23 17:51:49 +03:00
Simo Sorce
34a65739d3 Move source3/libads/dns.c to lib/addns 2012-05-23 17:51:48 +03:00
Simo Sorce
cc3321c9ff s3-ads-dns: Avoid unnecessary dependencies 2012-05-23 17:51:48 +03:00
Simo Sorce
a7e94fce3f s3-ads-dns: Break dependency on lp_parm
In preparation of making this code common to s3 and s4
2012-05-23 17:51:48 +03:00
Simo Sorce
4a335e9632 s3-ad-dns: Use more standard uint and booleans defs
In preparation of making this code common to s3 and s4
2012-05-23 17:51:48 +03:00
Simo Sorce
9c5aa0bef4 addns: Fix talloc hiereachy
Attach request to local memory context not to potentially long lived connection
2012-05-23 17:51:48 +03:00
Stefan Metzmacher
37866df4ee s3:smbd: use reply_force_doserror(req, ERRSRV, ERRbaduid) on SMBulogoff
We don't support security = share anymore, so we should always have
a valid session.

Found by the raw.context test.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 23 12:47:37 CEST 2012 on sn-devel-104
2012-05-23 12:47:37 +02:00
Herb Lewis
42b2026a83 Second part of fix for bug 8953 - winbind can hang as nbt_getdc() has no timeout.
If we're running with SEC_ADS and we don't get a cldap response from
the server when querying its name, don't fall back to NetBIOS requests
as they're unlikely to succeed.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed May 23 03:49:36 CEST 2012 on sn-devel-104
2012-05-23 03:49:35 +02:00
Jeremy Allison
d673402992 Fix bug #8953 - winbind can hang as nbt_getdc() has no timeout.
Add a timeout_in_seconds parameter to nbt_getdc() to make it fail
after that time with NT_STATUS_IO_TIMEOUT.
2012-05-22 16:25:14 -07:00
Michael Adam
f9e4105f41 s3:smbd: remove unused 'connection_struct->used'
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 22 16:42:22 CEST 2012 on sn-devel-104
2012-05-22 16:42:22 +02:00
Jeremy Allison
c531aac27c Added torture test for bug #8910. Test remove_duplicate_addrs2().
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue May 22 01:31:17 CEST 2012 on sn-devel-104
2012-05-22 01:31:17 +02:00
Volker Lendecke
8576256738 s3: Fix vfs_xattr_tdb.c
"size" is the maximum buffer, only copy what we actually got. For me, this
fixes valgrind errors in the DIR1 test that might potentially make DIR1
non-flaky again.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon May 21 22:10:15 CEST 2012 on sn-devel-104
2012-05-21 22:10:15 +02:00
Stefan Metzmacher
ce11eb5b94 s3:smb2_ioctl: Fix Coverity ID 701771 Uninitialized scalar variable
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May 21 19:27:44 CEST 2012 on sn-devel-104
2012-05-21 19:27:43 +02:00
Matthieu Patou
1d53e57bbf s4-dsdb: allow modification of some deleted object if the show-deleted control is presented
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sat May 19 20:28:01 CEST 2012 on sn-devel-104
2012-05-19 20:28:00 +02:00
Matthieu Patou
db866864f7 s4-dsdb: naming context needs to have the extended-dn syntax too 2012-05-19 09:35:29 -07:00
Matthieu Patou
a9b4d7e7de libcli: make it easier to understand that a control was not correctly encoded 2012-05-19 09:35:28 -07:00
Jeremy Allison
32cbf20e65 Move the set_write_time() call to after get_existing_share_mode_lock() returns with a share mode.
get_existing_share_mode_lock() isn't really the right
call here, as we're being called after
close_remove_share_mode() inside close_normal_file()
so it's quite normal to not have an existing share
mode here. However, get_share_mode_lock() doesn't
work because that will create a new share mode if
one doesn't exist - so stick with this call (just
ignore any error we get if the share mode doesn't
exist.

The previous commit raised the error message debug
level inside get_share_mode_lock_internal() so
we don't always get a level 1 error message if
get_existing_share_mode_lock() fails.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat May 19 06:26:33 CEST 2012 on sn-devel-104
2012-05-19 06:26:33 +02:00
Jeremy Allison
87a62df8e6 Raise the debug level from 1 to 5 in get_share_mode_lock_internal()
This isn't a fatal condition, there is a valid codepath
that can cause this message.
2012-05-18 19:33:37 -07:00
Volker Lendecke
5c219a1c5c s4:torture: Add raw.session.reauth2 test
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri May 18 18:25:42 CEST 2012 on sn-devel-104
2012-05-18 18:25:42 +02:00
Stefan Metzmacher
61e023bbf6 s4:torture: rename raw.session.reauth => raw.session.reauth1
metze
2012-05-18 16:36:16 +02:00
Stefan Metzmacher
d58f7cd546 s3:smbd: allow creating new spnego sessions only with a 0 vuid
Found by the raw.context test.

metze
2012-05-18 16:36:16 +02:00
Stefan Metzmacher
84ce4484e7 s3:smbd: SMBtdis should return ERRSRV, ERRinvnid instead of NETWORK_NAME_DELETED
Found by the raw.context test.

metze
2012-05-18 16:36:16 +02:00
Stefan Metzmacher
d79b46f358 selftest/Samba3: add 'smbd:suicide mode = yes'
metze
2012-05-18 16:36:16 +02:00
Michael Adam
7db637483b s3:idmap_cache: improve checks for format of value string in idmap_cache_find_sid2unixid()
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri May 18 16:34:27 CEST 2012 on sn-devel-104
2012-05-18 16:34:27 +02:00
Michael Adam
0c3137c2e1 s3:idmap_cache: add common exit point to idmap_cache_find_sid2unixid() 2012-05-18 14:44:15 +02:00
Michael Adam
ecb24fd459 s3:idmap_cache: improve debug messages in idmap_cache_find_sid2unixid() 2012-05-18 14:44:15 +02:00
Volker Lendecke
f5ca3f11e4 s3: Revert the serverid changes, they need more work
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri May 18 13:12:14 CEST 2012 on sn-devel-104
2012-05-18 13:12:14 +02:00
Andrew Bartlett
45082a88c7 s4-torture: Improve torture test boilerplate, use torture_assert()
This ensures that if this fails, it is reported as a subunit error correctly.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri May 18 09:35:13 CEST 2012 on sn-devel-104
2012-05-18 09:35:13 +02:00
Andrew Bartlett
8c52d1b8ac s4-torture: Always use torture_assert() to handle failures 2012-05-18 15:44:43 +10:00
Andrew Bartlett
e919cadcca s4-torture: provide correct torture failures for failure to connect 2012-05-18 15:44:43 +10:00
Andrew Bartlett
8e5badc256 build: Also look for iconv in /usr/local by default
This should help the build find iconv on FreeBSD and similar systems,
and make it possible to operate with 8-bit character sets.

Andrew Bartlett
2012-05-18 15:44:43 +10:00
Thomas Nagy
4626f25b53 Add include/lib folders from the commandline
By using opt.add_option(..., match=['Checking for library iconv'], dest='iconvdir'),
all configuration tests displaying 'Checking for library iconv' will get
$(iconvdir)/lib and $(iconvdir)/include
2012-05-18 15:44:43 +10:00
Andrew Bartlett
975e799e86 s4-torture: Fix rpc.samr.priv test to use torture_assert() macros 2012-05-18 15:44:43 +10:00
Andrew Bartlett
ae338bf3f5 autobuild: Run ABI check on samba4-libs as well.
Because this build is without the developer options (so as to check that we build without those)
we do not do an ABI check by default.

Andrew Bartlett
2012-05-18 15:44:43 +10:00
Andrew Bartlett
611ca8e819 build: Move generated files out of the normal build tree
This avoids some dual-build-system interactions.

Andrew Bartlett
2012-05-18 15:44:43 +10:00
Andrew Bartlett
584a51b2ca build: Move generated version.h to a waf-invisible location
Generally, it is better if our generated header files for the autoconf
build do not end up in places that the waf build can see.

Andrew Bartlett
2012-05-18 15:44:43 +10:00
Jelmer Vernooij
01c502ddd4 pygensec: Fix init of variable if not specified.
Thanks to Wolfgang Sourdeau for reporting this.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=8946

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri May 18 04:50:17 CEST 2012 on sn-devel-104
2012-05-18 04:50:17 +02:00
Jeremy Allison
e0b924b6d5 Note that "keepalive" only applies to SMB1 connections.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May 18 02:59:34 CEST 2012 on sn-devel-104
2012-05-18 02:59:34 +02:00