1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

24075 Commits

Author SHA1 Message Date
Volker Lendecke
c7c885078b Replace sid_string_static with sid_to_string
This adds 28 fstrings on the stack, but I think an fstring on the stack is
still far better than a static one.
2007-12-15 22:09:37 +01:00
Volker Lendecke
c221c246b1 Use sid_to_string directly
It seems a bit pointless to do a fstrcpy(dst, sid_string_static(src))
2007-12-15 22:09:36 +01:00
Volker Lendecke
60e830b0f4 Replace sid_string_static with sid_string_tos
In utils/ I was a bit lazy...
2007-12-15 22:09:36 +01:00
Volker Lendecke
0a911d38b8 Use sid_string_talloc where we have a tmp talloc ctx 2007-12-15 22:09:36 +01:00
Volker Lendecke
bb35e794ec Replace sid_string_static by sid_string_dbg in DEBUGs 2007-12-15 22:09:36 +01:00
Volker Lendecke
3e4148c280 Add sid_string_dbg
This makes use of the just added debug_ctx and will kill many
sid_string_static() calls
2007-12-15 22:09:35 +01:00
Volker Lendecke
6312016e27 Add debug_ctx according to an idea by Tridge
Sorry, Jeremy, I think for debug messages this is just the right way to do it.
2007-12-15 22:09:35 +01:00
Volker Lendecke
f00ab810d2 Use sid_string_talloc where we have a tmp talloc ctx 2007-12-15 22:09:35 +01:00
Volker Lendecke
9e3ef0923d add sid_string_talloc 2007-12-15 22:09:35 +01:00
Volker Lendecke
1f352cdd19 Fix a segfault
sid_to_string still expects a fstring
2007-12-15 09:13:56 -08:00
Jeremy Allison
bc13e93954 Fix for bug #5082 from Mathias Gug <mathiaz@ubuntu.com>, Steve Langasek <vorlon@debian.org>.
Recent versions of Linux-PAM support localization of user prompts,
so Samba must use the C locale when invoking PAM (directly or via
/usr/bin/passwd) to ensure that password chat values match the prompts in a
locale-invariant fashion.
Jeremy.
2007-12-14 17:02:50 -08:00
Stefan Metzmacher
56251f7852 selftest: reenable wbinfo tests and pass --configfile instead of -s
metze
2007-12-14 19:39:49 +01:00
Stefan Metzmacher
33cbd6903e wbinfo: use POPT_COMMON_CONFIGFILE
We can't use POPT_COMMON_SAMBA as the -s option is
already used by -s, --sid-to-name=SID.

Also load the config file after processing the cmdline options

metze
2007-12-14 19:38:23 +01:00
Stefan Metzmacher
af3392cc20 add POPT_COMMON_CONFIGFILE which only provides --configfile (not -s)
metze
2007-12-14 19:36:14 +01:00
Stefan Metzmacher
a8a74fc88c selftest: disable wbinfo tests
wbinfo needs to take --config-file to work...

metze
2007-12-14 18:02:05 +01:00
Stefan Metzmacher
88b6d2c0e8 selftest: add a bunch of wbinfo based tests for winbindd
metze
2007-12-14 16:56:10 +01:00
Stefan Metzmacher
8ace8fa82c selftest: move workgroup name into WORKGROUP envvar
metze
2007-12-14 16:19:18 +01:00
Karolin Seeger
81dab4145f Revert smbclient changes.
Patch broke option -p.
Sorry for breaking the build!

Karolin
2007-12-14 12:08:30 +01:00
Karolin Seeger
04131b26de Make smbclient to display error message and usage in the case of invalid options. 2007-12-14 11:20:27 +01:00
Stefan Metzmacher
075d315e0f winbindd: move domain child specific stuff into its own file
metze
2007-12-14 08:28:35 +01:00
Stefan Metzmacher
cccb80b7b7 Revert "Fix for bug #4801: Correctly implement lsa lookup levels for lookupnames."
As it breaks all tests which try to join a new machine account.
So more testing is needed...

metze

This reverts commit dd320c0924.
2007-12-14 08:28:10 +01:00
Stefan Metzmacher
a412e6c7c6 debug: fix crash bug when DEBUG() is used before setup_logging()
this was introduced by the pstring removal
(1ea3ac8014)

metze
2007-12-14 08:22:14 +01:00
James Peach
cf221a94bd Move dns_sd.h include to fix the build. 2007-12-13 22:12:21 -08:00
James Peach
0de2b3eb51 Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test 2007-12-13 20:56:53 -08:00
Rishi Srivatsavai
1e7241517d Register the smb service with mDNS if mSDN is supported.
If mDNS is supported, attempt to register the first port we are
listening on for the _smb._tcp service. This provides more reliable
service discovery than NetBIOS browsing.
2007-12-13 20:56:29 -08:00
Jeremy Allison
27078d1292 We don't need to call endpwent if we never call getpwent.
Jeremy.
2007-12-13 17:25:26 -08:00
Jeremy Allison
7fad5f38ea Add a varient of Steve Langasek <vorlon@debian.org> patch
for bug #4780. Cause user mounts to inherit uid= and gid= from the
calling user when called as non-root, except when overridden on the
commandline.
Jeremy.
2007-12-13 17:18:48 -08:00
Jeremy Allison
c9496e97cf Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test 2007-12-13 16:46:42 -08:00
Jeremy Allison
6b1246c29a Arg. The fix for CVE-2007-6015 hadn't been merged into 3.2.
Do so now....
Jeremy.
2007-12-13 16:44:24 -08:00
Michael Adam
da23684261 Fix typo in debug statement.
Michael
2007-12-13 14:38:05 +01:00
Alexander Bokovoy
b8e582c994 Fix codepagedir to follow predefined libdir when using FHS. Fixes x86_64 build. 2007-12-13 14:23:04 +03:00
Alexander Bokovoy
45636efa39 Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test 2007-12-13 12:57:24 +03:00
Alexander Bokovoy
fbc510f171 Fix pam_smbpass build 2007-12-13 12:55:32 +03:00
Michael Adam
537b12647e Add flags for correctly implementing lsa_lookup_name levels.
(Prepare fix for Bug #4801.)

Michael
2007-12-13 10:15:21 +01:00
Michael Adam
e180bbd454 Make cm_connect_sam() try harder to connect autheticated.
Even if the session setup was anonymous, try and collect
trust creds with get_trust_creds() and use these before
falling back to schannel.

This is the first attempt to fix interdomain trusts.
(get password policy and stuff)

Michael
2007-12-13 10:15:20 +01:00
Michael Adam
481f18b20d Refactor out assembling of trust creds (pw, account name, principal).
Michael
2007-12-13 10:15:20 +01:00
Michael Adam
18c66a364e Streamline and fix logic of cm_prepare_connection().
Do not attempt to do a session setup when in a trusted domain
situation (this gives STATUS_NOLOGON_TRUSTED_DOMAIN_ACCOUNT).

Use get_trust_pw_clear to get machine trust account.
Only call this when the results is really used.
Use the proper domain and account name for session setup.

Michael
2007-12-13 10:15:20 +01:00
Michael Adam
e77c4022cf Refactoring out get_schannel_session_key logic.
Refactor the actual retrieval of the session key through the
established netlogon pipe out of get_schannel_session_key()
and get_schannel_session_key_auth_ntlmssp() into a new
function get_schannel_session_key_common().
(To avoid code duplication.)

Michael
2007-12-13 10:15:19 +01:00
Michael Adam
b2e12365b5 Pass NULL instead of unneeded &sid: pdb_get_trusteddom_pw() checks.
Michael
2007-12-13 10:15:19 +01:00
Michael Adam
0cde7ac9cb Rename get_trust_pw() to get_trust_pw_hash().
Michael
2007-12-13 10:15:19 +01:00
Michael Adam
4562342eb8 Export logic of get_trust_pw() to new function get_trust_pw_clear().
get_trust_pw() just now computes the md4 hash of the result of
get_trust_pw_clear() if that was successful. As a last resort,
in the non-trusted-domain-situation, get_trust_pw() now tries to
directly obtain the hashed version of the password out of secrets.tdb.

Michael
2007-12-13 10:15:18 +01:00
Michael Adam
91da12b751 Refactor the lagacy part of secrets_fetch_trust_account_password() out
into a new function secrets_fetch_trust_account_password_legacy() that
does only try to obtain the hashed version of the machine password directly
from secrets.tdb.

Michael
2007-12-13 10:15:18 +01:00
Michael Adam
6ced4a7f88 Let get_trust_pw() determine the machine_account_name to use.
Up to now each caller used its own logic.

This eliminates code paths where there was a special treatment
of the following situation: the domain given is not our workgroup
(i.e. our own domain) and we are not a DC (i.e. it is not a typical
trusted domain situation). In situation the given domain name was
previously used as the machine account name, resulting in an account
name of DOMAIN\\DOMAIN$, which does not seem very reasonable to me.
get_trust_pw would not have obtained a password in this situation
anyways.

I hope I have not missed an important point here!

Michael
2007-12-13 10:15:17 +01:00
Michael Adam
cdc60d8ae8 Streamline logic in cm_connect_netlogon()
by retrieving trust password only, when it will be used.

Michael
2007-12-13 10:15:16 +01:00
Michael Adam
164bfb25d7 In cm_prepare_connection(), only get auth user creds if we need to.
Michael
2007-12-13 10:15:14 +01:00
Michael Adam
4788fe3924 Remove two unneeded functions.
secrets_store_trust_account_password() and trust_password_delete()
are the write access functions to the SECRETS/$MACHINE.ACC/domain keys
in secrets.tdb, the md4 hashed machine passwords. These are not used
any more: Current code always writes the clear text password.

Michael
2007-12-13 10:15:13 +01:00
Michael Adam
dd320c0924 Fix for bug #4801: Correctly implement lsa lookup levels for lookupnames.
This is a first patch aimed at fixing bug #4801.
It is still incomplete in that winbindd does not walk
the the trusted domains to lookup unqualified names here.
Apart from that this fix should be pretty much complete.

Michael
2007-12-13 10:15:13 +01:00
James Peach
c8468a1bb4 Fix typo. 2007-12-12 22:12:10 -08:00
James Peach
2dfe9525b9 Autoconf support for detecting DNS Service Discovery support.
Patch from Rishi Srivatsavai <rishisv@gmail.com>, with some
adaptations.
2007-12-12 19:55:20 -08:00
Jeremy Allison
b215fb1ad0 Missed one strcpy call.
Jeremy.
2007-12-12 19:12:18 -08:00